Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
What is happening?

Michael Miller mnm364

💭
What is happening?
  • Yext
  • United States
View GitHub Profile
@mnm364
mnm364 / README.md
Last active Apr 27, 2019
Pandoc: Convert DOT to TikZ
View README.md

Pandoc: Convert DOT to TikZ

Using Pandoc's Lua AST manipulation, we can convert DOT blocks into TikZ during compile time, and then have LaTeX generate a graph rendering.

Running

An example command that uses this filter

pandoc --pdf-engine=xelatex --lua-filter ./dot2tex.lua -o out.pdf in.md
@mnm364
mnm364 / composable_actions.py
Last active Aug 8, 2017
Composable Python argparse actions
View composable_actions.py
import argparse
def compose_actions(*actions):
"""Compose many argparse actions into one callable action.
Args:
*actions: The actions to compose.
Returns:
argparse.Action: Composed action.
You can’t perform that action at this time.