コード例 #1
0
ファイル: dom_xml.py プロジェクト: steveyen/moingo
    def __init__(self, request, **kw):
        FormatterBase.__init__(self, request, **kw)

        self.document = minidom.Document()
        self.document.documentElement = self.document.createElement('xml')
        self.position = self.document.documentElement
        self.tag_stack = [('xml', {})]
コード例 #2
0
ファイル: groups.py プロジェクト: aahlad/soar
    def __init__(self, request, **kw):
        FormatterBase.__init__(self, request, **kw)

        self.members = []
        self._bullet_list_level = 0
        self._inside_link = False
        self._new_member = ''
コード例 #3
0
ファイル: groups.py プロジェクト: IvanLogvinov/soar
    def __init__(self, request, **kw):
        FormatterBase.__init__(self, request, **kw)

        self.members = []
        self._bullet_list_level = 0
        self._inside_link = False
        self._new_member = ''
コード例 #4
0
    def __init__(self, request, **kw):
        FormatterBase.__init__(self, request, **kw)

        self.document = minidom.Document()
        self.document.documentElement = self.document.createElement('xml')
        self.position = self.document.documentElement
        self.tag_stack = [('xml', {})]
コード例 #5
0
ファイル: application_xml.py プロジェクト: pombredanne/akara
 def __init__(self, request, **kw):
     FormatterBase.__init__(self, request, **kw)
     self._current_depth = 1
     self._base_depth = 0
     self.in_pre = 0
     self._doc = tree.entity()
     self._curr = self._doc
     # self._writer = structwriter(indent=u"yes", encoding=config.charset)
     return
コード例 #6
0
 def __init__(self, request, **kw):
     FormatterBase.__init__(self, request, **kw)
     self._current_depth = 1
     self._base_depth = 0
     self.in_pre = 0
     self._doc = tree.entity()
     self._curr = self._doc
     #self._writer = structwriter(indent=u"yes", encoding=config.charset)
     return
コード例 #7
0
ファイル: text_plain.py プロジェクト: steveyen/moingo
 def __init__(self, request, **kw):
     FormatterBase.__init__(self, request, **kw)
     self._in_code_area = 0
     self._in_code_line = 0
     self._code_area_state = [0, -1, -1, 0]
     self._in_list = 0
     self._did_para = 0
     self._url = None
     self._text = None # XXX does not work with links in headings!!!!!
コード例 #8
0
ファイル: text_plain.py プロジェクト: IvanLogvinov/soar
 def __init__(self, request, **kw):
     FormatterBase.__init__(self, request, **kw)
     self._in_code_area = 0
     self._in_code_line = 0
     self._code_area_state = [0, -1, -1, 0]
     self._lists = []
     self._url = None
     self._text = None  # XXX does not work with links in headings!!!!!
     self._text_stack = []
     self._skip_text = False
     self._wrap_skip_text = False
     self._textbuf = ''
     self._indent = 0
     self._listitem_on = []
     self._empty_line_count = 2
     self._paragraph_ended = False
     self._paragraph_skip_begin = True
コード例 #9
0
 def __init__(self, request, **kw):
     FormatterBase.__init__(self, request, **kw)
     self._in_code_area = 0
     self._in_code_line = 0
     self._code_area_state = [0, -1, -1, 0]
     self._lists = []
     self._url = None
     self._text = None  # XXX does not work with links in headings!!!!!
     self._text_stack = []
     self._skip_text = False
     self._wrap_skip_text = False
     self._textbuf = ''
     self._indent = 0
     self._listitem_on = []
     self._empty_line_count = 2
     self._paragraph_ended = False
     self._paragraph_skip_begin = True
コード例 #10
0
    def __init__(self, request, doctype="article", **kw):
        FormatterBase.__init__(self, request, **kw)
        self.request = request
        '''
        If the formatter is used by the Include macro, it will set
        is_included=True in which case we know we need to call startDocument
        and endDocument from startContent and endContent respectively, since
        the Include macro will not be calling them, and the formatter doesn't
        work properly unless they are called.
        '''
        if kw.has_key("is_included") and kw["is_included"]:
            self.include_kludge = True
        else:
            self.include_kludge = False

        self.doctype = doctype
        self.curdepth = 0
        self.cur = None
コード例 #11
0
    def __init__(self, request, doctype="article", **kw):
        FormatterBase.__init__(self, request, **kw)
        self.request = request

        '''
        If the formatter is used by the Include macro, it will set
        is_included=True in which case we know we need to call startDocument
        and endDocument from startContent and endContent respectively, since
        the Include macro will not be calling them, and the formatter doesn't
        work properly unless they are called.
        '''
        if kw.has_key("is_included") and kw["is_included"]:
            self.include_kludge = True
        else:
            self.include_kludge = False

        self.doctype = doctype
        self.curdepth = 0
        self.cur = None
