Skip to content

Instantly share code, notes, and snippets.

@sasasin
Created October 18, 2012 10:32
Show Gist options
  • Save sasasin/3910917 to your computer and use it in GitHub Desktop.
Save sasasin/3910917 to your computer and use it in GitHub Desktop.
ZIP書庫をPDFに変換するスクリプトです。dir2pdf.sh,jpg2pdf.pl,pdfdirectionを併せてセットアップする必要があります。
#!/bin/sh
ls "$@" | while read f; do
echo "converting $f "
sleep 1
OUTDIR=zip2pdf.$(date +%Y%m%d.%H%M%S)
mkdir "${OUTDIR}"
unzip -q -o -j "$f" -d "${OUTDIR}"
rm -f "${OUTDIR}".pdf
dir2pdf.sh "${OUTDIR}"
rm -rf "${OUTDIR}"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment