Tomas Vondra
2014-02-28 22:01:56 UTC
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
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