Is it possible to write a custom converter for Pandoc?
pandoc
Solution
There's no easy way to do this with current pandoc, but the next version of pandoc will contain code that allows you to write custom writers with a bit of easy lua scripting. (The code for this is already in the `master` branch in http://github.com/jgm/pandoc.) You'll be able to do
pandoc -t myfunkyformat.lua myfile.md
Here's an example of what a custom writer script might look like: https://github.com/jgm/pandoc/blob/master/data/sample.lua
You can use the code now if you compile from source: https://github.com/jgm/pandoc/wiki/Installing-the-development-version-of-pandoc
Problem
Is it possible to write a custom output writer for Pandoc? For example, suppose I want to convert a document: ``` pandoc -f markdown -t myCustomMarkup asdf.md ``` Does Pandoc have a way I can specify the conversion rules for `myCustomMarkup`? (e.g. I could specify that text that had the 'bold' attribute should map to `<bold>text</bold>`, and so on for all features/attributes that Pandoc recognises). Can anyone point me to some documentation as to how I can implement my own? I can't seem to find any mention of this. (Additionally, is there a way to "plug in" a writer defined in a file without having to (say) re-compile pandoc? e.g. `pandoc -f markdown -t myCustomMarkup --writerpath=path/to/my/writer asdf.md`)