rst2atom

Transform reStructuredText into XML Atom 1.0
Download

rst2atom Ranking & Summary

Advertisement

  • Rating:
  • License:
  • MIT/X Consortium Lic...
  • Price:
  • FREE
  • Publisher Name:
  • Marco Giusti
  • Publisher web site:
  • http://bitbucket.org/gm/

rst2atom Tags


rst2atom Description

Transform reStructuredText into XML Atom 1.0 rst2atom is a Python module that uses gdata.atom.data 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.Requirementsrst2atom uses gdata python client library and pygments. While gdata library is required, pygments it isn't but is recommended to properly parse sourcecode directives.Installation:Using easy_install:easy_install rst2atomor pip:pip install rst2atomor download the source package and type:python setup.py installUsage: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===========asdfasdfadf.. sourcecode:: python def print_(obj): print objasdasdfTry it with livejournal:$ rst2atom test.rst test.xml$ curl -d @test.xml --digest -u -H \ "Content-Type: application/atom+xml;type=entry" -v \ http://www.livejournal.com/interface/atom/postFieldsrst2atom 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:author This field sets the entry author if is child of docinfo. If it is child of authors add a contributor.contact 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.date This sets the updated attribute.copyright Sets the rights attribute. Requirements: · Python


rst2atom Related Software