Created
September 21, 2012 07:38
-
-
Save Kazuma/3760217 to your computer and use it in GitHub Desktop.
m2p - Convert to PDF from Markdown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# m2p | |
# | |
# Convert to PDF from Markdown. | |
# | |
# Example: | |
# $ m2p foo.md | |
# Config | |
marpet=`which marpet` | |
wkhtmltopdf=`which wkhtmltopdf` | |
temp_html=`mktemp /tmp/${markdown}.XXXXX.html` | |
# Generate PDF | |
markdown=$1 | |
pdf=${markdown%%.*}.pdf | |
$marpet $markdown > $temp_html | |
$wkhtmltopdf $temp_html $pdf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment