From: mf <massifrg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: feature request: lua xml parsing for custom readers
Date: Mon, 6 Mar 2023 10:30:34 +0100 [thread overview]
Message-ID: <4e2497aa-bb3e-d8e8-c862-5dba2d0b5fbc@gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1565 bytes --]
Hello list,
I've just read the announcement of version 3.1.1, that adds json
conversion to custom readers.
It would be nice having XML 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 in a directory where I put an 'init.lua' file
like this:
local loadpaths = {}
if PANDOC_STATE.user_data_dir then
table.insert(loadpaths, PANDOC_STATE.user_data_dir .. "/?.lua")
end
package.path = package.path .. ";" .. table.concat(loadpaths, ";")
XmlParser = require('XmlParser')
XmlDomHandler = 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 "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/4e2497aa-bb3e-d8e8-c862-5dba2d0b5fbc%40gmail.com.
[-- Attachment #2: Type: text/html, Size: 3259 bytes --]
reply other threads:[~2023-03-06 9:30 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4e2497aa-bb3e-d8e8-c862-5dba2d0b5fbc@gmail.com \
--to=massifrg-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).