From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/32090 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: ChrisD Newsgroups: gmane.text.pandoc Subject: Re: How to process chunkedhtml output with Lua Date: Wed, 25 Jan 2023 10:17:22 -0700 Message-ID: <84b97b97-8fe6-fb71-7d97-6ee0733b5763@intielectronics.com> References: <35211aad-9b34-1c74-b25f-c2c3777da632@intielectronics.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8908"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.7.0 To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBDHMHIETYAGRBKGIYWPAMGQEI5E3KXA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Wed Jan 25 18:17:32 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-lf1-f63.google.com ([209.85.167.63]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pKjOu-0002Av-Uw for gtp-pandoc-discuss@m.gmane-mx.org; Wed, 25 Jan 2023 18:17:32 +0100 Original-Received: by mail-lf1-f63.google.com with SMTP id w2-20020ac24422000000b004b567ec0ec1sf8398952lfl.15 for ; Wed, 25 Jan 2023 09:17:32 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1674667052; cv=pass; d=google.com; s=arc-20160816; b=L8+hHrU+BBfgpsiT8IuwnM6vFuqiGLA7uUL2TLeyFhbkFn1p9erCyVQjy7UDdc8s49 KK2qBW4l+uScW8aq8i4xXzODmYDd+j3/s39WdSdfU0L3xCDPaaFLqs7w9+UcNd4rdHKO Q4PLx2FF0uwcY8nSifnpktacAfa86n6ws/Q8YZyvQmvNMB6DyNhXzEIrlpdA4KukAIC/ 5k+PpyiMktWcnyYvZLP8xlNsJnRTcCMs+Nb4Q3aZHtuVJLkiGioa1LUZkPD6Vt6VZmWd +qdsb/nqprvG+3zJDsE8vBhzaQSdiCNkEQcOg+jiLgeHwv7jB8hpgEx8dSrxPPV7EjGi kRFQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:content-transfer-encoding :in-reply-to:from:references:to:content-language:subject:user-agent :mime-version:date:message-id:sender:dkim-signature; bh=AvHzSvsas54PesPjI4/7wdSEHNd2+EdJ+Mlzm6rByAs=; b=tv/sCDO5nxVSb0mkUdel2/PHdqlEEbFy5U29xr9w9Tke3+igN89Igi25zVANBRpGtr SePhbTuflh3u0nkvD37gCEl4R7m9wL+GA+stgoBOOPfoC3zMXkEZqq5ETYr+/n3TkdW7 mC798oZ6xpqG0RnQN3ZjTR3p44hZjm9CuJyuvEgmaz5kpbSU8CoAFLaZ94OApTEe3GBp xvuBqryKnuwjGmusFExfLAWkHh805SzLqMgeY+ww4Zkock1plt5ZS9Ywu7z3A+yxoWV+ MsAG5rcXa35hZx1AIOIF8BzIXD622KHKoh3eUES5s/BG18YfqZ+HHbsA5NSdUa8B4xq8 U6eQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of cd34-gg-4SSc53hpTiu9TMao6EloiEEOCMrvLtNR@public.gmane.org designates 209.68.5.143 as permitted sender) smtp.mailfrom=cd34-gg-4SSc53hpTiu9TMao6EloiEEOCMrvLtNR@public.gmane.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender :content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=AvHzSvsas54PesPjI4/7wdSEHNd2+EdJ+Mlzm6rByAs=; b=Wmu6s1hpvIjxqZMkkrZ1aBufu+AipoMXSg61YPrasOa/OrpWhTJAyZJ0aZb+ozCJDr ZNiiM9y1YSflrrGVwZIsRifjmkSFOYjVldECEHcTVPdfFNvXczR4T4OhdKhoMzBmXaJm /HHUC7FbuiEo65FNlYjScUPEKT222mNqcE4ws4TpqifVslGDvnXDjTttJhUoZJzgy6Ig Ik4TS4P3F8JolQIyc/r2VnL214wtbgOOFdsI7jM5BrFA/xB6p9cnQjaTNJsup2KNUFXQ /4I+gACX//yMygPpg82cCdr0DkKFm2zp9ERHm X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender :content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:sender:from:to:cc:subject:date:message-id :reply-to; bh=AvHzSvsas54PesPjI4/7wdSEHNd2+EdJ+Mlzm6rByAs=; b=dGoOJjzLUFYdMrYkY45eP9a5gl/eXRqTAc+XVq12lSTQoVB/crvtfbSe3foqD6P+dg KsNMRWmBJ58apPacHx21egDf1//Yi1KDuY5xTKb3q0eCT47Cr3XNrG8ThfUFJnne0pdz 2/2O/TRIEnuWwJAaDhXJQBDbakU+inK0rzYQv/qeNUba8uKMHosWTKOo3RgukJKK8Swt ellkxS96Plfgl/4ArO18WgHzrsHsjtI26LzgyvcKdeUtANMFMg8n6qGJPPb0 Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AFqh2kqUvoeN/y926KV46DGm7pG/jPCkeTDxaWtqh9cSTEANFqu1op1/ 9JullDuNnQHeKdP3bHYP0bw= X-Google-Smtp-Source: AMrXdXuKLWCbOkqoiOUOttAeYTJb64ilMeqwFRSqwm2MqMnxElqUrWIcyVdj6z3W3qwot7yNYwA/oQ== X-Received: by 2002:ac2:508a:0:b0:4b6:eb5a:66a4 with SMTP id f10-20020ac2508a000000b004b6eb5a66a4mr2951589lfm.482.1674667052294; Wed, 25 Jan 2023 09:17:32 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6512:2082:b0:4d1:8575:2d31 with SMTP id t2-20020a056512208200b004d185752d31ls10078510lfr.0.-pod-prod-gmail; Wed, 25 Jan 2023 09:17:26 -0800 (PST) X-Received: by 2002:a05:6512:114b:b0:4a4:68b7:f863 with SMTP id m11-20020a056512114b00b004a468b7f863mr10710526lfg.7.1674667046778; Wed, 25 Jan 2023 09:17:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674667046; cv=none; d=google.com; s=arc-20160816; b=SXZ0aeA3rntwdXRGE+lvpQQqUOwxsIZu5Oz29KaWjsYATrRrPw9wmuoaG9dNwGtQyh BhGSxW7yUwokUTVrfZd2ETuUoIJuk5x8ktTGqclgm1KRcFhCMeU4AjCYscPNesBwEcMT 3az911XqJeqcS9cQ7k4Lt7jRMa+VqT9Im+Jlg/oNzdIwVkUQuxYJgn9aBh3S5rOTwZ2O L8SO2U+wf6g2AmlzBUeObnCOHvcZ6y8T4/50YAR/G/LmxsItxKmFzy/jqdcWqfdXFWxa PlTaakHI0hEQ4WNt523kBLKJBocFimaDS5fZJzFQehs7uDYjtJIQeQjMgx5hWG127Zom kqZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id; bh=icP/mV5xq71zDht4WJTj0sZECZX0tIHKYbVoYewrAQ0=; b=SMbU5VP+V8tmA4H/pgJXeqewX/DCA0TUw2PlBAAGXJ+Mo3CCDMeKumj1FipCvWD/ux GP0uE4NOL03u7KYD/HkjaRvQ2ZFdvqSOiZE9DOcQ9w1P80kkfvDZKiyTy2fpBIJT3nUe eXIGgNnuErucOyHxmdeorcTANwtjtk064ckejWe3b/yIoAmgR6xttri3SbG79f4NrBNO VpspwB2eknoCLbhNEtXsmMalnv6qGu9hWWQg3+/xy5uMlL8INRhryH7IBMpDQ5rO6Crv KxeS+v5pN986k87YI20iw1AjQO/B/UnJ4mRJjaH12l3vt+HIde2GwePorGNWe1jZwLj5 ptBQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of cd34-gg-4SSc53hpTiu9TMao6EloiEEOCMrvLtNR@public.gmane.org designates 209.68.5.143 as permitted sender) smtp.mailfrom=cd34-gg-4SSc53hpTiu9TMao6EloiEEOCMrvLtNR@public.gmane.org Original-Received: from hamza.pair.com (hamza.pair.com. [209.68.5.143]) by gmr-mx.google.com with ESMTPS id a13-20020a195f4d000000b004cb0f0982f3si317415lfj.4.2023.01.25.09.17.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Jan 2023 09:17:26 -0800 (PST) Received-SPF: pass (google.com: domain of cd34-gg-4SSc53hpTiu9TMao6EloiEEOCMrvLtNR@public.gmane.org designates 209.68.5.143 as permitted sender) client-ip=209.68.5.143; Original-Received: from hamza.pair.com (localhost [127.0.0.1]) by hamza.pair.com (Postfix) with ESMTP id E645C33E8B for ; Wed, 25 Jan 2023 12:17:24 -0500 (EST) Original-Received: from [10.104.138.18] (unknown [37.19.210.20]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by hamza.pair.com (Postfix) with ESMTPSA id AF64933E8A for ; Wed, 25 Jan 2023 12:17:24 -0500 (EST) Content-Language: en-US In-Reply-To: X-Scanned-By: mailmunge 3.10 on 209.68.5.143 X-Original-Sender: cd34-gg-4SSc53hpTiu9TMao6EloiEEOCMrvLtNR@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of cd34-gg-4SSc53hpTiu9TMao6EloiEEOCMrvLtNR@public.gmane.org designates 209.68.5.143 as permitted sender) smtp.mailfrom=cd34-gg-4SSc53hpTiu9TMao6EloiEEOCMrvLtNR@public.gmane.org Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:32090 Archived-At: On 1/21/2023 3:23 PM, John MacFarlane wrote: > >> On Jan 21, 2023, at 5:42 AM, ChrisD 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 repre= sented. 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 availab= le, 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 sitem= ap.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 th= e filter runs before the writer. > > However, in lua (via the pandoc.structure model) you have access to the f= unction pandoc will use to split up the document, so you can split it up yo= urself 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. > Thanks. I'm making some progress with this. A couple more questions: 1) pandoc.structure.split_into_chunks takes an opts parameter that has a pa= th_template value. Is there a way to get the path_template that will be use= d by the chunked html writer? 2) The pandoc.structure.table_of_contents function returns a BulletList wit= h the toc entries, but they are unnumbered even when --number-sections is t= rue. I am calling =C2=A0=C2=A0=C2=A0 pandoc.structure.table_of_contents(chunkeddoc, PANDOC_W= RITER_OPTIONS) where chunkeddoc is the output of split_into_chunks.=C2=A0 I have verified = that PANDOC_WRITER_OPTIONS.number_sections =3D true. Am I missing something= ? Is this a bug? 3) Is there a simple way to get a list of files (including the image files)= that will be included in the chunked html output folder? Maybe I can gener= ate this from the ChunkedDoc, but it's going to take some parsing. Thanks, --=20 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 e= mail 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/84b97b97-8fe6-fb71-7d97-6ee0733b5763%40intielectronics.com.