Skip to content

Instantly share code, notes, and snippets.

@vartan
Last active August 29, 2015 14:06
Show Gist options
  • Save vartan/8ff29346c35e2a3fdae8 to your computer and use it in GitHub Desktop.
Save vartan/8ff29346c35e2a3fdae8 to your computer and use it in GitHub Desktop.
mkdir TO_PRINT
echo "Merging all $1"
for f in $1; do vim -f +"syn on" +"TOhtml" +"wq" +"q" $f; echo '<style>*{font:9pt menlo !important;}</style>' >> $f.html; mv $f.html TO_PRINT; done
wkhtmltopdf TO_PRINT/*.html TO_PRINT.pdf
rm -rf TO_PRINT
open TO_PRINT.pdf
@vartan
Copy link
Author

vartan commented Sep 18, 2014

The following example will join all verilog files as syntax-highlighted PDFs:

codeToPDF "*.v"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment