reStructuredText: Plain-text with superpowers

Author: Catherine Devlin

Slides at catherinedevlin.pythoneers.com

Problem

FOSS documenation is terrible.

How bad?

Almost as bad as proprietary!

Why?

Labor of love

reStructuredText

Love to document

Stylesheet revolution

Presentation

content

Where's our revolution?

les-miserables.jpg

To create a document

stovepipe.png

Classic workflow

workflow-old.bmp

reStructuredText

  Plain-text conventions
+ conversion programs
------------------------
  pretty much anything

Flexible, formatted results from simple plaintext

ex1.rst

======
PyCon_
======

Annual conference
-----------------

A *community-organized* Python conference

* World's largest ( ~ 1000 attendees)

* Worldwide draw of community leaders

* Affordable

.. _pycon: us.pycon.org

Workflow with reStructuredText

workflow-rst.bmp

Plain-text rocks anyway

What about LaTeX?

A \emph{community-organized} Python conference
\begin{itemize}
\item {}
World's largest ( {\textasciitilde} 1000 attendees)

\item {}
Worldwide draw of community leaders

\item {}
Affordable

\end{itemize}

\end{document}

"I still prefer LaTeX"

Fine, be that way.

How flexible?

Beyond docutils

Also recognized by

And there's more...

More converters, importers, etc.

Docutils link list

Let's do this

It came from Pythonland

eeek.jpg

David Goodger, maker of reStructuredText

Styles

style.jpg bananarepublic.jpg cardigan.jpg

Styles

rst2html --stylesheet=

rst2pdf --stylesheets=

rst2s5 --theme-url=ui/mytheme

rst2odt --stylesheet=

rst2latex --stylesheet=

Editors

Installation

sudo aptitude update
sudo aptitude install python-dev python-setuptools
sudo easy_install docutils
# stop here if you like
sudo aptitude install python-vtk rst2pdf python-odt rst2man
sudo easy_install sphinx rst2pdf odtwriter
# for rsteditor
sudo aptitude install python-dev python-qt4
sudo easy_install -U numpy
sudo easy_install -U TraitsBackendQt[nonets] AppTools[nonets]

No-install alternative

rst2a.com

rst2a.png

Sphinx

Creates advanced documentation tree.

  1. sphinx-quickstart
  2. fill out toctree (Table of Contents)
  3. Write .rst docs for the contents
  4. make html or sphinx-build

Go forth