Skip to content

Instantly share code, notes, and snippets.

@GallagherCommaJack
Created March 13, 2014 16:11
Show Gist options
  • Select an option

  • Save GallagherCommaJack/9531391 to your computer and use it in GitHub Desktop.

Select an option

Save GallagherCommaJack/9531391 to your computer and use it in GitHub Desktop.
#!/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