Skip to content

Instantly share code, notes, and snippets.

View mnm364's full-sized avatar
💭
What *is* happening?

Michael Miller mnm364

💭
What *is* happening?
View GitHub Profile
@mnm364
mnm364 / composable_actions.py
Last active April 1, 2021 16:52
Composable Python argparse actions
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.
@mnm364
mnm364 / README.md
Last active April 27, 2019 14:53
Pandoc: Convert DOT to TikZ

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