Discussion:
[Docutils-users] extracting metada about a rst document / directives
Tomas Vondra
2014-02-28 22:01:56 UTC
Permalink
Hi all,

I need to process rst documents using docutils - I got the basics
working (i.e. conversion into html etc.) but I'm a bit stuck with
extracting document metadata.

Each document has a few items on top - for example

:Date: 2014-02-28
:Published: no
:Author: John Doe
:Slug: this-is-my-first-doc
:Language: en

And I need to extract this, so that I can process that - into a python
dictionary or something like that. I've noticed I could do extract that
from the doctree, but isn't there another - more straightforward way?

thanks
Tomas

Loading...