/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

Public Member Functions | Public Attributes | Static Public Attributes
DybPython::vlut::rst::Toc Class Reference
Collaboration diagram for DybPython::vlut::rst::Toc:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def __repr__
def __str__
def write

Public Attributes

 base
 title
 notes

Static Public Attributes

string head = r""
string tail = r""

Detailed Description

Writes index document (typically `index.rst`) containing :rst:directive:`toctree` 
with the relative paths to the content names provided

For understanding what sphinx comes up with bear in mind the impact of 
three tree hierarchies that all play a role:

#. rst file tree, controlled by toctree
#. heading tree, presented content hierarchy depends on rst content usage of section headings  


Definition at line 27 of file rst.py.


Constructor & Destructor Documentation

def DybPython::vlut::rst::Toc::__init__ (   self,
  base = None,
  title = None 
)
:param base: path of the index document to be written 

Definition at line 51 of file rst.py.

00052                                               :
00053         """
00054         :param base: path of the index document to be written 
00055         """
00056         list.__init__(self)
00057         self.base = base
00058         self.title = title
00059         self.notes = []


Member Function Documentation

def DybPython::vlut::rst::Toc::__repr__ (   self)

Definition at line 60 of file rst.py.

00061                       :
00062         return "Toc(base='%s',title='%s')" % ( self.base , self.title )

def DybPython::vlut::rst::Toc::__str__ (   self)

Definition at line 63 of file rst.py.

00064                      :
00065          titl = []
00066          if self.title:
00067              titl = rst_title(self.title,"-").split("\n")
00068 
00069          unrst = lambda _:_[:-4]
00070          def prep(path):
00071              assert path[-4:] == '.rst', path 
00072              return os.path.relpath( unrst(path) , os.path.dirname(self.base) )          
00073          return "\n".join(titl + [_ for _ in self.notes]) + "\n" + self.head + "\n".join(["   %s" % (_) for _ in map(prep,self)]) + self.tail

def DybPython::vlut::rst::Toc::write (   self)

Definition at line 74 of file rst.py.

00075                    :
00076         log.info("writing Toc %s " % self.base )
00077         with open(self.base,"w") as fp:
00078             fp.write(str(self))
00079 
00080 


Member Data Documentation

string DybPython::vlut::rst::Toc::head = r"" [static]

Definition at line 41 of file rst.py.

string DybPython::vlut::rst::Toc::tail = r"" [static]

Definition at line 46 of file rst.py.

Definition at line 53 of file rst.py.

Definition at line 53 of file rst.py.

Definition at line 53 of file rst.py.


The documentation for this class was generated from the following file:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Fri May 16 2014 09:55:41 for DybPython by doxygen 1.7.4