public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: "krulis....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <krulis.tomas.tk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Re: Lua filter reading data from metadata or defaults file
Date: Fri, 25 Sep 2020 04:36:15 -0700 (PDT)	[thread overview]
Message-ID: <9dbbc23d-1cde-4c0b-898a-ecbe4679d614n@googlegroups.com> (raw)
In-Reply-To: <87v9g2jhm4.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>


[-- Attachment #1.1: Type: text/plain, Size: 2644 bytes --]

Those are good news!

But my question might have been a little confusing.
As a follow-up, how can load and access data provided in arbitraty yaml or 
json file with lua filter? Is there any helper function for that, or I 
should just use simple `open` or something ... ?
I am looking at lua filters part in pandoc docs; example: "Replacing 
placeholders with their metadata value;" which kinda similar to my case, 
but here are just flat values. I would like to specify a filepath to yaml 
file with actual definitions. 

Dne pátek 25. září 2020 v 12:06:24 UTC+2 uživatel Albert Krewinkel napsal:

> You should be able to access `mustache` as a normal metadata field if it
> is nested under the field `metadata` in defaults.yaml:
>
> ---
> metadata:
> mustache: ./src/varDefinitions.yaml
> ---
>
>
> krulis....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org writes:
>
> > I would like to ask, whether it is possible for a lua filter to read data
> > from metadata block (or metadata file) or from defaults file? I looked
> > around website documentation, also into `lua filter repository`, but 
> found
> > no filter accessing metadata values in `defaults file` fields.
> > I am working on a custom lua filter, for which I want to specify a 
> metadata
> > field, which would point to external file with required definitions, very
> > similar to python filter `pandoc-mustache` github source here :
> > <
> https://github.com/michaelstepner/pandoc-mustache/blob/master/pandoc_mustache/pandoc_mustache.py
> >
> >
> > `defaults.yaml`:
> >
> > ```
> > ...
> >
> > mustache:
> > - ./src/varDefinitions.yaml
> >
> > ...
> > ```
> >
> > *Motivation:* Plans for this filter are to provide functionalities of 
> LaTeX
> > `glossaries` package to `pandoc`. There are already some filters, which
> > take theyre own approach to the issue, but none of them gives full 
> acronym
> > support specific to given format.
> > Long-term plans would be to also provide support for term definitions in
> > `glossaries`-like style.
> >
> > Thanks for any guidance in this issue.
> > Regards, Tomas
>
>
> --
> Albert Krewinkel
> GPG: 8eed e3e2 e8c5 6f18 81fe e836 388d c0b2 1f63 1124
>

-- 
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/9dbbc23d-1cde-4c0b-898a-ecbe4679d614n%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 3809 bytes --]

  parent reply	other threads:[~2020-09-25 11:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-25  9:36 krulis....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
     [not found] ` <8a242488-066f-4c2a-aa0a-992788fa9e93n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-09-25 10:06   ` Albert Krewinkel
     [not found]     ` <87v9g2jhm4.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
2020-09-25 11:36       ` krulis....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org [this message]
     [not found]         ` <9dbbc23d-1cde-4c0b-898a-ecbe4679d614n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-09-25 13:06           ` BPJ
     [not found]             ` <CADAJKhBkrFo1pT6UWE6qu=aAaOoMsxvNPXwHGiGoauyF-2XPnw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2020-09-25 17:23               ` krulis....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

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=9dbbc23d-1cde-4c0b-898a-ecbe4679d614n@googlegroups.com \
    --to=krulis.tomas.tk-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).