Created
June 6, 2017 04:40
-
-
Save fonlang/3c43e512f12d9cea2b7f2763e87661a9 to your computer and use it in GitHub Desktop.
Makefile for generating pygments css files
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
# 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