Skip to content

Instantly share code, notes, and snippets.

@aberezin
Created February 1, 2022 00:40
Show Gist options
  • Save aberezin/6f9e61f21f495c475f209930b2873dfb to your computer and use it in GitHub Desktop.
Save aberezin/6f9e61f21f495c475f209930b2873dfb to your computer and use it in GitHub Desktop.
Create difference images that represent a visual diff of two pptx files
#!/usr/bin/env bash
alias soffice=/Applications/LibreOffice.app/Contents/MacOS/soffice
shopt -s expand_aliases
soffice --headless --convert-to pdf arch1.pptx
soffice --headless --convert-to pdf arch2.pptx
convert -density 150 arch1.pdf -quality 80 'output1.jpg'
convert -density 150 arch2.pdf -quality 80 'output2.jpg'
i=0
for files in output1-*; do
compare -compose src output1-$i.jpg output2-$i.jpg diff-$i.jpg
echo -n '.'
: $((i++))
done
echo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment