Created
March 13, 2014 16:11
-
-
Save GallagherCommaJack/9531391 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| #!/bin/zsh | |
| # This is a script to take literate haskell code with markdown syntax throughout and turn it into pure HTML | |
| # Just put it in your path and run blcm | |
| hscolour -html -lit $1 > "$2" # colorizes the document, -html specifies the format, -lit says this is literate code | |
| if [ "$3" = "-s" ] # Same as the -s argument to pandoc | |
| then | |
| pandoc -f markdown -t html "$2" > "$2.html" -Ss # Pandoc is a wonderful thing | |
| else | |
| pandoc -f markdown -t html "$2" > "$2.html" -S | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment