rst-parser icon indicating copy to clipboard operation
rst-parser copied to clipboard

Individual events for when each file is parsed & rendered

Open weaverryan opened this issue 7 years ago • 1 comments

We have an event system (yay!) but I think there's no way yet to know when each file is being parsed/rendered. We'd like to add some output while running our version of the parser - e.g.

Parsing foo.rst Parsing bar.rst Rendering foo.html

Something like this - it'll help when there are errors and also help with seeing progress (we're thinking of also using these same events to show a progress bar through the parsing & rendering progress).

Is that possible now? Or can we dispatch a new event?

Thanks!

weaverryan avatar Dec 09 '18 15:12 weaverryan

Or maybe PreParseDocumentEvent::PRE_PARSE_DOCUMENT is what we need? It looks like this is parsed once per document, but the description is:

Dispatches a method named preParseDocument() before a node is parsed.

It says "node", not "document"... but the docs might be right and I may be misunderstanding the purpose of this event.

weaverryan avatar Dec 09 '18 15:12 weaverryan