Created
April 6, 2010 10:29
-
-
Save scottwb/357446 to your computer and use it in GitHub Desktop.
Previews a markdown file in the browser.
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
#!/usr/bin/env ruby | |
# | |
# Previews a markdown file in the browser. | |
# | |
# Usage: markdown <filename> | |
# | |
# Requires: gem install maruku | |
# | |
infile = ARGV[0] | |
outfile = ARGV[0].split('.').first + '.html' | |
system "maruku #{infile}" | |
system "open #{outfile}" | |
sleep 2 | |
system "rm -f #{outfile}" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment