public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: BPJ <melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Re: Specify pandoc filters in the meta data file ?
Date: Sat, 20 Mar 2021 12:15:23 +0100	[thread overview]
Message-ID: <CADAJKhAT65TmhFrobMCCePzXrA_ajVUakEmYcB_t=6VH6+6YMw@mail.gmail.com> (raw)
In-Reply-To: <6cfac466-2c08-4155-ab0b-3dac50c0180bn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 6264 bytes --]

The `type` field must be `lua` or `json` depending on whether the filter is
a Lua or JSON filter[^1]. The name of the filter, complete with extension,
and possibly preceded by the file system path, goes into the `path` field.
If the filter is a Lua filter and has a `.lua` extension or is a JSON
filter and does not have a `.lua` extension (since in principle JSON
filters can be written in Lua!) you can just give a string with the file
name (or full/relative path) as the list item value, so

``````yaml
filters:
  - myluafilter.lua
  - myjsonfilter.py
``````

is equivalent to

``````yaml
filters:
  - type: lua
    path: myluafilter.lua
  - type: json
    path: myjsonfilter.py
``````

[^1]: https://pandoc.org/filters.html

-- 
Better --help|less than helpless

Den lör 20 mars 2021 11:41Илья Волк <thesun409-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:

> ---
> filters:
> - type: pandoc-plot              *not working
> ---
> filters:
> - {type: pandoc-plot}          *not working
> ---
> filters:
> - pandoc-plot                      *not working
> ---
> pandoc-plot: true              *not working
> ---
> filters:
> - path: /usr/bin/pandoc-plot  *not working
> ---
>
> What i do wrong?
> суббота, 20 марта 2021 г. в 13:10:29 UTC+3, BP:
>
>> You have to use a defaults file, *not* document metadata, and you have to
>> use this format (note that it is `filters:` — *not* `filter:` and the value
>> is a list!)
>>
>> # Filters will be assumed to be Lua filters if they have <https://pandoc.org/MANUAL.html#cb18-63># the .lua extension, and json filters otherwise.  But <https://pandoc.org/MANUAL.html#cb18-64># the filter type can also be specified explicitly, as shown. <https://pandoc.org/MANUAL.html#cb18-65># Filters are run in the order specified. <https://pandoc.org/MANUAL.html#cb18-66># To include the built-in citeproc filter, use either `citeproc` <https://pandoc.org/MANUAL.html#cb18-67># or `{type: citeproc}`. <https://pandoc.org/MANUAL.html#cb18-68>filters: <https://pandoc.org/MANUAL.html#cb18-69>- wordcount.lua <https://pandoc.org/MANUAL.html#cb18-70>- type: json <https://pandoc.org/MANUAL.html#cb18-71>  path: foo.lua
>>
>>
>> See:
>>
>> https://pandoc.org/MANUAL.html#default-files
>>
>> --
>> Better --help|less than helpless
>>
>> Den fre 19 mars 2021 22:47Илья Волк <thes...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:
>>
>>> Have the same issue. I want to specified filter pandoc-plot in YAML but
>>> it does not work( (it works well by calling --filter=pandoc-plot works well
>>>
>>> вторник, 16 марта 2021 г. в 16:32:39 UTC+3, Julien Dutant:
>>>
>>>> Doesn't look like there is: using the "filters" field works in defaults
>>>> yaml files but not in the document own's yaml block. So it looks like
>>>> having a defaults file next to your source file is your best bet.
>>>>
>>>> J
>>>> On Sunday, March 14, 2021 at 1:02:40 PM UTC denis...-FfwAq0itz3ofv37vnLkPlQ@public.gmane.org wrote:
>>>>
>>>>> I don't know about document metadata, but you might want to look into
>>>>> "defaults files".
>>>>>
>>>>> Denis
>>>>>
>>>>>
>>>>>
>>>>> ________________________________________
>>>>> Von: pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> im
>>>>> Auftrag von First User <firstu...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>>>>> Gesendet: Sonntag, 14. März 2021 13:13:48
>>>>> An: pandoc-discuss
>>>>> Betreff: Specify pandoc filters in the meta data file ?
>>>>>
>>>>> Is there any field to specify the filters like pandoc-crossref,
>>>>> pandoc-include, etc I would like to use to process the file ? Something
>>>>> like
>>>>> ---
>>>>> filters:
>>>>> - pandoc-crossref
>>>>> - pandoc-include
>>>>> ...
>>>>> ---
>>>>>
>>>>> instead of having to run --filter=pandoc-crossref at the command line
>>>>> every time ?
>>>>>
>>>>> --
>>>>> 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...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<mailto:
>>>>> pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>.
>>>>> To view this discussion on the web visit
>>>>> https://groups.google.com/d/msgid/pandoc-discuss/de2d17dc-c718-460f-9bcd-099ff415337cn%40googlegroups.com
>>>>> <
>>>>> https://groups.google.com/d/msgid/pandoc-discuss/de2d17dc-c718-460f-9bcd-099ff415337cn%40googlegroups.com?utm_medium=email&utm_source=footer>.
>>>>>
>>>>>
>>>> --
>>> 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...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/pandoc-discuss/c63e8671-3542-4354-90b8-e78c290596fcn%40googlegroups.com
>>> <https://groups.google.com/d/msgid/pandoc-discuss/c63e8671-3542-4354-90b8-e78c290596fcn%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pandoc-discuss/6cfac466-2c08-4155-ab0b-3dac50c0180bn%40googlegroups.com
> <https://groups.google.com/d/msgid/pandoc-discuss/6cfac466-2c08-4155-ab0b-3dac50c0180bn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CADAJKhAT65TmhFrobMCCePzXrA_ajVUakEmYcB_t%3D6VH6%2B6YMw%40mail.gmail.com.

[-- Attachment #2: Type: text/html, Size: 13260 bytes --]

      parent reply	other threads:[~2021-03-20 11:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <AQHXGMt/t2fgUVIzdUyLmaptm7kdt6qDcsKh>
2021-03-14 12:13 ` First User
     [not found]   ` <de2d17dc-c718-460f-9bcd-099ff415337cn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-03-14 13:02     ` AW: " denis.maier-FfwAq0itz3ofv37vnLkPlQ
     [not found]       ` <3a2b0c38766d45eb8e2a319f800691cb-FfwAq0itz3ofv37vnLkPlQ@public.gmane.org>
2021-03-16 13:32         ` Julien Dutant
     [not found]           ` <13dfffc4-8302-4a55-8317-37524257f62en-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-03-19 21:46             ` Илья Волк
2021-03-19 21:47             ` Илья Волк
     [not found]               ` <c63e8671-3542-4354-90b8-e78c290596fcn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-03-20 10:10                 ` BPJ
     [not found]                   ` <CADAJKhDOgmcEe7iAUrwoj0abo+ry+bnWSNjj5b4K1P0FW1VexA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2021-03-20 10:40                     ` Илья Волк
     [not found]                       ` <6cfac466-2c08-4155-ab0b-3dac50c0180bn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-03-20 11:15                         ` BPJ [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CADAJKhAT65TmhFrobMCCePzXrA_ajVUakEmYcB_t=6VH6+6YMw@mail.gmail.com' \
    --to=melroch-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).