public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: John MacFarlane <fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: How to process chunkedhtml output with Lua
Date: Sat, 21 Jan 2023 14:23:59 -0800	[thread overview]
Message-ID: <F03F5F72-A9B2-4AFB-92D7-DFA722BE5361@gmail.com> (raw)
In-Reply-To: <35211aad-9b34-1c74-b25f-c2c3777da632-4SSc53hpTiu9TMao6EloiEEOCMrvLtNR@public.gmane.org>



> On Jan 21, 2023, at 5:42 AM, ChrisD <cd34-gg-4SSc53hpTiu9TMao6EloiEEOCMrvLtNR@public.gmane.org> wrote:
> 
> The thread "Lua filter to process chunkedhtml output" has gotten kind of side tracked with a discussion of the logging module and how data is represented. Which is fine, this is good info and I appreciate the improvements to logging.
> 
> But I'd like to get back to the question of how to process chunked html output into other formats with Lua. I don't understand what data is available, when it's available, and what data structures are used.
> 
> 1. Lua filter: I'm looking for the list of all files that will exist in the output folder, and the table of contents (essentially the data in sitemap.json). Is that data even available at the time a filer runs? If so, how do I access it?

No, because the document gets broken up in the ChunkedHTML writer, and the filter runs before the writer.

However, in lua (via the pandoc.structure model) you have access to the function pandoc will use to split up the document, so you can split it up yourself and then you should have the data, as long as the parameters you use for splitting are the same as what the writer will use.


-- 
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/F03F5F72-A9B2-4AFB-92D7-DFA722BE5361%40gmail.com.


  parent reply	other threads:[~2023-01-21 22:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-21 13:42 ChrisD
     [not found] ` <35211aad-9b34-1c74-b25f-c2c3777da632-4SSc53hpTiu9TMao6EloiEEOCMrvLtNR@public.gmane.org>
2023-01-21 22:23   ` John MacFarlane [this message]
     [not found]     ` <F03F5F72-A9B2-4AFB-92D7-DFA722BE5361-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2023-01-25 17:17       ` ChrisD
     [not found]         ` <84b97b97-8fe6-fb71-7d97-6ee0733b5763-4SSc53hpTiu9TMao6EloiEEOCMrvLtNR@public.gmane.org>
2023-01-26  0:50           ` John MacFarlane
     [not found]             ` <3F114306-007A-47CB-A067-3F7EE07900B0-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2023-01-26 17:41               ` ChrisD
     [not found]                 ` <621a843e-049e-1a2b-1c60-df3158b6dc2e-4SSc53hpTiu9TMao6EloiEEOCMrvLtNR@public.gmane.org>
2023-01-26 21:57                   ` John MacFarlane
2023-01-27 10:42                   ` BPJ

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=F03F5F72-A9B2-4AFB-92D7-DFA722BE5361@gmail.com \
    --to=fiddlosopher-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).