nsbin/txt2pdf
Nico Schottelius df2daf524d init
Signed-off-by: Nico Schottelius <nico@manager.schottelius.org>
2017-07-19 17:15:41 +02:00

13 lines
241 B
Bash
Executable file

#!/bin/sh
filename=$1; shift
outfilename=${filename%.txt}.pdf
if [ $# -eq 1 ]; then
title=$1; shift
set -- -b "$title"
else
set -- -B
fi
iconv -f utf8 -t iso8859-1 < "$filename" | enscript -o - "$@" | ps2pdf - "$outfilename"