# 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 |
Hey, I found this as I've been downloading my icloud photos library to my linux box, and found some HEIC files that don't open in much. I'm able to run the commands in a dir that has the HEIC files, but I don't see where the new files are put, if they're put anywhere. Please see below:
manderso@manderso-desktop:/media/manderso/BU3/icloud_photos/2018/02/04$ for file in *.heic; do echo "~/tools/tifig -v -p $file ${file/%.heic/.jpg}"; done
~/tools/tifig -v -p IMG_1769-original.heic IMG_1769-original.jpg
~/tools/tifig -v -p IMG_1770-original.heic IMG_1770-original.jpg
manderso@manderso-desktop:/media/manderso/BU3/icloud_photos/2018/02/04$ ls -al
total 6524
drwxrwxr-x 2 manderso manderso 4096 Jul 20 10:04 .
drwxrwxr-x 9 manderso manderso 4096 Jul 19 19:16 ..
-rw-rw-r-- 1 manderso manderso 3178578 Jul 19 19:16 IMG_1769-original.heic
-rw-rw-r-- 1 manderso manderso 3488462 Jul 19 19:16 IMG_1770-original.heic
What did I do wrong here?
Thanks
edit: NM, I didn't chmod the bin. Thanks again.
@manderso7 That shell line above does not execute tifig but only creates a list of commands you have to execute. You could pipe the lines to a script and execute it.
$> for file in *.heic; do echo "~/tools/tifig -v -p $file ${file/%.heic/.jpg}"; done > do.sh
$> . do.sh
works for me
Thanks for the script, but it has to be changed a little in case there are files with white spaces.
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.
Awesome. No dependancies, no PPA downloads. Just works fine.