docutils.readers.Reader

Package docutils :: Package readers :: Class Reader |
[show private | hide private]
[frames | no frames]

## Class Reader

     SettingsSpec --+
                    |
    TransformSpec --+
                    |
            Component --+
                        |
                       Reader

Known Subclasses:
  `Reader`

Abstract base class for docutils Readers.

Each reader module or package must export a subclass also called 'Reader'.

The three steps of a Reader's responsibility are defined: `scan()`, `parse()`, and `transform()`. Call `read()` to process a document.

Method Summary
| ``__init__`(self, parser, parser_name)` Initialize the Reader instance.
| ``new_document`(self)` Create and return a new empty document tree (root node).
| ``parse`(self)` Parse `self.input` into a document tree.
| `read(self, source, parser, settings)`
| ``set_parser`(self, parser_name)` Set `self.parser` by name.
Inherited from `Component`: `supports`

Class Variable Summary
`str` | `component_type` = `'reader'`
Inherited from `Component`: `supported` Inherited from `SettingsSpec`: `relative_path_settings`, `settings_default_overrides`, `settings_defaults`, `settings_spec` Inherited from `TransformSpec`: `default_transforms`

Method Details

### __init__(self, parser=None, parser_name='restructuredtext') (Constructor) Initialize the Reader instance. Several instance attributes are defined with dummy initial values. Subclasses may use these attributes as they wish.

### new_document(self) Create and return a new empty document tree (root node).

### parse(self) Parse `self.input` into a document tree.

### set_parser(self, parser_name) Set `self.parser` by name.

Class Variable Details

    ### component_type Type: `str` Value:
        'reader'

Generated by Epydoc 2.1 on Sat Mar 20 17:46:16 2004 | http://epydoc.sf.net