Skip to content

Instantly share code, notes, and snippets.

@upsilon
Created October 18, 2010 09:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save upsilon/631946 to your computer and use it in GitHub Desktop.
Save upsilon/631946 to your computer and use it in GitHub Desktop.
情報処理技術者試験の過去問PDFをCBZに変換するスクリプト
#!/bin/sh
CONVOPT='-verbose -depth 8 -rotate -90 -resize 1024x600'
TMPDIR=`mktemp -d`
echo 'Extracting images...'
pdfimages $1 $TMPDIR/img
echo 'Converting PBM/PPM to PNG...'
for file in $TMPDIR/*
do
echo ' converting: ' $file
convert $CONVOPT $file $file.png
rm $file
done
echo 'Compressing images...'
name=`basename $1 .pdf`
zip $name.cbz $TMPDIR/*
echo 'Deleting temporaly files...'
rm -rf $TMPDIR
@upsilon
Copy link
Author

upsilon commented Oct 18, 2010

情報処理技術者試験の過去問題をNetWalkerにそれっぽく表示させてみた - kim_upsilonの日記:
http://d.hatena.ne.jp/kim_upsilon/20101018/1287396158

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment