HappyDoc Generated Documentation Class: DocumentClass

HappyDoc3-r3_1 / happydoclib / docstring / StructuredText / ClassicDocumentClass.py / DocumentClass 

Class instance calls [ex.=> x()] require a structured text structure. Doc will then parse each paragraph in the structure and will find the special structures within each paragraph. Each special structure will be stored as an instance. Special structures within another special structure are stored within the top structure EX : -underline this- => would be turned into an underline instance. -underline **this** would be stored as an underline instance with a strong instance stored in its string

Methods   
  doc_strong 
doc_strong (
        self,
        s,
        expr=re.compile( '\s*\*\*([ \n%s0-9.:/;\-,!\?\'\"]+)\*\*' % letters ).search,
        )
  doc_description 
doc_description (
        self,
        paragraph,
        delim=re.compile( '\s+--\s+' ).search,
        nb=re.compile( r'[^\000- ]' ).search,
        )
  doc_href 
doc_href (
        self,
        s,
        expr,
        punctuation=re.compile( "[\,\.\?\!\;]+" ).match,
        )
  doc_numbered 
doc_numbered (
        self,
        paragraph,
        expr=re.compile( '(\s*[%s]+\.)|(\s*[0-9]+\.)|(\s*[0-9]+\s+)' % letters ).match,
        )
  doc_href1 
doc_href1 (
        self,
        s,
        expr=re.compile( "(\"[ %s0-9\n\-\.\,\;\(\)\/\:\/\*\']+\")(:)([a-zA-Z0-9\@\.\,\?\!\/\:\;\-\#\~]+)([,]*\s*)" % letters ).search,
        )
  doc_href2 
doc_href2 (
        self,
        s,
        expr=re.compile( '(\"[ %s0-9\n\-\.\:\;\(\)\/\*\']+\")([,]+\s+)([a-zA-Z0-9\@\.\,\?\!\/\:\;\-\#\~]+)(\s*)' % letters ).search,
        )
  parse 
parse (
        self,
        raw_string,
        text_type,
        type=type,
        sts=StringTypes,
        lt=type([] ),
        )

Parse accepts a raw_string, an expr to test the raw_string, and the raw_string's subparagraphs.

Parse will continue to search through raw_string until all instances of expr in raw_string are found.

If no instances of expr are found, raw_string is returned. Otherwise a list of substrings and instances is returned

  doc_emphasize 
doc_emphasize (
        self,
        s,
        expr=re.compile( '\s*\*([ \n%s0-9.:/;,\'\"\?\=\-\>\<\(\)]+)\*(?!\*|-)' % letters ).search,
        )
  doc_inner_link 
doc_inner_link (
        self,
        s,
        expr1=re.compile( "\.\.\s*" ).search,
        expr2=re.compile( "\[[%s0-9]+\]" % letters ).search,
        )
  color_paragraphs 
color_paragraphs (
        self,
        raw_paragraphs,
        type=type,
        sequence_types=(type([] ), type(() ) ),
        sts=StringTypes,
        )
  __call__ 
__call__ ( self,  doc )
  doc_named_link 
doc_named_link (
        self,
        s,
        expr=re.compile( r"(\.\.\s)(\[[%s0-9]+\])" % letters ).search,
        )
  doc_underline 
doc_underline (
        self,
        s,
        expr=re.compile( "_([%s0-9\s\.,\?\/]+)_" % letters ).search,
        )
  doc_bullet 
doc_bullet (
        self,
        paragraph,
        expr=re.compile( '\s*[-*o]\s+' ).match,
        )
  doc_header 
doc_header (
        self,
        paragraph,
        expr=re.compile( '[ %s0-9.:/,-_*<>\?\'\"]+' % letters ).match,
        )
  doc_literal 
doc_literal (
        self,
        s,
        expr=re.compile( "(?:\s|^)'" "([^ \t\n\r\f\v']|[^ \t\n\r\f\v'][^\n']*[^ \t\n\r\f\v'])" "'(?:\s|[,.;:!?]|$)" ).search,
        )
  doc_table 
doc_table (
        self,
        paragraph,
        expr=re.compile( '(\s*)([||]+)' ).match,
        )
  color_text 
color_text (
        self,
        str,
        types=None,
        )

Search the paragraph for each special structure


This document was automatically generated Tue Dec 5 08:31:15 2006 by HappyDoc version 3.1