From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/30754 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: BPJ Newsgroups: gmane.text.pandoc Subject: Re: Experimenting with pandoc module using just Lua Date: Fri, 17 Jun 2022 17:35:44 +0200 Message-ID: References: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000008f42c305e1a68205" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22945"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCWMVYEK54FRBXF6WKKQMGQEV4PTFDI-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Fri Jun 17 17:36:01 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-wm1-f58.google.com ([209.85.128.58]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1o2E0u-0005eR-C1 for gtp-pandoc-discuss@m.gmane-mx.org; Fri, 17 Jun 2022 17:36:00 +0200 Original-Received: by mail-wm1-f58.google.com with SMTP id k5-20020a05600c0b4500b003941ca130f9sf1665242wmr.0 for ; Fri, 17 Jun 2022 08:36:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1655480160; cv=pass; d=google.com; s=arc-20160816; b=ERIIpFo/uPZAPltC3YsOzXBlBfhKaW1Cj5oyFzWUYHdsRcxvnFHqigScSid4YR+dJG 3PyB7I8Mh5MslRi+noVN7Gtmz5+xRe7KZWJHR0v0fPrzc23yl/Jzf79d244Eo9pPkv63 Ld/yRBY0go9V5qC6WhOJJZCHB1pUem68aL/37Tl7O+wE4+uaCildsWH+Gluq3BUaXx/w uORze57FeEc7U84se8zjCDRUy6RXrixjJLHzRx1FP5P3khrO6pyXd/uCkY+2Vp2B9VEy nik0xLrjeZ48ZoJ6nz45lPET4QDoCU7WaQ25gmDdP8ZzKXdLj03tItplFe/UCnI33h3s 5XaQ== 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:to:subject:message-id:date:from :reply-to:in-reply-to:references:mime-version:sender:dkim-signature; bh=snItbv224xnbFd3Z/KIWHI1OsmjxK+vIGI2401UhRA8=; b=n6FLvHwSMNzOldIgl2iyp4CvWiu9yYjGqae8Z68n/3sbSxMfJOLUVTulcsFQoDoNfD u82voo5QKjwV8lWbTSWin0B+nhgxZLUca4Jc9KGXcH/zUEcyaOKjrar597+1YYRgLVa8 WMvry6Yv/7evlxG/ScKNwEqhvXWORxYRAyd+xVC3HR6CqeSZOGAkXact/nGH+2eb5/fL CJKsWpGm6WZMrJV40qPOjLnnVnmmk3FBydpHmRnY938HF7rIaSs553CSjSoKN5F6YdxB Z832HTWmdyN/daw9ud68HtkUvN8u0QzKC9glO0mLtgd6Bw/X4zNJaPK/e8DQQ0wa84Bn yo2g== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 209.85.218.54 as permitted sender) smtp.mailfrom=melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:mime-version:references:in-reply-to:reply-to:from:date :message-id:subject:to:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=snItbv224xnbFd3Z/KIWHI1OsmjxK+vIGI2401UhRA8=; b=I+aE5WDtdOF96hNNvCKBfOR99DaJp2zUip+pw46qXRuWFXJ+n9jrqn4NGdGR3t7OLD SRMaqIie8+9uzfH4gV3dSo203LTacSDTHaOz0nuLpLwXJ8hUZvRqbtF7UdBYGSmz8Lsz 380qahnCQ8A2AxFfOKITp7rJqMU98W4Yeu2aeBJotGyyw455H8waCGOJTzDAO/i3xaSp P1iC/vPOhr3nSHWVlO+s3DaRGogl2uscBAUc3K2ifQWqBn7DaqXfRuO1bg6hbdmjVDEU Ogjaezs5Kw/M8q/8tglNFVssbSiJEtmUMvZqEKr+iTV263oXkX9RTgzIXRzNke0YTIeh r+2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:mime-version:references:in-reply-to :reply-to:from:date:message-id:subject:to:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=snItbv224xnbFd3Z/KIWHI1OsmjxK+vIGI2401UhRA8=; b=HguK+dlNOlN7FBTteTZk3DWdlW2j657vDNELCFtlv3fZoPfrfy4zs0ABuyxF8A/IIl JOrBkEuNXvsTF+CLsJSiXl4BmCEiCzbGV3Q3kHzBErPV5W0fQPQxzLQFKAT8YNWSDqzq G4slZLtonpNnvgU2vk90gJKXSnggFmOE2yp8LxHsXoHlItyoBZFYk8WB06pT2yXDxjrr oi3JuTJzjh8WUl8WYaEfnvXkofkC8l4kzY1g/QUFeix+OyrLdO0sj3pGKrWwQ8fK3xrY kdBQ0hr5pJ5aUlaripnN+toyvWUMrMNyTNjaDmoCzy2oZ7g2UFaVxb6LAY/KLIQYC7za TK+g== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AJIora+cqhudIEVLc22VLq2gfMI8ikxBk/oN2I3yXPaeCoROcSHxQp38 QQE4X2PzcerwGjirH3Aapt4= X-Google-Smtp-Source: AGRyM1ue85y2FV/Cj+YTNpatCtmu/f6eAuRCEDJn5Kr1x6wXGMLDVTuSDc9IM3pmniC+ZvK7MonIUg== X-Received: by 2002:a05:600c:3655:b0:39c:6745:ec53 with SMTP id y21-20020a05600c365500b0039c6745ec53mr10500166wmq.186.1655480159823; Fri, 17 Jun 2022 08:35:59 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6000:1887:b0:218:5c3b:1a23 with SMTP id a7-20020a056000188700b002185c3b1a23ls1948074wri.0.gmail; Fri, 17 Jun 2022 08:35:55 -0700 (PDT) X-Received: by 2002:a05:6000:1685:b0:218:45f0:5be6 with SMTP id y5-20020a056000168500b0021845f05be6mr10193430wrd.301.1655480155749; Fri, 17 Jun 2022 08:35:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655480155; cv=none; d=google.com; s=arc-20160816; b=W5rki6pUfxkjilvvSou314Y0bpw4XQTYPtKvy6tcpNVc9Ig+iInYxbDsGxdgWtyHqV J3mhhN7P5AVej9hWkV7kVfv8sHcAmFc37xV3WWtie3W2D9OpCIz4ZdaunC65tts1tBAq zFiRthC0UwfNsfLZzRwLT4vm+AXFjVXM5uOxVGvEaX/YW0o4zvgr7E2WzR0+rZwqieB2 M4nRnfCrSXkyoqNTFDLHLqIYkBMxv+s6dFAJhDKvTbRJ6pwJVTHp/wOFo4Li8PYaa595 a8tIHaPNc0R4qY1vVSJWzMcDeSp578IRWHCkqnF3k/9oCHDT7oEvZGIxtAGxV4QFADcZ AFKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:subject:message-id:date:from:reply-to:in-reply-to:references :mime-version; bh=jX5/nlVK1ym5536VI/Y4oxWT2+SrDLTRTD56/QbQvXs=; b=FPNPBqZ48zjAUDbJl++p2qNKSuZdLGraQKuFhcrvYaq8HBtYqynyZ8is0kTICodLC4 6r7rJibXM9jL6Wo3oF+0PheJMSufjspaxdCS01Vdt+hJ2MP6SCXYyK+kdMxCMlPde7bo yYvKoeoQT9agWbgIy03znAIK94LlOxvnJbOxflBuYLaavz7Dtv5m9HjrWb6uu9UKctdC T7kaxXBzARUhYQO7wINCc7PCnA5h1W8Dsv3jvsKfXvy255LVWJYG7kyqPeafrs7vig3C bTHTw4vWlErcVWaLPvLwp/J9l/SZewfeEdMHTcU0VtiieoE66y7DOldVIVBvmpikmx+O bLUA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 209.85.218.54 as permitted sender) smtp.mailfrom=melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Original-Received: from mail-ej1-f54.google.com (mail-ej1-f54.google.com. [209.85.218.54]) by gmr-mx.google.com with ESMTPS id bg18-20020a05600c3c9200b0039c4133ae38si203931wmb.2.2022.06.17.08.35.55 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 17 Jun 2022 08:35:55 -0700 (PDT) Received-SPF: pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 209.85.218.54 as permitted sender) client-ip=209.85.218.54; Original-Received: by mail-ej1-f54.google.com with SMTP id me5so9505365ejb.2 for ; Fri, 17 Jun 2022 08:35:55 -0700 (PDT) X-Received: by 2002:a17:907:62a6:b0:6ef:8118:d3e2 with SMTP id nd38-20020a17090762a600b006ef8118d3e2mr9621110ejc.605.1655480154799; Fri, 17 Jun 2022 08:35:54 -0700 (PDT) In-Reply-To: X-Original-Sender: melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 209.85.218.54 as permitted sender) smtp.mailfrom=melroch-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:30754 Archived-At: --0000000000008f42c305e1a68205 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable In bash or zsh I would typically use `````` pandoc -L build.lua ^D `````` Wouldn't the same work in Windows? (tho with Ctrl-Z instead of Ctrl-D I believe!) Den fre 17 juni 2022 12:08 skrev: > IDK if the use case is common enough to warant a new command line > parameter... > > But, what about a new option like this? > > `pandoc -L build.lua --no-input` > > The example `echo '' | pandoc` works with Powershell, but not with cmd. > There you'll get the result: >

