Using DocUtils to parse RST with unknown directives

Austin Bart <[email protected]>
Newsgroups gmane.text.docutils.user
Message-ID <CAEzYCNTA95x0gxMvuuSNrs+nOg2LXncsJ__Mu4VepMBV91iPAA@mail.gmail.com>
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

------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.