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

Class Reader

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

Known Subclasses:
Reader, 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(self, format)
Is format supported by this component?

Class Variable Summary
str component_type = 'reader'
    Inherited from Component
tuple supported = ()
    Inherited from SettingsSpec
tuple relative_path_settings = ()
NoneType settings_default_overrides = None                                                                  
NoneType settings_defaults = None                                                                  
tuple settings_spec = ()
    Inherited from TransformSpec
tuple 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.0 on Tue Jul 22 05:31:39 2003 http://epydoc.sf.net