From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/32275 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: mf Newsgroups: gmane.text.pandoc Subject: feature request: lua xml parsing for custom readers Date: Mon, 6 Mar 2023 10:30:34 +0100 Message-ID: <4e2497aa-bb3e-d8e8-c862-5dba2d0b5fbc@gmail.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="------------J0o0olNiKzt3a5StedCGTz9s" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22114"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 To: pandoc-discuss Original-X-From: pandoc-discuss+bncBDZYJ4HW2QPBBPPFS2QAMGQEBL6DWGY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mon Mar 06 10:30:41 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-wr1-f63.google.com ([209.85.221.63]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pZ7B2-0005cT-PL for gtp-pandoc-discuss@m.gmane-mx.org; Mon, 06 Mar 2023 10:30:40 +0100 Original-Received: by mail-wr1-f63.google.com with SMTP id m10-20020adfe94a000000b002cdc5eac0d0sf1306829wrn.2 for ; Mon, 06 Mar 2023 01:30:40 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1678095040; cv=pass; d=google.com; s=arc-20160816; b=oJtm2e/6/LhNm4FEjNffXYdRRp0soUAsScNL+0PI6ZamAcr5SHIq1p49V2sCvdOtSX Kpp9MTC/IAmC0tNfAnAk5aprfo+RBFrm9ahRJoIP/afqN6iC06PKw+9vF2hIaCxa9GE6 TCIs5bxccQIcsMooRGg/5/Uc9im7Ig80NqtWj4fj/8n34260Z/6QtnrkoEUWzdRbYBUS afvL/qRRfk/rLRgpWPU/O2sIKPu7sYgojKGP71zeq5Hh9CWgRh7489581k5P3HaeZsPz pm1INycEaS1G6EngoOHWjWYfvdF56DVYVBqJ4wQQPR8VMG9uV959slbBHQjYUjCX4K52 sULA== 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:subject:from :content-language:to:user-agent:mime-version:date:message-id:sender :dkim-signature:dkim-signature; bh=iAIc+nfCbTELejLJG1TR4UuEytdzM/uYOnDHg/mh4Sw=; b=SjjyX+mSDtEZyzX1zFKCIj9l3atNmeiWhMwjYM4gPC7PF7GOqORp2CbniIX5R9In7A whT/5N3UP76D/Wbq671PpeGf8Vm0PNrGjeEvfy/OmwPA7SmzhBxBrnQ92I1F/sCd3f0G bKhxUm7CZXRrxmVR3Do7oabhhmPh9Ex0sOHM2oHo8jBHQ9px1aoJjMdr2cq5wy8WJ8De 7a441FS2NW4TnguNoz/IfoG9gt8Lz0yR7HQrmIADZoP+Tz+atwUWGUoWX6U6UNz6MxYZ 42C1dFVKpnO+0SkqdWgDIdq2EnzR9VlbC3Ba7TmvU0se5F5xo1qYaHLK1D01X35qoAVQ z9Rg== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=YpmczEtl; spf=pass (google.com: domain of massifrg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:4864:20::12d as permitted sender) smtp.mailfrom=massifrg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; t=1678095040; 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:subject:from :content-language:to:user-agent:mime-version:date:message-id:sender :from:to:cc:subject:date:message-id:reply-to; bh=iAIc+nfCbTELejLJG1TR4UuEytdzM/uYOnDHg/mh4Sw=; b=llrkxrtRh1fiQS74cm6QJk+WTUvRrTi25GpSZ43PUP98VqADi/MYLAE3Iw4GL3NVYF cPpwGcI4+y/x89E5SOcwVbrWlEGj5ND8xNZyR46hDA91W2j6VAshuN+2KtME9R013+iV PsESl3rRD1kQYDFjFKTXrwHDuMajERLkEYmHJcZ0xvQef62bMx1CfXhMBZrqv3xBbEYI 5zU99qSGci50+H9KAELaNdJBDlQMPwMupfLi3yXyGO7LoIyck7xUhD/Bn1QonUHSKuLy +B8sH4/7rlExFQGf1EUtbwfErVl5k5y7kPd+C3eAfLFsg2ApfmJHfvRB6WhMs4LuEIRw LyWw DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678095040; 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:subject:from :content-language:to:user-agent:mime-version:date:message-id:from:to :cc:subject:date:message-id:reply-to; bh=iAIc+nfCbTELejLJG1TR4UuEytdzM/uYOnDHg/mh4Sw=; b=BLR/oGzpJOCxLRxpRKdP/Iof52nlMaz8k5nJnPEfPFbmXzCX1M0avOKx3XnbPB+ItB UW6nGPcezXYYzYNYiYS9LxiwteOEvhVE36VwlWJzvecfnBiISZn+S7cIZ9hAScPl1fQk 7RlKcK1q3sWzz34aLCV7cQb/T9Zsc2W1G8cdeBNgm01FzDZ4lZHzhowVmxsyPd9rncP3 EY2w0zbvuWRolKPQXqbcQWNu+BRmK49EOwp0VNbuqRO/kNjP7gMSGGNXod3v1coy8MG0 waXqNsBSgGX3Xa5zCbjisD1pZ86QIU+Qtc/t6j/Z8K3SiLtDkvRK17JmpB7ZIQ7Z/NZB kj3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678095040; 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:subject:from :content-language:to:user-agent:mime-version:date:message-id :x-gm-message-state:sender:from:to:cc:subject:date:message-id :reply-to; bh=iAIc+nfCbTELejLJG1TR4UuEytdzM/uYOnDHg/mh4Sw=; b=0KvQwoef0XRvwMwP5CrW4QSLxivRyurxWcjPNyLAMjz6JWFkykOMLNB7xKPVX19Y3M t46Mj3cq21KWHZqWxLCEe/kFU/NGq89epq7M6G7xLDPE3Ar6Xcm3ixIFtgI0lmwb61GB 276TAWsG5B28etuOkwcmZKFdXMwKS588LcBlfg+SLB79gBoKzyDhpZbdaC2jw/ZAGP7s QVziKp3cPoMNTXnHbCADwSUK+KQdsu5rNSga4OCuqoMnNIG8GiCOeeXYHY39WNyAa9w3 6EW8pINdDOWi9hp3ReQwZeBUJwg Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AO0yUKWIhrxBsCTYbfFESbngLZGo7giDxPgzFRUZg8KFwI/GgZNuAMCA 70wCKDZA2bYoKug9j6rPQmo= X-Google-Smtp-Source: AK7set8CVdsAaZKzFKobB3D1D6QXTsOIweQVJrazhPYqiL5H5q0eDkMjeWQHDTPrzeBAwcdEKNVSog== X-Received: by 2002:a05:6000:137c:b0:2c8:14ba:4594 with SMTP id q28-20020a056000137c00b002c814ba4594mr2188756wrz.3.1678095040335; Mon, 06 Mar 2023 01:30:40 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:600c:5112:b0:3dc:5674:6707 with SMTP id o18-20020a05600c511200b003dc56746707ls6525204wms.2.-pod-canary-gmail; Mon, 06 Mar 2023 01:30:36 -0800 (PST) X-Received: by 2002:a05:600c:3b87:b0:3e2:c67:1c7f with SMTP id n7-20020a05600c3b8700b003e20c671c7fmr8564743wms.10.1678095036523; Mon, 06 Mar 2023 01:30:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678095036; cv=none; d=google.com; s=arc-20160816; b=WbEKS3JPCKap2ui4VQVsP9+FWMgWHewEbrjEeQEpNodipXpxXSdd1Bv6OtJguGrdWN R03DuwVTf/+ZWovffiV1k5O7AO9bhjpcv8ODtmzlDXaDDp1I4xyylfOf59VOOZdDdhN4 NJgnhmxIrb3q03iSvAalOcJTCLCEZGjpSQ7rwcf/tzs41Ht16OthOHRPF96hTOjERVSO J39FczU029Ytesk5ubstcIrh/81v+j7N0Dmr+oTGdC8Wkr2kRbtofblLP1I6KUsgrcBY ZlneqQMDtEDLoyQo1CzFUladTImo05jaPLmp67PWrQmqiyN28kEvqEhmuBoHvNNN7qhw eYJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=subject:from:content-language:to:user-agent:mime-version:date :message-id:dkim-signature; bh=AI+srEvmmJVotpst+L28QCoyZFso/QPejlygBMhJK+Y=; b=NlVK9U0zfmDE1Ssc3KrMztJsfXt2vTwU24rgYisChcfpYAkfIestxrU3EX7KTojrNb hQ3cjmQgmfDppirQkMF9wHcYA4P30kemxWgsxhYFkbB1XyXCQsC3GlSXJ7hpzstxRUzg K48vayPeMIJdTwVdZkat43fkGzf218sWgCT2jdz1K2rXqGXNUjOoyhrBNKr0XDOjxRdj t9vOlGM0H1r+5fvmgfVik9caT0gFCbTF7cJPrwG+pTkFSwMXThOq9mznMc+UlcHFadHd gfydv4GQRUvVR4vkKFpkzBwrkquxjqRI+AOJvVSFbi5M/Esb7jgsp6FgxGvp4Lj0ucdE +oVQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=YpmczEtl; spf=pass (google.com: domain of massifrg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:4864:20::12d as permitted sender) smtp.mailfrom=massifrg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Original-Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com. [2a00:1450:4864:20::12d]) by gmr-mx.google.com with ESMTPS id 16-20020a05600c021000b003dd1c15e7ffsi370207wmi.2.2023.03.06.01.30.36 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 06 Mar 2023 01:30:36 -0800 (PST) Received-SPF: pass (google.com: domain of massifrg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:4864:20::12d as permitted sender) client-ip=2a00:1450:4864:20::12d; Original-Received: by mail-lf1-x12d.google.com with SMTP id i9so11826267lfc.6 for ; Mon, 06 Mar 2023 01:30:36 -0800 (PST) X-Received: by 2002:a19:7508:0:b0:4a4:68b9:1a00 with SMTP id y8-20020a197508000000b004a468b91a00mr2926122lfe.40.1678095035913; Mon, 06 Mar 2023 01:30:35 -0800 (PST) Original-Received: from [192.168.1.52] (host-95-229-108-50.business.telecomitalia.it. [95.229.108.50]) by smtp.gmail.com with ESMTPSA id x9-20020a2e8809000000b00295a5243a77sm1563931ljh.107.2023.03.06.01.30.35 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 06 Mar 2023 01:30:35 -0800 (PST) Content-Language: en-US, it-IT X-Original-Sender: massifrg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=YpmczEtl; spf=pass (google.com: domain of massifrg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:4864:20::12d as permitted sender) smtp.mailfrom=massifrg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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:32275 Archived-At: This is a multi-part message in MIME format. --------------J0o0olNiKzt3a5StedCGTz9s Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: quoted-printable Hello list, I've just read the announcement of version 3.1.1, that adds json=20 conversion to custom readers. It would be nice having XML parsing available to Lua readers, since many=20 input formats are XML-based. Currently you can install external modules, but there's a different way=20 to do it in every operating system. When you need your conversions to work across different operating=20 systems, it's better having everything included in Pandoc: you install=20 it and you're done, no need for anything else (even the PATH is set for=20 you). I.e. I'm using xml2lua, but I copied its files instead of installing the=20 package with luarocks. xml2lua files are copied in a directory where I put an 'init.lua' file=20 like this: local loadpaths =3D {} if PANDOC_STATE.user_data_dir then =C2=A0 table.insert(loadpaths, PANDOC_STATE.user_data_dir .. "/?.lua") end package.path =3D package.path .. ";" .. table.concat(loadpaths, ";") XmlParser =3D require('XmlParser') XmlDomHandler =3D require("xmlhandler.dom") then I'm doing my conversions with --data-dir set to that directory. That works the same in Linux and in Windows. Massi --=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/4e2497aa-bb3e-d8e8-c862-5dba2d0b5fbc%40gmail.com. --------------J0o0olNiKzt3a5StedCGTz9s Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Hello list,<= /p>

I've just read the announcement of version 3.1.1, that adds json conversion to custom readers.

It would be nice having XM= L parsing available to Lua readers, since many input formats are XML-based.

Currently you can install external modules, but there's a different way to do it in every operating system.

When you need your conversions to work across different operating systems, it's better having everything included in Pandoc: you install it and you're done, no need for anything else (even the PATH is set for you).


I.e. I'm using xml2lua, but I copied its files instead of installing the package with luarocks.

xml2lua files are copied i= n a directory where I put an 'init.lua' file like this:

local loadpaths =3D {}
if
PANDOC_= STATE.user_data_dir then
=C2=A0 table.insert(loadpaths,
PANDOC_STATE.user_data_dir .. "/?.lua")
end
package.path =3D package.path .. ";" .. table.concat(loadpaths, ";")
XmlParser =3D require('XmlParser')
XmlDomHandler =3D require("xmlhandler.dom")

then I'm doing my conversions with --data-dir set to that directory.

That works the same in Linux and in Windows.


Massi

--
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/p= andoc-discuss/4e2497aa-bb3e-d8e8-c862-5dba2d0b5fbc%40gmail.com.
--------------J0o0olNiKzt3a5StedCGTz9s--