From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/30745 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Bastien DUMONT Newsgroups: gmane.text.pandoc Subject: Re: Experimenting with pandoc module using just Lua Date: Thu, 16 Jun 2022 15:33:58 +0000 Message-ID: References: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11400"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBDCINCES2QJRB2E2VWKQMGQEZJPWWLA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Thu Jun 16 17:34:05 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-ej1-f57.google.com ([209.85.218.57]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1o1rVU-0002iG-9F for gtp-pandoc-discuss@m.gmane-mx.org; Thu, 16 Jun 2022 17:34:04 +0200 Original-Received: by mail-ej1-f57.google.com with SMTP id h16-20020a1709070b1000b00713a3941a27sf766304ejl.0 for ; Thu, 16 Jun 2022 08:34:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1655393644; cv=pass; d=google.com; s=arc-20160816; b=jNWsQvk6W7IqRLx+Q1be/dL+2vdRlTRZDOVDimouV/1KqAqLzpPtEbcuQytFhRLKUS AQnIBXa6yhuaIhA7t7G9tq5QyzxpfrO9AklGR3zMo/PDsiRfo3ABq3LJt566NFr9DZ5P TAXFi6U1Mi9Oaz7y+tKYhTxLlLVvKoyNmRK7wtvnXH8VUcp0yAMp9uYWWLcSHCflBUdr KY2BZbdjPAheOxivBAHAjYvfRw3LD3eUUWoZ1KcWBzR7F7rFQ8CF58yjr5EmX3skkZ49 1DfWrPMoRbV6ASzOaYJd7sKDvQgVjubIP/u+JmZURNJ9l3DlD/BcEl5/jxZWauvRq4FZ NMuQ== 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:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:to:from:date:sender:dkim-signature; bh=b1tDcBZ5juZyS7eH+9LPFmJb/DTbhE/mzmFJwJM+Tj0=; b=Vydyne4YK2LGe77EYbX5AFYEMD3vJA86QgS9CKHdTZckWx7FXMahVQ/DzKUddroQYo YYyrRxXRu/SAJII9VcF6iPS6JIjfwGTBteffE7dZovKnfoO94nPEai6ImWUm9eXO7CVm l9thHb8f1R/YwPkfO6PsQOKLea46aLJNpi1zlMYpg0E19Y7tqXFvDON9sjAfDeEG+3ve G6q6fQpZ9Be5AG0wP+89ZDblkYMICmaxCkxF13/9I+sEwqV95gUOjdcL1g4mHMh9ox/H nx6JH+Nwl5NB4qtoG+vwYGwGe6C416+PADFV2IUkOiBL3710OhefvmYiZ55Ssa6JmuoP xJ6g== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=XSaRPv7N; spf=pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.66 as permitted sender) smtp.mailfrom=bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:date:from:to:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :x-original-sender:x-original-authentication-results:reply-to :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=b1tDcBZ5juZyS7eH+9LPFmJb/DTbhE/mzmFJwJM+Tj0=; b=ewCW4B/0WSGlhh0eAxNtq3BbdGmDyFJ7DKF/8rlfSmIK78VuAu/OzouoaA+VRL5YeB /mATqPgBvRKWTevpBocXri7htx1ltoF3sTfiNq6bnWnTO150J9q8gBtTSG8oUnxySfP/ 1576iPLXyyL2xOKYOoNdPC2M+Grq5+etsq4ONQeq5yEKrnITI4RrH0CWagY9FA7cjDV9 IXf1KzhtlAH7xF/iWq54YmVh++20yssokGmSgR8dd+vQj0Hr3xcChiS+PphF7TPJl6NQ DxL+JwPOc+pExNSHsahEkbDLJUmo83v606Ckb7thCUmUEb8WVbBDdMUo3CtUS1OEBy33 W2FA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:date:from:to:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=b1tDcBZ5juZyS7eH+9LPFmJb/DTbhE/mzmFJwJM+Tj0=; b=UOMcDW+nvGJI8YRwLExgbjgTkefmr07+5QC4RZtCli5r04JwNrP5S44nNUO+JCaztA abhOP1F0GU4J3BjTV20dZF9/8olX3WFWA3w5OBzdKwa5qZoL58jTx4bgCbB+5dh/fR2o SnUq4eSjFatUpGR8gXc7oLNBks4iu89ODN5ignQjsYcMh3xCHLGPlp/fBhc7Q5YqO/5u 1ceXgWkdQYOGtlqi5IrK9xt7LlROc/ZgD3FFLZ1/9fI3659uNC1k/vUsNRZ6IgU9yVp7 TIQ2Z1lsYUafFfmQWBJzvJAe3znTZVSitmKM5vRO8bBX Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AJIora/oZdhELwZ1LQZIhixXMrRRAlnHMjeSvM74WNSS+/Kir51SjKyL dGeHsatbtkOQKHr2Pe0xiGk= X-Google-Smtp-Source: AGRyM1s3eo136HK42tbxi9g4Me8Fm6LSNMgOcZ64oP8/zwZYbLUBT5GePB3YQrp1gy65Hjt5jvU2iw== X-Received: by 2002:a50:9f88:0:b0:42d:f7d2:1b7b with SMTP id c8-20020a509f88000000b0042df7d21b7bmr7280001edf.139.1655393643983; Thu, 16 Jun 2022 08:34:03 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6402:51d1:b0:434:ff40:ca1f with SMTP id r17-20020a05640251d100b00434ff40ca1fls2467020edd.2.gmail; Thu, 16 Jun 2022 08:34:00 -0700 (PDT) X-Received: by 2002:a05:6402:34c8:b0:42f:b59e:b98c with SMTP id w8-20020a05640234c800b0042fb59eb98cmr7308408edc.275.1655393639920; Thu, 16 Jun 2022 08:33:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655393639; cv=none; d=google.com; s=arc-20160816; b=EYokiWAbRcqEGH2uGS3s4N13IMXbVJQ7qCloTVTeGC8GhQHig49b24XO/235nNI4Xa TxsH0j/vBuVPdSfAKkeYbbDzlT9eziyJbn6vyee8PewM0O4BgMnqpNZ2IE1QLui5EDg9 rDyI9f4iyTIPHtbV5KCWDwbe5ZTtMdWlBRPYkI4+2d2jHX779L59IloNW5yhLgcxmhlc HIHjH4Kjs51+X8HuAqgoziye+JHvKb535iFy9tu0uayIGuufYNMZVJKR03/fWoO5Wtfw CQoe/iy0B9ZDQtXr/xqEMU0G+zzRHCq3FzGGv98sNuzKWmsPT1l+hoBAJnqfEyEo1fqy fSgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:to:from:date :dkim-signature; bh=2oJOFxLO38rnpxR44Xq5TYKxw1W6FFwpAhQRYsExgtQ=; b=lGIcEeGPxyKDHDn++8S50IpfvdOuIYXGIzU67FZ8Ev6Ss3rsj2BvN4CR+nXgqIMy/5 xrNNMPChnH9/sBNf2Uuyg5qs21zB/wAPBDi2GeOcbxO+xQ+VrHyt4JVzpk04pLa5Oe/0 kPeajK9PCQvOjFaUhHLDd8WxaOxTMxxoJ73wQ1/cENSVojcemj+Jw+gOIVVhcrNC/4Wk QZxMapFjCwtkz7LVULiInmJAljHs3hhQKj5oWX3WB+t2GnvkRaUGOKuBb14OAP+GhJW5 TRgYb2Wd+W+PPoEDF2MwmecpfSFJfqu4Bn5j/OGAftVDwfFJlmqCnj96qBSYfGO/AVDY 2qdw== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=XSaRPv7N; spf=pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.66 as permitted sender) smtp.mailfrom=bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.net Original-Received: from mout02.posteo.de (mout02.posteo.de. [185.67.36.66]) by gmr-mx.google.com with ESMTPS id j8-20020aa7c0c8000000b0042e15342b19si119564edp.3.2022.06.16.08.33.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jun 2022 08:33:59 -0700 (PDT) Received-SPF: pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.66 as permitted sender) client-ip=185.67.36.66; Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 6E10324010B for ; Thu, 16 Jun 2022 17:33:59 +0200 (CEST) Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4LP5n247Bhz6tnZ for ; Thu, 16 Jun 2022 17:33:58 +0200 (CEST) Content-Disposition: inline In-Reply-To: X-Original-Sender: bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=XSaRPv7N; spf=pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.66 as permitted sender) smtp.mailfrom=bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.net 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:30745 Archived-At: 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, >=20 > I'm afraid that doesn't really show me how I can build a document from sc= ratch > similar to what is done in Haskell using a `Builder`. >=20 > I really would like to avoid learning Haskell and stick to the Lua API. B= ut I'm > getting the impression that use of the Lua API requires understanding of = how > the underlying Haskell objects interact. >=20 > Regards, >=20 > Amine >=20 > On Thu, 16 Jun 2022 at 17:20, A A <[1]amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >=20 >=20 > I guess a better way to phrase my question is the following: >=20 > Is there a way to generate a document from scratch and programmatical= ly > using Lua and without using Haskell? >=20 > There is mention [2]here of a pandoc Builder class but I don=E2=80=99= t see its Lua > equivalent [3]here. >=20 >=20 >=20 > ---------- Forwarded message --------- > From: A A <[4]amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > Date: Thu, 16 Jun 2022 at 16:51 > Subject: Experimenting with pandoc module using just Lua > To: <[5]pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> >=20 >=20 >=20 > Dear All, >=20 > 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 ge= tting > familiar with the Lua API using just a Lua interpreter. >=20 > Regards, >=20 > Amine >=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= email > to [6]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit [7]https://groups.google.com/d/m= sgid/ > pandoc-discuss/ > CAMwawgOHE5QEeHJbO%2BNF8QvViKas3P6Q6G7F%3DdS4YecTda1z1w%40mail.gmail.com. >=20 > References: >=20 > [1] mailto:amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > [2] https://pandoc.org/using-the-pandoc-api.html#builder > [3] https://pandoc.org/lua-filters.html#module-pandoc > [4] mailto:amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > [5] mailto:pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > [6] mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > [7] https://groups.google.com/d/msgid/pandoc-discuss/CAMwawgOHE5QEeHJbO%2= BNF8QvViKas3P6Q6G7F%3DdS4YecTda1z1w%40mail.gmail.com?utm_medium=3Demail&utm= _source=3Dfooter --=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/YqtNZpy71u2Ud39K%40localhost.