Skip to content

Some pandoc filters in python/haskell that I've scratched together (for learning purposes)

Notifications You must be signed in to change notification settings

mathematicalcoffee/pandocfilters

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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)

About

Some pandoc filters in python/haskell that I've scratched together (for learning purposes)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published