This looks very promising, thank you for the package.

One thing that is missing from pandocfilters is the ability to easily manipulate sequences of elements rather than single ones. Something like (pseudo code):

    if type(elem) == "Quoted" and type(next.elem) == "Cite":

there was a library aiming at this functionality, pandocpatterns[^1], but it hasn't been updated in a while, and I personally never could make it work.

Do you think that it would be possible to implement this in panflutes?

[^1]: https://bitbucket.org/elliottslaughter/pandocpatterns ; discussed on the list here : https://groups.google.com/forum/#!searchin/pandoc-discuss/pandocpatterns/pandoc-discuss/NsEGkTN4fnk/Y520jtQ5EzkJ

Le mardi 26 avril 2016 17:20:47 UTC+2, Wagner Macedo a écrit :
Agree. I checked some of the documentation and I'm impressed, it's a very good job.

I'll try in the following days to convert some of my current scripts to panflute and I'll let you know.

--
Wagner Macedo

On 26 April 2016 at 12:00, Sergio Correia <sergio....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Did a quick check of the whatsnew for 3.3, 3.4 and 3.5 and it seems I'm not using features specific to any of these sub versions. That said, for big documents it might be faster to have 3.5+ because OrderedDict was rewritten in C.

On Tuesday, April 26, 2016 at 5:36:32 AM UTC-4, Wagner Macedo wrote:

Excellent, congratulations for the effort.

What subversion of Python 3 is targeted?

Em 26/04/2016 02:12, "Sergio Correia" <sergio....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> escreveu:
Dear all,

After being a heavy user of pandocfilters.py for a few years, I wrote an alternative package (with a very similar API) that takes a more pythonic approach:

  • Elements are proper objects (with properties and methods) instead of dicts and lists
  • Elements can be created using named arguments: Header(Str('The'), Space, Str('Title'), level=1)
  • Batteries are included: I included functions that I ended up reusing through my different filters\
The source and documentation is here: https://github.com/sergiocorreia/panflute . It currently uses Python 3 but if there is demand from Python 2 users we could try a port.

Ports of some of the existing filters are here: https://github.com/sergiocorreia/panflute/tree/master/examples/panflute

More examples will be placed here: https://github.com/sergiocorreia/panflute-filters

Feel free to comment here or on github; any suggestions or pull requests are more than welcome :)

Best,
Sergio

--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discus...@googlegroups.com.
To post to this group, send email to pandoc-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/b6a8c6cf-cae7-403a-99e9-4e170a150428%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discus...@googlegroups.com.
To post to this group, send email to pandoc-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/5ee6e6e1-8e2e-450d-b793-c0464e4be449%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/bbc35e99-d664-45d4-b80a-a0847c298331%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.