Wednesday, October 26, 2016

KDE: add bulk rename in Dolphin

The best bulk rename tool is the one from Thunar, so it's a good idea to just install Thunar

sudo apt install thunar -y

Then run that plugin from Dolphin

kate ~/.local/share/kservices5/bulk-rename-thunar.desktop

paste this:

[Desktop Entry]
Type=Service
ServiceTypes=KonqPopupMenu/Plugin
MimeType=all/all;
Actions=BulkRename;
X-KDE-StartupNotify=false
X-KDE-Priority=TopLevel

[Desktop Action BulkRename]
Name=Bulk Rename
Exec=thunar -B %U
Icon=dialog-information

Tuesday, October 25, 2016

KDE: Add context menu actions to Dolphin (like extract audio)

To extract m4a audio from mp4:

kate ~.local/share/kservices5/extract-m4a.desktop

Paste:

[Desktop Entry]

Actions=Extract
Icon=dialog-information
MimeType=video/mp4
ServiceTypes=KonqPopupMenu/Plugin
Type=Service
X-KDE-Priority=TopLevel

    
[Desktop Action Extract]
Exec= bash -c 'ffmpeg -i "$0" -map 0:1 -c:a copy "${0%%.*}".m4a' %f
Icon=dialog-information
Name=Extract audio (m4a)
Do the same for flv. For wemb replace m4a with ogg.

Before all, check with mediainfo for the correct audio stream inside the video.

Thursday, October 20, 2016

Fix installation problems with aptitude

sudo apt-get install aptitude

sudo aptitude --full-resolver -f install

Thursday, October 13, 2016

Create pdf from multiple images

Put all png files in a directory, open terminal there and run

convert png.* out.pdf

Replace extension accordingly/

To add all images from that directory into one pdf use

convert *.* out.pdf

Download Google Books

git clone https://github.com/tokland/pysheng
cd pysheng
sudo python setup.py install
It is installed by default in the home directory. But then it can be moved anywhere and launched by executing /pysheng/bin/pysheng-gui. Path to that could be added into a launcher (desktop file) put in ~/.local/share/applications

Each page is downloaded as a separate png file. To create one pdf book out of it, see HERE.