From: David G. <go...@py...> - 2017-10-17 19:54:58
|
On Fri, Oct 13, 2017 at 11:11 AM, Tony N <to...@gi...> wrote: > This was actually straight forward for me, see an example on a blog post > here: http://homework.nwsnet.de/releases/af95/ > > However, even though I’m removing the title, I’m still intending on storing > reStructuredText. > > I forget there’s no reStructuredText Writer for docutils (one could only > wish). So I ended up using a regex to chop the title portion out. The Element.line, .source, and .rawsource attributes may be useful. David Goodger <http://python.net/~goodger> > On October 12, 2017 at 2:54:59 PM, Tony N (to...@gi...) wrote: > > Since I am already able to read the title/subtitle from the doctree, now I > want to be able to remove the title and subtitle from a doctree: > > What would be the canonical way of doing that? > > - Removing the nodes.title and nodes.subtitle from the doctree (how can that > be done? Is there any examples to how that works?) > - Removing all nodes *after* nodes.title and nodes.subtitle (any examples > for something like that?) > |