Pandown icon indicating copy to clipboard operation
Pandown copied to clipboard

Filters

Open twsh opened this issue 10 years ago • 2 comments

Unless I've missed it, there's no way to use a Pandoc filter with Pandown, like having --filter=foo.py on the command line. I would quite like to be able to.

twsh avatar Nov 21 '14 23:11 twsh

I see that this issue is quite old but I just found a solution so I thought I'd post it.

I just found out that this is indeed possible (although it's not documented). You can just add a "filter": "foo.py" in the Pandown.sublime-settings (or the project settings file). You can also use a list. I use a the zotxt filter together with citeproc to convert Zotero citations and searched for hours for a solution to use it. Then I saw in the pandownBuildCommand.py file that the build command iterates over everything in the command arguments section and appends it to the pandoc command. My Pandown.sublime-settings file now looks like:

{
    "preprocess_critic": true,
    "pandoc_arguments":
    {
        "command_arguments":
        {
            "csl": "/home/mfykoops/texts/styles/apa",
            "filter":
            [
                "pandoc-zotxt",
                "pandoc-citeproc"
            ],
        }
    }
}

Long story short: The functionality is there but it's undocumented. Maybe an explanation of how the build command just adds anything under command line (and not just the options explained there) could be added to the commentary in the default config?

MFykoopS avatar Jun 25 '15 09:06 MFykoopS

Thank-you!

twsh avatar Jun 25 '15 17:06 twsh