Skip to content

Instantly share code, notes, and snippets.

@harperreed
Created March 29, 2011 03:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save harperreed/891783 to your computer and use it in GitHub Desktop.
Save harperreed/891783 to your computer and use it in GitHub Desktop.
markdown preview (for osx)
#!/bin/bash
#
# Displays a preview of the markdown file passed in using rdiscount
# https://github.com/ryankanno/scripts/blob/master/mdp
# Set Markdown file
MARKDOWN_FILE=$1
# Redirect rdiscount to temp file
rdiscount ${MARKDOWN_FILE} > /tmp/mdp_preview.html
# Open temp file in browser
open /tmp/mdp_preview.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment