Created
October 16, 2012 14:49
-
-
Save joyrexus/3899749 to your computer and use it in GitHub Desktop.
Shell function to convert a restructuredText file to HTML
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
# 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