# download release from github: https://github.com/monostream/tifig/releases and install at ~/tools/tifig | |
# then run these commands in the folder (just to keep things simple we normalize the file extension case before proceeding). | |
for f in *.HEIC; do mv "$f" "`echo $f | sed s/.HEIC/.heic/`"; done | |
for file in *.heic; do echo "~/tools/tifig -v -p $file ${file/%.heic/.jpg}"; done |
To execute the tifig command directly I changed the script.
#!/bin/sh
# download release from github: https://github.com/monostream/tifig/releases and install at ~/tools/tifig
# then run these commands in the folder (just to keep things simple we normalize the file extension case before proceed$
for file in *.heic
do
echo $file | xargs /home/josi/Downloads/tifig-static-0.2.2/tifig -v -p $file ${file%.heic}.jpg
done
\ls *heic | while read f; do unexif/tifig -i "$f" -o "unexif/${f%.heic}.jpg"; done
This is awesome, this tool saved my photo library.
Modified it a bit to execute the commands, operate recursively on a specified root directory, and skip any files that have already been converted. https://gist.github.com/mrmcwake/6d22eee12e8261e75743019c9219f4bc
Hooking it to a cron job to automatically convert any uploaded heics.
@Tigermatze In two lines
# download release from github: https://github.com/monostream/tifig/releases and install at ~/Downloads/tifig-static-0.2.2/tifig
for f in *.HEIC; do mv "$f" "`echo $f | sed s/.HEIC/.heic/`"; done
for file in *.heic; do echo $file | xargs ~/Downloads/tifig-static-0.2.2/tifig -v -p $file ${file%.heic}.jpg; done
for image in *.HEIC; do tifig -v -p $image basename \$image .HEIC
.JPG; done
for f in *.HEIC; do convert "$f" "${f%.HEIC}.jpg"; touch "${f%.HEIC}.jpg" -r "$f"; done
Copy file modification times as well.
how to use this?
im a noob.
Thanks for the script, but it has to be changed a little in case there are files with white spaces.