Advertisement
aikikode

tune.sh

Sep 28th, 2012
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.65 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. V1=800
  4. V2=750
  5.  
  6. H1=600
  7. H2=550
  8.  
  9. mkdir ./tune &>/dev/null
  10. rm -r ./tune/* &>/dev/null
  11.  
  12. for (( c=$V1; c>=$V2; c-- ))
  13. do
  14.     convert pattern.png -crop 100x$c+0+0 -font courier -fill black -pointsize 20 -annotate +30+400 $c +repage -strip -type GrayScale -depth 4 -compress Zip -quality 100 ./tune/V$c.pdf
  15. done
  16.  
  17. for (( c=$H1; c>=$H2; c-- ))
  18. do
  19.     convert pattern.png -crop $(($c))x100+0+0 -font courier -fill black -pointsize 20 -annotate +280+50 $c +repage -strip -type GrayScale -depth 4 -compress Zip -quality 100 ./tune/H$c.pdf
  20. done
  21.  
  22. pdftk ./firstpage.pdf ./tune/*.pdf ./lastpage.pdf cat output ./tune.pdf
  23.  
  24. rm -r ./tune/* &>/dev/null
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement