Skip to content

Latest commit

 

History

History
65 lines (47 loc) · 3.4 KB

Readme.md

File metadata and controls

65 lines (47 loc) · 3.4 KB

Some pandoc filters, in haskell or python (whichever I was trying to learn).

Only just started learning Haskell but am trying to favour it for the filters (since pandoc is Haskell), but code is pretty raw.

Usage:

pandoc --filter path/to/filter  intputfile

In python, an element is like this:

{'t': (type, e.g. 'Str'), 'c': (content)}

Some Other Examples

Here are some repositories I found with Haskell pandoc filters to look at:

Here is a repository with Python pandoc filters:

Filters in this repository

Checkbox

File: checkbox.{py, hs}

pandoc --filter ./checkbox.hs checkbox.md

Convert github-style checkbox lists by replacing the [ ] and [x] with unicode U+2610 and U+2611 resp (☐ and ☑).

Todo:

  • I don't have the font in Chrome so they don't render right. Replace with format-specific (e.g. HTML checkbox, latex tickmark)