Skip to content

Instantly share code, notes, and snippets.

@ptitfred
Created October 18, 2013 13:39
Show Gist options
  • Save ptitfred/7041664 to your computer and use it in GitHub Desktop.
Save ptitfred/7041664 to your computer and use it in GitHub Desktop.
Exporter en pdf une collection de screenshot png dans le format .*_[0-9]+.png
#!/bin/bash
i=0
IFS=$'\n'
for f in $(find . -iname "*.png" | sort -k2 --field-separator=_)
do
let "i += 1"
number=$(printf "%03d" $i)
convert "${f}" slide_${number}.pdf
done
pdftk slide_*.pdf cat output slides.pdf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment