Skip to main content

Transform reStructuredText into XML Atom 1.0

Project description

Author: Marco Giusti
Date: 2010-03-08


rst2atom is exactly what you think. It uses structures to build the XML.

The package should be considered highly experimental until I learned more about XML Atom and docutils or someone else contributes to the project.


rst2atom uses gdata python client library and pygments. While gdata library is required, pygments it isn’t but is recommended to properly parse sourcecode directives.


Using easy_install:

easy_install rst2atom

or pip:

pip install rst2atom

or download the source package and type:

python install


rst2atom extends the standard html writer. Write documents as usual and don’t forget to add bibliographic elements like author, date and category (not implemented yet).

Here the classic hello world example:

Hello world


.. sourcecode:: python

        def print_(obj):
                print obj


Try it with livejournal:

$ rst2atom test.rst test.xml
$ curl -d @test.xml --digest -u <YOUR_USERNAME_HERE> -H \
    "Content-Type: application/atom+xml;type=entry" -v \


rst2atom suppose that there is just one entry for feed, maybe this behavior could change in the future but that is it so it sets entry’s field instead of feed’s fields.

For the moment just the following directives are understood by rst2atom:

This field sets the entry author if is child of docinfo. If it is child of authors add a contributor.
The contact field sets the email of the author if the node parent is author, else if at least one contributor is given, sets its email.
This sets the updated attribute.
Sets the rights attribute.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
rst2atom-0.1.1.tar.gz (8.6 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page