コード例 #12
0
ファイル: text_xml.py プロジェクト: aahlad/soar
 def __init__(self, request, **kw):
     FormatterBase.__init__(self, request, **kw)
     self._current_depth = 1
     self._base_depth = 0
     self.in_pre = 0
コード例 #13
0
ファイル: nullformatter.py プロジェクト: execgit/graphingwiki
 def __init__(self, request, **kw):
     self.textstorage = list()
     FormatterBase.__init__(self, request, **kw)
コード例 #14
0
 def __init__(self, request, **kw):
     FormatterBase.__init__(self, request, **kw)
     self.in_heading = False
     self.collected_headings = request._tocfm_collected_headings
コード例 #15
0
ファイル: TableOfContents.py プロジェクト: Glottotopia/aagd
 def __init__(self, request, **kw):
     FormatterBase.__init__(self, request, **kw)
     self.in_heading = False
     self.collected_headings = request._tocfm_collected_headings
コード例 #16
0
ファイル: groups.py プロジェクト: execgit/gwiki-with-moin
    def __init__(self, request, **kw):
        FormatterBase.__init__(self, request, **kw)

        self.members = []
        self._bullet_list_level = 0
        self._catch_name = False
コード例 #17
0
ファイル: text_x-rst.py プロジェクト: epronk/moin2rst
 def __init__(self, request, **kw):
     # Initialize globally accessible flags
     FormatterBase.__init__(self, request, **kw)
     """
     Current indentation in characters.
     @type: int
     """
     self._indentation = 0
     """
     Was last line completed by a linefeed?
     @type: bool
     """
     self._lastLineComplete = True
     """
     Maps substitution names to images.
     @type: { str: str, ... }
     """
     self._substitution2Image = { }
     """
     Current list of strings collecting text which is meant to be output.
     @type: [ str, ... ]
     """
     self._collectors = [ ]
     """
     Current list of open lists.
     @type: [ Formatter.List, ... ]
     """
     self._openLists = [ ]
     """
     Text output since last linefeed.
     @type: str
     """
     self._sinceEOL = u""
     """
     Text output since last block start.
     @type: str
     """
     self._sinceBLK = u""
     """
     Current inline style.
     @type: Style
     """
     self._currentStyle = None
     """
     A space pends to be output.
     @type: bool
     """
     self._spacePending = u""
     """
     Maps descriptions to URLs
     @type: [ ( str, str, ), ... ]
     """
     self._description_urls = [ ]
     """
     Number of last footnote.
     @type: int
     """
     self._lastFootNote = 0
     """
     Maps numbers to footnote texts not output so far.
     @type: { int: str, ... ]
     """
     self._number2Footnote = { }
     """
     Name of the rendered page.
     @type: str
     """
     self._pageName = None
     """
     Depth of the table of contents or ``None``. ``0`` means unlimited.
     @type: int
     """
     self._contentsDepth = None
コード例 #18
0
ファイル: text_x-rst.py プロジェクト: ismaelbej/moin2rst
 def __init__(self, request, **kw):
     # Initialize globally accessible flags
     FormatterBase.__init__(self, request, **kw)
     """
     Current indentation in characters.
     @type: int
     """
     self._indentation = 0
     """
     Was last line completed by a linefeed?
     @type: bool
     """
     self._lastLineComplete = True
     """
     Maps substitution names to images.
     @type: { str: str, ... }
     """
     self._substitution2Image = { }
     """
     Current list of strings collecting text which is meant to be output.
     @type: [ str, ... ]
     """
     self._collectors = [ ]
     """
     Current list of open lists.
     @type: [ Formatter.List, ... ]
     """
     self._openLists = [ ]
     """
     Text output since last linefeed.
     @type: str
     """
     self._sinceEOL = u""
     """
     Text output since last block start.
     @type: str
     """
     self._sinceBLK = u""
     """
     Current inline style.
     @type: Style
     """
     self._currentStyle = None
     """
     A space pends to be output.
     @type: bool
     """
     self._spacePending = u""
     """
     Maps descriptions to URLs
     @type: [ ( str, str, ), ... ]
     """
     self._description_urls = [ ]
     """
     Number of last footnote.
     @type: int
     """
     self._lastFootNote = 0
     """
     Maps numbers to footnote texts not output so far.
     @type: { int: str, ... ]
     """
     self._number2Footnote = { }
     """
     Name of the rendered page.
     @type: str
     """
     self._pageName = None
     """
     Depth of the table of contents or ``None``. ``0`` means unlimited.
     @type: int
     """
     self._contentsDepth = None
     self._table = None
コード例 #19
0
 def __init__(self, request, **kw):
     self.textstorage = list()
     FormatterBase.__init__(self, request, **kw)