=C3=94=C3=87=C3=96=C3=94=C3=87=C3=96

> > Don't know about bash or other shells. > > Denis > > > > > > > -----Urspr=C3=BCngliche Nachricht----- > > Von: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> Im Auftrag von Bastien DUMONT > > Gesendet: Freitag, 17. Juni 2022 11:49 > > An: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > > Betreff: Re: Experimenting with pandoc module using just Lua > > > > You need to supply an empty input to pandoc. In Powershell, you can typ= e > > `echo '' | pandoc -L build.lua`. > > > > Le Friday 17 June 2022 =C3=A0 11:38:11AM, A A a =C3=A9crit : > > > Hi Bastien, > > > > > > Thanks, that's a bit more like what I'm looking for. > > > > > > However, when I try to compile in Powershell using `pandoc -L > > > build.lua` I get no output and the command prompt just kind of hangs > there > > until I press Ctrl+C. > > > > > > Pretty sure I'm doing something wrong but I'm not sure what.... > > > > > > Regards, > > > > > > Amine > > > > > > On Thu, 16 Jun 2022 at 17:34, Bastien DUMONT > > > <[1]bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org> > > > wrote: > > > > > > I don't think that you can do this directly from a Lua > interpreter. This is > > > how I would build a document programmatically: > > > > > > ```build.lua > > > function Pandoc(_) > > > return pandoc.Pandoc( > > > pandoc.Para({ > > > pandoc.Str('Hello'), > > > pandoc.Space(), > > > pandoc.Emph(pandoc.Str('World')), > > > pandoc.Str('!') > > > }) > > > ) > > > end > > > ``` > > > > > > pandoc -L build.lua <<< '' outputs `

Hello World!

`= . > > > > > > > > > Le Thursday 16 June 2022 =C3=A0 05:28:29PM, A A a =C3=A9crit : > > > > Hi Bastien, > > > > > > > > I'm afraid that doesn't really show me how I can build a > document from > > > scratch > > > > similar to what is done in Haskell using a `Builder`. > > > > > > > > I really would like to avoid learning Haskell and stick to the > Lua API. > > > But I'm > > > > getting the impression that use of the Lua API requires > understanding > > of > > > how > > > > the underlying Haskell objects interact. > > > > > > > > Regards, > > > > > > > > Amine > > > > > > > > On Thu, 16 Jun 2022 at 17:20, A A > > <[1][2]amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > > > wrote: > > > > > > > > > > > > I guess a better way to phrase my question is the following= : > > > > > > > > Is there a way to generate a document from scratch and > > > programmatically > > > > using Lua and without using Haskell? > > > > > > > > There is mention [2]here of a pandoc Builder class but I > don=E2=80=99t see > > > its Lua > > > > equivalent [3]here. > > > > > > > > > > > > > > > > ---------- Forwarded message --------- > > > > From: A A <[4][3]amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > > > > Date: Thu, 16 Jun 2022 at 16:51 > > > > Subject: Experimenting with pandoc module using just Lua > > > > To: <[5][4]pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > > > > > > > > > > > > > > > > Dear All, > > > > > > > > Is there a way to experiment with the objects pandoc module > using > > Lua > > > > without having to write a filter/writer and go through the > pandoc > > > CLI? I > > > > would really like to just experiment with generating > documents and > > > getting > > > > familiar with the Lua API using just a Lua interpreter. > > > > > > > > Regards, > > > > > > > > Amine > > > > > > > > -- > > > > 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 [6][5]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > > > To view this discussion on the web visit > > [7][6]https://groups.google.com/ > > > d/msgid/ > > > > pandoc-discuss/ > > > > > > CAMwawgOHE5QEeHJbO%2BNF8QvViKas3P6Q6G7F%3DdS4YecTda1z1w%[7 > > ] > > > 40mail.gmail.com. > > > > > > > > References: > > > > > > > > [1] mailto:[8]amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > > > > [2] [9]https://pandoc.org/using-the-pandoc-api.html#builder > > > > [3] [10]https://pandoc.org/lua-filters.html#module-pandoc > > > > [4] mailto:[11]amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > > > > [5] mailto:[12]pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > > > > [6] mailto:[13]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > > > > [7] [14]https://groups.google.com/d/msgid/pandoc-discuss/ > > > > > CAMwawgOHE5QEeHJbO%2BNF8QvViKas3P6Q6G7F%3DdS4YecTda1z1w%4 > > 0mail.gmail.com? > > > utm_medium=3Demail&utm_source=3Dfooter > > > > > > -- > > > You received this message because you are subscribed to the Googl= e > > Groups > > > "pandoc-discuss" group. > > > To unsubscribe from this group and stop receiving emails from it, > send an > > > email to [15]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > > To view this discussion on the web visit > > [16]https://groups.google.com/d/ > > > msgid/pandoc-discuss/YqtNZpy71u2Ud39K%40localhost. > > > > > > -- > > > 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, sen= d > > > an email to [17]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > > To view this discussion on the web visit > > > [18]https://groups.google.com/d/msgid/ > > > pandoc-discuss/ > > > > > CAMwawgMt32uLCRXDqwxpudMF92sBQVg_f2cNXvzV0T3rsyy5xA%40mail.g > > mail.com. > > > > > > References: > > > > > > [1] mailto:bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org > > > [2] mailto:amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > > > [3] mailto:amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > > > [4] mailto:pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > > > [5] mailto:pandoc-discuss%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > > > [6] https://groups.google.com/d/msgid/ > > > [7] http://40mail.gmail.com/ > > > [8] mailto:amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > > > [9] https://pandoc.org/using-the-pandoc-api.html#builder > > > [10] https://pandoc.org/lua-filters.html#module-pandoc > > > [11] mailto:amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org [12] > > > mailto:pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > > > [13] mailto:pandoc-discuss%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > > > [14] > > > https://groups.google.com/d/msgid/pandoc- > > discuss/CAMwawgOHE5QEeHJbO%2B > > > > > NF8QvViKas3P6Q6G7F%3DdS4YecTda1z1w%40mail.gmail.com?utm_medium > > =3Demail&u > > > tm_source=3Dfooter [15] > > > mailto:pandoc-discuss%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > > > [16] > > > https://groups.google.com/d/msgid/pandoc- > > discuss/YqtNZpy71u2Ud39K%40lo > > > calhost [17] mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > > > [18] > > > https://groups.google.com/d/msgid/pandoc- > > discuss/CAMwawgMt32uLCRXDqwxp > > > > > udMF92sBQVg_f2cNXvzV0T3rsyy5xA%40mail.gmail.com?utm_medium=3Demai > > l&utm_s > > > ource=3Dfooter > > > > -- > > You received this message because you are subscribed to the Google Grou= ps > > "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/YqxOI1fX2hiBA3YB%40localhost. > > -- > 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/cb27f08f1f8244119dc1865f= 9b655618%40unibe.ch > . > --=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/CADAJKhDacaODB6UtLGqjev%3D638rW33ENyLJnWX_b4xrwvcp2uw%40mail= .gmail.com. --0000000000008f42c305e1a68205 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
In bash or zsh I would typically use
``````
pandoc -L build.lua<= /div>
^D
``````

