From: ChrisD <cd34-gg-4SSc53hpTiu9TMao6EloiEEOCMrvLtNR@public.gmane.org>
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: Lua filter to process chunkedhtml output
Date: Thu, 19 Jan 2023 14:32:40 -0700 [thread overview]
Message-ID: <f761231d-87ea-6bfb-38c3-99eb15184263@intielectronics.com> (raw)
In-Reply-To: <1D22B433-211B-4033-8A63-F637F52B2008-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
On 1/19/2023 10:12 AM, John MacFarlane wrote:
> sitemap.json is really for processing with external tools. If you're using a Lua filter, then you can use the new module
> https://pandoc.org/lua-filters.html#module-pandoc.structure
I started playing with this, but quickly got confused.
Inside my lua filter, pandoc.structure is nil. Is this available in a filter, or only in a custom writer? Should I be trying to write a custom writer rather than a filter?
Is there an example of getting or using the table of contents?
Also, I tried to print the value of PANDOC_WRITER_OPTIONS, but wlupton's logging.lua errors on it (bad argument #1 to 'for iterator' (table expected, got light userdata)). I the tried the debugging printer I have used in the past, kikito's inspect.lua, and it reports its value as " <userdata 1>". How do I access writer_options from a filter (for example, the toc-depth)? For what it's worth, I can print the value of PANDOC_READER_OPTIONS.
Thanks,
--
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/f761231d-87ea-6bfb-38c3-99eb15184263%40intielectronics.com.
next prev parent reply other threads:[~2023-01-19 21:32 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-19 13:44 ChrisD
[not found] ` <d5298c4a-9427-8f5b-c646-6370a3f998df-4SSc53hpTiu9TMao6EloiEEOCMrvLtNR@public.gmane.org>
2023-01-19 17:12 ` John MacFarlane
[not found] ` <1D22B433-211B-4033-8A63-F637F52B2008-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2023-01-19 17:14 ` John MacFarlane
2023-01-19 21:32 ` ChrisD [this message]
[not found] ` <f761231d-87ea-6bfb-38c3-99eb15184263-4SSc53hpTiu9TMao6EloiEEOCMrvLtNR@public.gmane.org>
2023-01-20 9:54 ` 'William Lupton' via pandoc-discuss
[not found] ` <CAEe_xxiQAz2MVihALKGes6Ai=UrOPKgkvGq19ULiLsjBhTuTbQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2023-01-20 15:46 ` Albert Krewinkel
2023-01-20 16:05 ` ChrisD
[not found] ` <fbca8e05-fed7-39e1-08f0-0498c399f33f-4SSc53hpTiu9TMao6EloiEEOCMrvLtNR@public.gmane.org>
2023-01-20 16:29 ` 'William Lupton' via pandoc-discuss
[not found] ` <CAEe_xxiJdneKg+uqja3tdaWzQSWmc5NfO0aMFKaUGa_W1U5+qg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2023-01-20 16:33 ` 'William Lupton' via pandoc-discuss
[not found] ` <CAEe_xxhhsG_NA+PL+5A2TyHHqNOC-=sdi1jX-NYunf9fsHtH1A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2023-01-21 12:28 ` 'William Lupton' via pandoc-discuss
[not found] ` <CAEe_xxjkBZfgeh5jDbZNDNrFbG4SKTA0S9qjzaEXgxTr5BZVNw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2023-01-21 12:33 ` Albert Krewinkel
[not found] ` <87fsc4koud.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
2023-01-21 17:41 ` logging.lua and 'light userdata' 'William Lupton' via pandoc-discuss
[not found] ` <CAEe_xxjsmxwx4B_f1j4buVT8P+cdVdVw4q8dbtxiuJNoXsNweQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2023-01-23 10:49 ` Albert Krewinkel
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=f761231d-87ea-6bfb-38c3-99eb15184263@intielectronics.com \
--to=cd34-gg-4ssc53hptiu9tmao6eloieeocmrvltnr@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).