snippit

creates syntax-highlighted code snippets in png or svg format.
Installation like any standard go program:

go install github.com/juliusmh/[email protected]

The snippit binary reads input from stdin, unless a positional
parameter is passed. Reading a .go file from stdin:

cat main.go | snippit --syntax go --out snippet.png

Or running for a specific file:

snippit --syntax cpp --out snippet.svg src/main.cpp

Supported themes

  • monokai-dark
    Monokai
  • solarized-dark
    Solarized

GitHub

View Github