Panpipe - an Elixir wrapper around Pandoc and its Markdown AST

I’ve just released v0.1 of Panpipe, an Elixir wrapper around Pandoc and its Markdown AST.

If you don’t know what Pandoc is, you should definitely read about it: https://pandoc.org. It’s a hugely powerful Markdown tool and you can now use it easily from within Elixir esp. access the Markdown AST and do transformations on it.

Github: https://github.com/marcelotto/panpipe
Hex: https://hex.pm/packages/panpipe

8 Likes

Ooo nice!

Just markdown? Pandoc supports a lot of inputs and outputs. I’m partial to ReST for structured markdown-like’ish text personally, thus I use it a lot.

Just markdown? Pandoc supports a lot of inputs and outputs. I’m partial to ReST for structured markdown-like’ish text personally, thus I use it a lot.

You’re right, of course. But listing all of its formats would have been a little long and dry for a short description :wink: . So I decided to name just the format it’s most famous for and most people would be interested in and just link to its impressive graph of supported formats.

(BTW: Panpipe is using your ProtocolEx library under the hood.)

1 Like

Ah cool, just wondered if it was hardcoded to markdown only or if it supported everything. ^.^

Should note what it supports though, that is also very good SEO stuff. ^.^

How’s it been working for you, any comments, questions, bugs, etc…? :slight_smile:

Also, don’t think elixir’s compilers are taken from dependencies, so users might need to add compilers: Mix.compilers ++ [:protocol_ex], to their mix.exs file too.

EDIT: Looked over the code a bit, it looks like it’s just being used as a dispatcher, it’s fine for that however it’s more designed for cross-library dispatching rather than just in-library, I’m not sure forcing the users of the library to adjust their compiler field is really needed for in-single-library dispatch, so you could remove ProtocolEx in full and manually dispatch instead. The code will be a touch longer and you’ll need to manually upkeep it, but it’s not a hard task. Though that’s only if you want to get rid of the :protocol_ex compiler addition for clients and you don’t intend on ever needing cross-library dispatching. :slight_smile:

Though it wouldn’t be an issue in any case if Elixir was able to have dependencies add to the compilers list, maybe someday (would help my ASN.1 compiler plugin too)? ^.^;

ProtocolEx is working pretty fine. The only problem I encountered was the missing moduledoc false on the generated ProtocolEx_description module, but that was easily fixed.

Removing the dependency to ProtocolEx is already on my backlog (along with removing the dependency to Porcelain). Initially the whole thing was meant just for personal use, and I was caring just for ease of implementation. But to be honest I’m not sure if I’ll do it very soon, since I’m already working on something different, but would happily accept a PR from someone whom it gets in its way.

1 Like