public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: ChrisD <cd34-gg-4SSc53hpTiu9TMao6EloiEEOCMrvLtNR@public.gmane.org>
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: How to process chunkedhtml output with Lua
Date: Sat, 21 Jan 2023 06:42:04 -0700	[thread overview]
Message-ID: <35211aad-9b34-1c74-b25f-c2c3777da632@intielectronics.com> (raw)

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?

2. Lua custom writer: If it can't be done in a filter, can it be done using a custom writer? Where would I find the relevant data?

3. Post-processing with Lua: Pandoc can now be run as a Lua interpreter. If neither (1) nor (2) is possible, I'm thinking I could run pandoc normally to produce a chunked html output folder, and then run pandoc again with a Lua script that finds all the files in the output folder, and reads sitemap.json. This is the same approach as doing the post processing in some other language, except that we don't have to have any additional tools installed. Is there anything that would prevent this approach?

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/35211aad-9b34-1c74-b25f-c2c3777da632%40intielectronics.com.


             reply	other threads:[~2023-01-21 13:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-21 13:42 ChrisD [this message]
     [not found] ` <35211aad-9b34-1c74-b25f-c2c3777da632-4SSc53hpTiu9TMao6EloiEEOCMrvLtNR@public.gmane.org>
2023-01-21 22:23   ` John MacFarlane
     [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=35211aad-9b34-1c74-b25f-c2c3777da632@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).