bash-util/scripts/resumaker

47 lines
764 B
Text
Raw Permalink Normal View History

#!/usr/bin/env bash
: '
* Generate my resume using pandoc!
'
. "$(dirname $0)/util/logging.bash"
2024-10-03 10:48:27 -05:00
FONT='monofur for Powerline'
EXTENSION='.pdf'
read -d '' usage <<EOUSAGE
2024-10-03 10:48:27 -05:00
Usage: $0 [-h][-f FONT][-t] RESUME_FILE
OPTIONS
-f FONT Specify font by name.
-h Display this help.
2024-10-03 10:48:27 -05:00
-t Compile intermediate TeX instead of PDF.
EOUSAGE
2024-10-03 10:48:27 -05:00
while getopts 'f:ht' opt; do
case "${opt}" in
f)
FONT=$OPTARG
;;
h)
excat "$usage"
;;
2024-10-03 10:48:27 -05:00
t)
EXTENSION='.tex'
;;
*)
dedcat "$usage"
;;
esac
done
shift $((OPTIND-1))
[ -z "$1" ] && dedcat "$usage"
pandoc $1 \
2024-10-03 10:48:27 -05:00
-o $(sed 's/\(.md\)$//' <<<$1)"$EXTENSION" \
--pdf-engine=xelatex \
-V mainfont="$FONT" \
-V fontsize=9pt \
-V geometry:margin=0.75in