Wouldn't the same work in Windows? (tho= with Ctrl-Z instead of Ctrl-D I believe!)

Den fre 17 juni 2022 12:08 = <denis.maier-NSENcxR/0n0@public.gmane.org> sk= rev:
IDK if the use case is common = enough to warant a new command line parameter...

But, what about a new option like this?

`pandoc -L build.lua --no-input`

The example `echo '' | pandoc` works with Powershell, but not with = cmd. There you'll get the result:
<p>=C3=94=C3=87=C3=96=C3=94=C3=87=C3=96</p>

Don't know about bash or other shells.

Denis





> -----Urspr=C3=BCngliche Nachricht-----
> Von: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <pandoc-
> discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> Im Auftrag von Bastien DUMONT > Gesendet: Freitag, 17. Juni 2022 11:49
> An: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> Betreff: Re: Experimenting with pandoc module using just Lua
>
> You need to supply an empty input to pandoc. In Powershell, you can ty= pe
> `echo '' | pandoc -L build.lua`.
>
> Le Friday 17 June 2022 =C3=A0 11:38:11AM, A A a =C3=A9crit :
> > Hi Bastien,
> >
> > Thanks, that's a bit more like what I'm looking for.
> >
> > However, when I try to compile in Powershell using `pandoc -L
> > build.lua` I get no output and the command prompt just kind of ha= ngs there
> until I press Ctrl+C.
> >
> > Pretty sure I'm doing something wrong but I'm not sure wh= at....
> >
> > Regards,
> >
> > Amine
> >
> > On Thu, 16 Jun 2022 at 17:34, Bastien DUMONT
> > <[1]bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org>
> > wrote:
> >
> >=C2=A0 =C2=A0 =C2=A0I don't think that you can do this directl= y from a Lua interpreter. This is
> >=C2=A0 =C2=A0 =C2=A0how I would build a document programmatically:=
> >
> >=C2=A0 =C2=A0 =C2=A0```build.lua
> >=C2=A0 =C2=A0 =C2=A0function Pandoc(_)
> >=C2=A0 =C2=A0 =C2=A0=C2=A0 return pandoc.Pandoc(
> >=C2=A0 =C2=A0 =C2=A0=C2=A0 =C2=A0 pandoc.Para({
> >=C2=A0 =C2=A0 =C2=A0=C2=A0 =C2=A0 =C2=A0 =C2=A0 pandoc.Str('He= llo'),
> >=C2=A0 =C2=A0 =C2=A0=C2=A0 =C2=A0 =C2=A0 =C2=A0 pandoc.Space(), > >=C2=A0 =C2=A0 =C2=A0=C2=A0 =C2=A0 =C2=A0 =C2=A0 pandoc.Emph(pandoc= .Str('World')),
> >=C2=A0 =C2=A0 =C2=A0=C2=A0 =C2=A0 =C2=A0 =C2=A0 pandoc.Str('!&= #39;)
> >=C2=A0 =C2=A0 =C2=A0=C2=A0 =C2=A0 })
> >=C2=A0 =C2=A0 =C2=A0=C2=A0 )
> >=C2=A0 =C2=A0 =C2=A0end
> >=C2=A0 =C2=A0 =C2=A0```
> >
> >=C2=A0 =C2=A0 =C2=A0pandoc -L build.lua <<< '' ou= tputs `<p>Hello <em>World</em>!</p>`.
> >
> >
> >=C2=A0 =C2=A0 =C2=A0Le Thursday 16 June 2022 =C3=A0 05:28:29PM, A = A a =C3=A9crit :
> >=C2=A0 =C2=A0 =C2=A0> Hi Bastien,
> >=C2=A0 =C2=A0 =C2=A0>
> >=C2=A0 =C2=A0 =C2=A0> I'm afraid that doesn't really sh= ow me how I can build a document from
> >=C2=A0 =C2=A0 =C2=A0scratch
> >=C2=A0 =C2=A0 =C2=A0> similar to what is done in Haskell using = a `Builder`.
> >=C2=A0 =C2=A0 =C2=A0>
> >=C2=A0 =C2=A0 =C2=A0> I really would like to avoid learning Has= kell and stick to the Lua API.
> >=C2=A0 =C2=A0 =C2=A0But I'm
> >=C2=A0 =C2=A0 =C2=A0> getting the impression that use of the Lu= a API requires understanding
> of
> >=C2=A0 =C2=A0 =C2=A0how
> >=C2=A0 =C2=A0 =C2=A0> the underlying Haskell objects interact.<= br> > >=C2=A0 =C2=A0 =C2=A0>
> >=C2=A0 =C2=A0 =C2=A0> Regards,
> >=C2=A0 =C2=A0 =C2=A0>
> >=C2=A0 =C2=A0 =C2=A0> Amine
> >=C2=A0 =C2=A0 =C2=A0>
> >=C2=A0 =C2=A0 =C2=A0> On Thu, 16 Jun 2022 at 17:20, A A
> <[1][2]amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> >=C2=A0 =C2=A0 =C2=A0wrote:
> >=C2=A0 =C2=A0 =C2=A0>
> >=C2=A0 =C2=A0 =C2=A0>
> >=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0I guess a better way t= o phrase my question is the following:
> >=C2=A0 =C2=A0 =C2=A0>
> >=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0Is there a way to gene= rate a document from scratch and
> >=C2=A0 =C2=A0 =C2=A0programmatically
> >=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0using Lua and without = using Haskell?
> >=C2=A0 =C2=A0 =C2=A0>
> >=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0There is mention [2]he= re of a pandoc Builder class but I don=E2=80=99t see
> >=C2=A0 =C2=A0 =C2=A0its Lua
> >=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0equivalent [3]here. > >=C2=A0 =C2=A0 =C2=A0>
> >=C2=A0 =C2=A0 =C2=A0>
> >=C2=A0 =C2=A0 =C2=A0>
> >=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0---------- Forwarded m= essage ---------
> >=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0From: A A <[4][3]amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> >=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0Date: Thu, 16 Jun 2022= at 16:51
> >=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0Subject: Experimenting= with pandoc module using just Lua
> >=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0To: <[5][4]pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
> >=C2=A0 =C2=A0 =C2=A0>
> >=C2=A0 =C2=A0 =C2=A0>
> >=C2=A0 =C2=A0 =C2=A0>
> >=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0Dear All,
> >=C2=A0 =C2=A0 =C2=A0>
> >=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0Is there a way to expe= riment with the objects pandoc module using
> Lua
> >=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0without having to writ= e a filter/writer and go through the pandoc
> >=C2=A0 =C2=A0 =C2=A0CLI? I
> >=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0would really like to j= ust experiment with generating documents and
> >=C2=A0 =C2=A0 =C2=A0getting
> >=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0familiar with the Lua = API using just a Lua interpreter.
> >=C2=A0 =C2=A0 =C2=A0>
> >=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0Regards,
> >=C2=A0 =C2=A0 =C2=A0>
> >=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0Amine
> >=C2=A0 =C2=A0 =C2=A0>
> >=C2=A0 =C2=A0 =C2=A0> --
> >=C2=A0 =C2=A0 =C2=A0> You received this message because you are= subscribed to the Google
> Groups
> >=C2=A0 =C2=A0 =C2=A0> "pandoc-discuss" group.
> >=C2=A0 =C2=A0 =C2=A0> To unsubscribe from this group and stop r= eceiving emails from it, send
> an
> >=C2=A0 =C2=A0 =C2=A0email
> >=C2=A0 =C2=A0 =C2=A0> to [6][5]pando= c-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
> >=C2=A0 =C2=A0 =C2=A0> To view this discussion on the web visit<= br> > [7][6]https://groups.google.com/
> >=C2=A0 =C2=A0 =C2=A0d/msgid/
> >=C2=A0 =C2=A0 =C2=A0> pandoc-discuss/
> >=C2=A0 =C2=A0 =C2=A0>
> CAMwawgOHE5QEeHJbO%2BNF8QvViKas3P6Q6G7F%3DdS4YecTda1z1w%[7
> ]
> >=C2=A0 =C2=A0 =C2=A040mail.gmail.com.
> >=C2=A0 =C2=A0 =C2=A0>
> >=C2=A0 =C2=A0 =C2=A0> References:
> >=C2=A0 =C2=A0 =C2=A0>
> >=C2=A0 =C2=A0 =C2=A0> [1] mailto:[8]amine.aboufirass@gm= ail.com
> >=C2=A0 =C2=A0 =C2=A0> [2] [9]https://pandoc.org/using-the-pandoc-api.html#builder
> >=C2=A0 =C2=A0 =C2=A0> [3] [10]https://pandoc.org/lua-filters.html#module-pandoc
> >=C2=A0 =C2=A0 =C2=A0> [4] mailto:[11]amine.aboufirass@g= mail.com
> >=C2=A0 =C2=A0 =C2=A0> [5] mailto:[12]pandoc-discus= s@googlegroups.com
> >=C2=A0 =C2=A0 =C2=A0> [6] mailto:[13]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> >=C2=A0 =C2=A0 =C2=A0> [7] [14]https://groups.google.com/d/msgid/pandoc-discuss/
> >
> CAMwawgOHE5QEeHJbO%2BNF8QvViKas3P6Q6G7F%3DdS4YecTda1z1w%4
> 0mail.gmail.com?
> >=C2=A0 =C2=A0 =C2=A0utm_medium=3Demail&utm_source=3Dfooter
> >
> >=C2=A0 =C2=A0 =C2=A0--
> >=C2=A0 =C2=A0 =C2=A0You received this message because you are subs= cribed to the Google
> Groups
> >=C2=A0 =C2=A0 =C2=A0"pandoc-discuss" group.
> >=C2=A0 =C2=A0 =C2=A0To unsubscribe from this group and stop receiv= ing emails from it, send an
> >=C2=A0 =C2=A0 =C2=A0email to [15]pandoc= -discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
> >=C2=A0 =C2=A0 =C2=A0To view this discussion on the web visit
> [16]https://groups.google.com/d/
> >=C2=A0 =C2=A0 =C2=A0msgid/pandoc-discuss/YqtNZpy71u2Ud39K%40localh= ost.
> >
> > --
> > You received this message because you are subscribed to the Googl= e
> > Groups "pandoc-discuss" group.
> > To unsubscribe from this group and stop receiving emails from it,= send
> > an email to [17]pandoc-discuss+unsubsc= ribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
> > To view this discussion on the web visit
> > [18]https://groups.google.com/d/msgid/ > > pandoc-discuss/
> >
> CAMwawgMt32uLCRXDqwxpudMF92sBQVg_f2cNXvzV0T3rsyy5xA%40mail.g
> mail.com.
> >
> > References:
> >
> > [1] mailto:bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org
> > [2] mailto:amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
> > [3] mailto:amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
> > [4] mailto:pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> > [5] mailto:pandoc-discuss%2Bunsubscr= ibe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> > [6] https://groups.google.com/d/msgid/ > > [7] http://40mail.gmail.com/
> > [8] mailto:amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
> > [9] https://pandoc.org/usin= g-the-pandoc-api.html#builder
> > [10] https://pandoc.org/lua-fi= lters.html#module-pandoc
> > [11] mailto:amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org [12]
> > mailto:pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> > [13] mailto:pandoc-discuss%2Bunsubsc= ribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> > [14]
> > https://groups.google.com/d/msgid/pand= oc-
> discuss/CAMwawgOHE5QEeHJbO%2B
> >
> NF8QvViKas3P6Q6G7F%3DdS4YecTda1z1w%40mail.gmail.co= m?utm_medium
> =3Demail&u
> > tm_source=3Dfooter [15]
> > mailto:pandoc-discuss%2Bunsubscribe@= googlegroups.com
> > [16]
> > https://groups.google.com/d/msgid/pand= oc-
> discuss/YqtNZpy71u2Ud39K%40lo
> > calhost [17] mailto:pandoc-discuss+uns= ubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> > [18]
> > https://groups.google.com/d/msgid/pand= oc-
> discuss/CAMwawgMt32uLCRXDqwxp
> >
> udMF92sBQVg_f2cNXvzV0T3rsyy5xA%40mail.gmail= .com?utm_medium=3Demai
> l&utm_s
> > ource=3Dfooter
>
> --
> You received this message because you are subscribed to the Google Gro= ups
> "pandoc-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send= an
> email to pandoc-discuss+unsubscribe@googleg= roups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pandoc-
> discuss/YqxOI1fX2hiBA3YB%40localhost.

--
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-discuss+unsubscribe@googlegroups.= com.
To view this discussion on the web visit https://groups.google.com/d/ms= gid/pandoc-discuss/cb27f08f1f8244119dc1865f9b655618%40unibe.ch.

--
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://group= s.google.com/d/msgid/pandoc-discuss/CADAJKhDacaODB6UtLGqjev%3D638rW33ENyLJn= WX_b4xrwvcp2uw%40mail.gmail.com.
--0000000000008f42c305e1a68205--