Skip to content

Instantly share code, notes, and snippets.

@drslump
Created July 5, 2012 09:31
Show Gist options
  • Save drslump/3052592 to your computer and use it in GitHub Desktop.
Save drslump/3052592 to your computer and use it in GitHub Desktop.
Preview markdown files in the terminal using ruby's ronn
#!/bin/sh
if [ "$1" = "" ]
then
echo "Usage: $0 path/to/filename.markdown"
exit
fi
tmpfile=`mktemp -t ronn`
/usr/local/lib/ruby/gems/1.9.1/gems/ronn-0.7.3/bin/ronn -r --pipe $1 > $tmpfile
man $tmpfile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment