Tiny Google Photos #
I like reading a lot of physical books, but I also would like to remember important details from said books. My default strategy for remembering things is to pipe them into Readwise and then Anki where I can make sure interesting pieces of information stay in my head. Unfortunately this is hard for physical books, and sometimes I want to put these pictures into Obsidian when writing recaps about what I learnt from a book. Google Photos makes this unreasonably hard (perhaps because they want to keep all your data). Every downloaded file is 10MiB which is way beyond what I need for an image with a bunch of text in it.
Here’s a tiny bash script to take the zip file Google gives you and output a bunch of tiny images:
unzip Photos-001.zip -d photos -x '*.MP4'
cd photos2
parallel 'magick "{}" -auto-orient -resize "800x800>" -quality 75 -define jpeg:dct-method=float "{}.jpg"' ::: *.HEIC
rm *.HEIC
Make sure you have GNU Parallel, ImageMagick and libheic
installed. If you run into issues, ask me ChatGPT.