Created
December 16, 2012 19:38
-
-
Save Boldewyn/4311962 to your computer and use it in GitHub Desktop.
Show a Markdown file rendered in the browser. The `markdown` program as well as `base64` must be installed. Assumes, that `x-www-browser` is correctly configured.
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/bash | |
MDFILE=$1 | |
x-www-browser $(markdown "$MDFILE" | base64 -w0 | \ | |
cat <(echo -n "data:text/html;charset=UTF-8;base64,") -) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment