dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles # fast
git clone https://src.adamsgaard.dk/dotfiles.git # slow
Log | Files | Refs | README | LICENSE Back to index

txt2pdf (262B)


      1 #!/bin/sh
      2 if [ $# -lt 1 ]; then
      3 	printf 'usage: %s <file.txt>\n' "${0##*/}" >&2
      4 	exit 1
      5 fi
      6 
      7 fontsize=11
      8 
      9 for f in "$@"; do
     10 	enscript "$f" -Bf "Courier${fontsize}" \
     11 		-I "cat %s | iconv -c -f utf-8 -t iso-8859-1//translit" -p - \
     12 		| ps2pdf - "${f%.*}.pdf"
     13 done