extracting metada about a rst document / directives

Tomas Vondra <[email protected]>
Newsgroups gmane.text.docutils.user
Message-ID <[email protected]>
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

------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
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.