public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Report Location in Lua Filter
@ 2023-04-27  9:22 ThomasH
  0 siblings, 0 replies; only message in thread
From: ThomasH @ 2023-04-27  9:22 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 1602 bytes --]

Hi all,

first off, thanks for Pandoc, it's a beautiful tool. I've been using it on 
and off over many years, mostly for ad-hoc tasks, and am now in the middle 
of a larger transformation project.

I have several use cases where I want to report a location in a file rather 
than transform it, e.g. ordered lists with a single list item which doesn't 
make a lot of sense. It's easy enough to spot such constructs in a Lua 
filter, but for the files I'm working on it is not so obvious how to 
transform such constructs. So we made a decision to fix these situations by 
hand.

In an input file base of roughly 3,500 files it would just be helpful to 
generate a report that produces all the locations where such constructs 
appear. So I'm looking for ways to deploy Pandoc's AST as a vehicle to 
report these occasions. Ideally, I would e.g. attatch "LogMessage" objects 
to the AST at these places, and on output these log messages would be 
filled, eg. with file path and line number of the current output file. 
Would something in this vein be possible?

I'm sorry if the answer is too obvious, it's just now that I really take a 
look at all the documentation and examples.

Thanks, T.

-- 
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/f2713b34-0040-4c07-8d8b-dd3bd0de1755n%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 2026 bytes --]

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

only message in thread, other threads:[~2023-04-27  9:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-27  9:22 Report Location in Lua Filter ThomasH

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