Skip to content

Instantly share code, notes, and snippets.

@joyrexus
Created October 16, 2012 14:49
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 joyrexus/3899749 to your computer and use it in GitHub Desktop.
Save joyrexus/3899749 to your computer and use it in GitHub Desktop.
Shell function to convert a restructuredText file to HTML
# Convert restructuredText file to HTML
#
# Usage:
# rst2html file.rst
#
# Notes:
# Add to .bashrc
# Set stylesheet path and/or default stylesheet
# Source .bashrc
rst2html () {
FILE=$(echo $1 | sed s/rst/html/)
rst2html.py --stylesheet-path $CSS/default.css $1 >| $FILE
open $FILE
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment