public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* feature request: lua xml parsing for custom readers
@ 2023-03-06  9:30 mf
  0 siblings, 0 replies; only message in thread
From: mf @ 2023-03-06  9:30 UTC (permalink / raw)
  To: pandoc-discuss

[-- 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 --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-03-06  9:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-06  9:30 feature request: lua xml parsing for custom readers mf

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).