philip grabner
2013-09-26 22:34:50 UTC
hello docutils-users,
i'm working on a tool that generates reStructuredText
(https://pypi.python.org/pypi/pyramid_describe) which embeds rST text
from external sources. the other sources can potentially define titled
sections, which is leading to a "SystemMessage: (SEVERE/4) Title level
inconsistent" error.
the "obvious to me" way to solve this is to parse the embedded source
into a doctree using docutils, insert the result into the appropriate
place in the doctree generated by the tool, and then write the whole
thing out to rST.
unfortunately, there does not seem to be a "docutils.writers.rst" module
that takes a doctree and generates rST output...
what is the best way to do this?
thanks!
ps: i'm not subscribed to docutils-users, so please keep me in the cc-list.
i'm working on a tool that generates reStructuredText
(https://pypi.python.org/pypi/pyramid_describe) which embeds rST text
from external sources. the other sources can potentially define titled
sections, which is leading to a "SystemMessage: (SEVERE/4) Title level
inconsistent" error.
the "obvious to me" way to solve this is to parse the embedded source
into a doctree using docutils, insert the result into the appropriate
place in the doctree generated by the tool, and then write the whole
thing out to rST.
unfortunately, there does not seem to be a "docutils.writers.rst" module
that takes a doctree and generates rST output...
what is the best way to do this?
thanks!
ps: i'm not subscribed to docutils-users, so please keep me in the cc-list.