root / pycommunity / pycommunity / doc / resttask.txt

Revision 78:b5dabe9762d1, 0.7 kB (checked in by Tarek Ziad?? <tarek@…>, 15 months ago)

rupy slides, starting up

Line 
1========
2resttask
3========
4
5Provides base class for tasks that deals with rest files.
6
7`TaksView` provides a generic viewer, that knows how to render rest files,
8given a Cheetah template and a reST file::
9
10    >>> from resttask import TaskView
11    >>> view = TaskView('tests/templates/recipe.pt',
12    ...                 'tests/svn/project/recipes/glossary_recipe.txt',
13    ...                 'tests/svn/project/doc/glossary.txt',
14    ...                 ['tests/svn/project/doc/tutorials'], [])
15    ...
16    >>> title, content = view()
17    >>> title
18    'How to make a glossary'
19
20The content is also scanned, to replace glossary entries::
21
22    >>> print content
23    <html>
24    ...
25    <acronym title='a documentation generator'>PyCommunity</a>
26    ...
27    </html>
Note: See TracBrowser for help on using the browser.