I have some RST files that use a number of custom directives. I need to get a tree-based representation (e.g., like I'd get from publish_doctree) of these files before I pass them into Sphinx (via Paver) and have them parsed properly. I don't want any sophisticated processing of the directives - I just want to know where in the document any given directive occurs, along with its options and content.

If I try and just pass the files into publish_doctree, it gets upset because it hasn't been told about all the custom directives that are possible. Is my only option to implement my own parser? Or is there some way to tell docutils to not Except on unknown directives? The following conversation makes me think that it might not be possible:

http://article.gmane.org/gmane.text.docutils.user/4176/match=publish_doctree

Please note that I'm not subscribed to this listserv, so please CC me on responses! Thanks for your time and help!

--
Austin Cory Bart
Computer Science PhD student at Virginia Tech
http://www.acbart.com