function mk2pdf() { if [[ ! -f $1 ]]; then echo "Please give a markdown file." echo "eg: mk2pdf ./source.md" return fi
marked $1 | wkhtmltopdf --footer-spacing 2 --footer-right '[page]/[topage]' --footer-line --footer-font-size 10 --footer-center 'Generate by Jimmy' --quiet --encoding utf-8 - "$1.pdf"
echo "PDF: $1.pdf" }
|