Skip to content

Instantly share code, notes, and snippets.

@fonlang
Created June 6, 2017 04:40
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 fonlang/3c43e512f12d9cea2b7f2763e87661a9 to your computer and use it in GitHub Desktop.
Save fonlang/3c43e512f12d9cea2b7f2763e87661a9 to your computer and use it in GitHub Desktop.
Makefile for generating pygments css files
# make sure you already ran pip install -r requirements.txt
#
# syntax
# pygmentize -S <style> -f <formatter> [-a <arg>] [-O <options>] [-P <option=value>]
# (pygmentize documentation is pretty scattered and confusing, but the "-a" will add other classes
# to the output)
cssfiles:
pygmentize -L styles | grep \* | sed 's/\* //g' | sed 's/://g' | \
awk '{print "pygmentize -S "$$0" -O full,linenos=1 -f html -a .sourceCode > "$$0".css"}' | \
xargs -0 bash -c
clean:
rm -rf *.css
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment