Shell script to create pictures thumbnails offline
#1
You might have seen some of my posts w.r.t. offline creation of thumbnails for jpg pictures. My main kodi host, a raspberry pi3, has not enough compute power to create the thumbnails "fast" enough. Thus I have written a short shell script using sqlite3 and ImageMagick to create all thumbnails offline on a more powerful (linux) host.

This script has two major disadvantages - any filename below you pictures directory must not contain white space characters (a typical limitation for shell scripting), and as a bash shell script it will run only an a linux host.

In my environment I have a 2TB drive connected to my raspi, shared by NFS. It contains the Thumbnails folder and Texture13.db. I access those files by NFS from my linux host. Since sqlite3 does not easily support NFS, my script works on a local copy of Textures13.db and will copy it back when finished.

Just in case my script creates a backup copy of Texture13.db.

My script does have prototype character (not fool proven, no performance optimization). But since I myself plan to run it more or less only once (for my whole pictures library I do not plan major improvements.

But of cause use my script at your own risk.

Since I do not maintain any github project, I've uploaded my script via hastebin: MyThumb.sh

Store the data as file MkThumb.sh and make it executable by chmod 755 MkThumb.sh

For more details look into the script itself.

Hope it might be helpful for somebody.

Regards, Michael
Reply
#2
Just a short update: In the meantime I've upgraded to kodi matrix 19.3 from OSMC. Thus I can confirm that my script MkTumbs is also compatible with matrix.

Regards, Michael
Reply
#3
Just to let you know....your script is not available anymore as we don't store the content for ever and ever on paste.kodi.tv Wink
Reply
#4
Thanks for this information, not a problem for me. I can provide it if someone might ask for.

Regards, Michael
Reply
#5
(2021-12-30, 12:11)olwaldi Wrote: I can provide it if someone might ask for.

Pastebin.com has the option to store texts to "Never expire", which is longer than our approx 2 months.
Reply
#6
(2021-12-30, 12:11)olwaldi Wrote: Thanks for this information, not a problem for me. I can provide it if someone might ask for.

Regards, Michael

Hi olwaldi, can you provide your script ?
Many thanks
Myskin
Reply

Logout Mark Read Team Forum Stats Members Help
Shell script to create pictures thumbnails offline0