Created
August 23, 2019 15:01
-
-
Save zelinskiy/9b784f0ce1bd8f4f6244a08a1f407ad5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
COUNTER=1 | |
PAGES=1168 | |
while [ $COUNTER -lt $PAGES ]; do | |
TO=$((COUNTER+100)) | |
if [ $TO -gt $PAGES ] | |
then | |
let TO=$PAGES | |
fi | |
/snap/bin/pdftk Breviarium.pdf cat $COUNTER-$TO output breviarium/Breviarium$COUNTER-$TO.in.pdf | |
convert -density 600 -threshold 61% breviarium/Breviarium$COUNTER-$TO.in.pdf breviarium/Breviarium$COUNTER-$TO.out.pdf | |
echo $TO/$PAGES | |
let COUNTER=$((TO+1)) | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment