From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/31720 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Lu=C3=ADs_de_Sousa?= Newsgroups: gmane.text.pandoc Subject: Re: Multiple HTML file (chunked) output with template Date: Wed, 9 Nov 2022 08:03:40 -0800 (PST) Message-ID: <1ef6858a-0a37-4f5f-a88b-eff2479a8130n@googlegroups.com> References: <264eeee0-68c8-4389-a5c5-12563c6926f6n@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_4320_489716375.1668009820720" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2374"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCOZLZGK4QDBBXU6V6NQMGQERBRHN3I-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Wed Nov 09 17:03:47 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-ot1-f60.google.com ([209.85.210.60]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1osnYI-0000QR-KV for gtp-pandoc-discuss@m.gmane-mx.org; Wed, 09 Nov 2022 17:03:46 +0100 Original-Received: by mail-ot1-f60.google.com with SMTP id 64-20020a9d0846000000b0066cba79be7asf5214557oty.6 for ; Wed, 09 Nov 2022 08:03:46 -0800 (PST) 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-sender :mime-version:subject:references:in-reply-to:message-id:to:from:date :sender:from:to:cc:subject:date:message-id:reply-to; bh=wjnG7HiyzxEkllc0OVO3dMWNBLrAiW+elYevMC5fT+E=; b=tnit7xpUJBpJRy96h+Z09xLA/BQ568Yi3xE085wEX8cvgL/boN2NPZPmmvj2Vmsmut KjHFWLQEGd3284KEuz69MCwDVNDgzMyviUDMRHEyRe+DdPdvcXMmTBUCIiJkVfl5bpQi Ezxu+YJCD1K0rVQc8Cxz+Tyi76P7UbNNVtDvC6KtyNeHdHgfGP0r3X1YDfAGosKQ0FRe 8m6x/dAFuydX35Xdn9Mlx7K9AvoK+JQc7dwPk1BMYNvDdwWdEQdVBDth17E56HpveV48 Aidbju8ShgEhQX6e5Ba50BIX2uCShpVV1BSBehwjpkHTFtqgIrB+QP0RvhOze/07uD+5 gcIQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:references:in-reply-to:message-id:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=wjnG7HiyzxEkllc0OVO3dMWNBLrAiW+elYevMC5fT+E=; b=HmBnSjf3/qVH21SrF9oZBUy3p2lmujtmYQ79nw1SmICYn5EZIFa7XuPT4eaZipyPG1 oZtyCoufAA3BmGlVVFM4gXgGkmGGYrc35aSnOfX91TPC+CTLXj6GdcUorIuA4WhMTt51 4DbXwf68Y1bP17A7MpUJ8SDowfvP/Q3W8S+Ox7gf6QYKtTbJEUWB2656f4ja6NoYeXKF u+EZOj9afZq1fiO+eHT9dXCxzgvTrBHYOL6go4ITu6Fdx/fuvJjgjScJ0OQUVqkLrT28 TQ7GHkrqvWEQMzAk904C+/MGov5pZKoToZSAjwjXGMjhJD+vijDqY+JZ9K53u32StMQW ABfQ== 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-sender:mime-version:subject:references:in-reply-to :message-id:to:from:date:x-gm-message-state:sender:from:to:cc :subject:date:message-id:reply-to; bh=wjnG7HiyzxEkllc0OVO3dMWNBLrAiW+elYevMC5fT+E=; b=ePCYWTvT3Lm0Adasjev+wu3zeKB/qivdRtxxDdexZ7p2+nBUgoS0o4mkf9gaiz+ujp b5VJd1PT50XHUJJUFYcaZp4rI0B6+sEm956tdD2D+UTPaQ+fuefFxAPq3G1nYtwFrybN nNWoqz0Xv6jy4x6S8HmUR7gmbgmHLmT5s83iQOnpe3U6Fb5kH0vMfaqTLOYRnSnImmKi 6Xr44iX/VnOV3dSHNWD7RSNr1Tl4UhFZMMQuP1P3qdPYxcGZJumOAIJ9SLxvCAXw1KIU O7QtcNgHZbmnMk2Q6XlMz+/fN+4KmqFwt1+OrjtzNrLjZFB5CTCaVfAHQ3Bfo6ZQKzbq k4XA== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: ACrzQf3/HBfBBa+fF9Pi7miTkXak2yurefBl+7A+LQWaT1XrWEo2YoSh OVD/g70q5dCP1ZV9sJ26o7M= X-Google-Smtp-Source: AMsMyM6MnWNSaWUKlBp5DHf9lQ1YGeqiftT30uNz/i3jCN19fmm6ExcK/IK+X+wlEbK9LkXBpTc85w== X-Received: by 2002:a05:6870:450e:b0:13c:39cd:5ad0 with SMTP id e14-20020a056870450e00b0013c39cd5ad0mr786207oao.143.1668009825395; Wed, 09 Nov 2022 08:03:45 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6870:c813:b0:13d:3bac:62b8 with SMTP id ee19-20020a056870c81300b0013d3bac62b8ls5892146oab.5.-pod-prod-gmail; Wed, 09 Nov 2022 08:03:41 -0800 (PST) X-Received: by 2002:a05:6870:c994:b0:131:ec37:2451 with SMTP id hi20-20020a056870c99400b00131ec372451mr832380oab.98.1668009821682; Wed, 09 Nov 2022 08:03:41 -0800 (PST) In-Reply-To: X-Original-Sender: Luis.A.de.Sousa-Re5JQEeQqe8AvxtiuMwx3w@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:31720 Archived-At: ------=_Part_4320_489716375.1668009820720 Content-Type: multipart/alternative; boundary="----=_Part_4321_1700832357.1668009820720" ------=_Part_4321_1700832357.1668009820720 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thank you very much for sharing, that looks very promising. Pandoc can't run the script though, says it can't find the utils package. I= =20 installed luarocks and with it lua-utils but the error prevails: $ pandoc multi-test.md -t html-multi-writer.lua -o output/multi-test.html Error running Lua: html-multi-writer.lua:21: module 'utils' not found: no field package.preload['utils'] no file '/usr/local/share/lua/5.4/utils.lua' no file '/usr/local/share/lua/5.4/utils/init.lua' no file '/usr/local/lib/lua/5.4/utils.lua' no file '/usr/local/lib/lua/5.4/utils/init.lua' no file './utils.lua' no file './utils/init.lua' no file '/usr/local/lib/lua/5.4/utils.so' no file '/usr/local/lib/lua/5.4/loadall.so' no file './utils.so' stack traceback: html-multi-writer.lua:21: in main chunk P.S.: would you consider creating a repository for this work? I would like= =20 to automate the second stage with bash, shouldn't be too hard. On Monday, 7 November 2022 at 15:46:58 UTC+1 wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org=20 wrote: > I've created this gist:=20 > https://gist.github.com/wlupton/2fc23fc1c4e4b4899121bfafc0fea4bf > > I added a README.md and hope that there's enough info to get going.=20 > Please let me know if not. > > (Please note that this writer does some other things too, which might nee= d=20 > to be stripped out. Also, it's an old-style writer... I haven't got aroun= d=20 > to updating it yet,) > > On Mon, 7 Nov 2022 at 09:22, Lu=C3=ADs de Sousa wr= ote: > >> Hi there. That is precisely the kind of output I would like to have.=20 >> Similar to what tools like mdBook produce. I would be glad if you could= =20 >> share more details on that custom writer. >> >> Thank you and regards. >> >> On Friday, 4 November 2022 at 17:51:24 UTC+1 wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org= =20 >> wrote: >> >>> See https://usp.technology/specification for an example of how the=20 >>> Broadband Forum has recently been publishing some specs. This output is= =20 >>> generated via an html-multi-writer.lua custom writer that contains the= =20 >>> logic for splitting the output into multiple files (based on header lev= el=20 >>> and/or specific classes). The writer also takes care of generating the= =20 >>> navigation bar that you see at the top and bottom of the pages. The=20 >>> multiple files are then passed through pandoc again (to add the overall= =20 >>> sidebar ToC and the top/bottom navigation bars, and to generate multipl= e=20 >>> standalone docs). >>> >>> Please let me know if you'd like more details (the overall setup is not= =20 >>> very easily shareable, because it's heavily dependent on rather complic= ated=20 >>> make rules, but I could probably share the custom writer and give some= =20 >>> example command lines.) >>> >>> On Fri, 4 Nov 2022 at 12:45, Lu=C3=ADs de Sousa = wrote: >>> >>>> Dear all, >>>> >>>> I am currently working on a long document that must served as a web=20 >>>> page. The single file output is becoming too slow and cumbersome for= =20 >>>> readers. I am aware this functionality is not available, but a Feature= =20 >>>> Request is open [0].=20 >>>> >>>> In that issue there are some hints to this issue being addressable wit= h=20 >>>> a template [1]. I have tried many HTML templates, but never seen one t= hat=20 >>>> would split a long document in a set of small files. Would there be an= =20 >>>> example somewhere I could follow? Otherwise, could someone provide a= =20 >>>> general idea of how such template would function? >>>> >>>> Thank you. >>>> >>>> [0] https://github.com/jgm/pandoc/issues/6122 >>>> >>>> [1] https://github.com/jgm/pandoc/issues/6122#issuecomment-583593340 >>>> >>>> --=20 >>>> You received this message because you are subscribed to the Google=20 >>>> Groups "pandoc-discuss" group. >>>> To unsubscribe from this group and stop receiving emails from it, send= =20 >>>> an email to pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>> To view this discussion on the web visit=20 >>>> https://groups.google.com/d/msgid/pandoc-discuss/264eeee0-68c8-4389-a5= c5-12563c6926f6n%40googlegroups.com=20 >>>> >>>> . >>>> >>> --=20 >> You received this message because you are subscribed to the Google Group= s=20 >> "pandoc-discuss" group. >> To unsubscribe from this group and stop receiving emails from it, send a= n=20 >> email to pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> > To view this discussion on the web visit=20 >> https://groups.google.com/d/msgid/pandoc-discuss/cb3753d7-e845-4a72-a1aa= -e93086a32f11n%40googlegroups.com=20 >> >> . >> > --=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/1ef6858a-0a37-4f5f-a88b-eff2479a8130n%40googlegroups.com. ------=_Part_4321_1700832357.1668009820720 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thank you very much for sharing, that looks very promising.

<= div>Pandoc can't run the script though, says it can't find the utils packag= e. I installed luarocks and with it lua-utils but the error prevails:=

$ pandoc multi-test.md -t html-multi-writer.lua -o outp= ut/multi-test.html
Error running Lua:
html-multi-writer.lua:21: modul= e 'utils' not found:
    no field package.preload['utils']
=     no file '/usr/local/share/lua/5.4/utils.lua'
   = no file '/usr/local/share/lua/5.4/utils/init.lua'
    no file= '/usr/local/lib/lua/5.4/utils.lua'
    no file '/usr/local/li= b/lua/5.4/utils/init.lua'
    no file './utils.lua'
  =   no file './utils/init.lua'
    no file '/usr/local/lib/= lua/5.4/utils.so'
    no file '/usr/local/lib/lua/5.4/loadall.= so'
    no file './utils.so'
stack traceback:
  &nb= sp; html-multi-writer.lua:21: in main chunk

P.S.: would y= ou consider creating a repository for this work? I would like to automate t= he second stage with bash, shouldn't be too hard.

On Monday, 7 N= ovember 2022 at 15:46:58 UTC+1 wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org wrote:
=
I'= ve created this gist:=C2=A0https://gist.gi= thub.com/wlupton/2fc23fc1c4e4b4899121bfafc0fea4bf

I = added a README.md and hope that there's enough info to get going. Pleas= e=C2=A0let me know if not.

(Please note that this = writer does some other things too, which might need to be stripped out. Als= o, it's an old-style writer... I haven't got around to updating it = yet,)

On Mon, 7 Nov 2022 at 09:22, Lu= =C3=ADs de Sousa <luis.a....@= gmail.com> wrote:
Hi there. That is precisely the k= ind of output I would like to have. Similar to what tools like mdBook produ= ce. I would be glad if you could share more details on that custom writer.<= div>
Thank you and regards.

On Friday, 4 November 2022 at 17:51= :24 UTC+1 wlu...@broadband-forum= .org wrote:
=
See=C2=A0https://usp.technology/specification for an example of how the = Broadband Forum has recently been publishing some specs. This output is gen= erated via an html-multi-writer.lua custom writer that contains the logic f= or splitting the output into multiple files (based on header level and/or s= pecific classes). The writer also takes care of generating the navigation b= ar that you see at the top and bottom of the pages. The multiple files are = then passed through pandoc again (to add the overall sidebar ToC and the to= p/bottom navigation=C2=A0bars, and to generate multiple standalone docs).

Please let me know if you'd like more details= =C2=A0(the overall setup is not very easily shareable, because it's hea= vily dependent on rather=C2=A0complicated make rules, but I could probably = share the=C2=A0custom writer and give some example command=C2=A0lines.)

On Fri, 4 Nov 2022 at 12:45, Lu=C3=ADs d= e Sousa <luis.a....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Dear all,

I am currently working on a long do= cument that must served as a web page. The single file output is becoming t= oo slow and cumbersome for readers. I am aware this functionality is not av= ailable, but a Feature Request is open [0].=C2=A0

= In that issue there are some hints to this issue being addressable with a t= emplate [1]. I have tried many HTML templates, but never seen one that woul= d split a long document in a set of small files. Would there be an example = somewhere I could follow? Otherwise, could someone provide a general idea o= f how such template would function?

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/264eeee0-= 68c8-4389-a5c5-12563c6926f6n%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pandoc-discus...@googleg= roups.com.

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d= /msgid/pandoc-discuss/1ef6858a-0a37-4f5f-a88b-eff2479a8130n%40googlegroups.= com.
------=_Part_4321_1700832357.1668009820720-- ------=_Part_4320_489716375.1668009820720--