Back to index

moin  1.9.0~rc2
Public Member Functions | Public Attributes | Static Public Attributes | Private Attributes
MoinMoin.formatter.text_plain.Formatter Class Reference
Inheritance diagram for MoinMoin.formatter.text_plain.Formatter:
Inheritance graph
[legend]
Collaboration diagram for MoinMoin.formatter.text_plain.Formatter:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def startDocument
def endDocument
def sysmsg
def pagelink
def interwikilink
def url
def attachment_link
def attachment_image
def attachment_drawing
def text
def rule
def strong
def emphasis
def highlight
def number_list
def bullet_list
def listitem
def sup
def sub
def strike
def code
def preformatted
def small
def big
def code_area
def code_line
def code_token
def paragraph
def linebreak
def smiley
def heading
def table
def table_row
def table_cell
def underline
def definition_list
def definition_term
def definition_desc
def image
def transclusion
def transclusion_param
def lang
def set_highlight_re
def setPage
def startContent
def endContent
def attachment_inlined
def anchordef
def line_anchordef
def anchorlink
def line_anchorlink
def nowikiword
def code_area
def icon
def macro
def parser
def div
def span
def rawHTML
def escapedText
def comment
def sanitize_to_id
def make_id_unique
def qualify_id

Public Attributes

 request
 pagelinks
 in_p
 in_pre
 page

Static Public Attributes

string hardspace = u' '

Private Attributes

 _in_code_area
 _in_code_line
 _code_area_state
 _in_list
 _did_para
 _url
 _text

Detailed Description

    Send plain text data.

Definition at line 11 of file text_plain.py.


Constructor & Destructor Documentation

def MoinMoin.formatter.text_plain.Formatter.__init__ (   self,
  request,
  kw 
)

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 18 of file text_plain.py.

00018 
00019     def __init__(self, request, **kw):
00020         FormatterBase.__init__(self, request, **kw)
00021         self._in_code_area = 0
00022         self._in_code_line = 0
00023         self._code_area_state = [0, -1, -1, 0]
00024         self._in_list = 0
00025         self._did_para = 0
00026         self._url = None
00027         self._text = None # XXX does not work with links in headings!!!!!


Member Function Documentation

def MoinMoin.formatter.FormatterBase.anchordef (   self,
  name 
) [inherited]

Reimplemented in MoinMoin.formatter.text_html.Formatter, MoinMoin.formatter.text_docbook.Formatter, MoinMoin.formatter.dom_xml.Formatter, and MoinMoin.formatter.text_xml.Formatter.

Definition at line 147 of file __init__.py.

00147 
00148     def anchordef(self, name):
00149         return ""

Here is the caller graph for this function:

def MoinMoin.formatter.FormatterBase.anchorlink (   self,
  on,
  name = '',
  kw 
) [inherited]

Reimplemented in MoinMoin.formatter.text_html.Formatter, MoinMoin.formatter.text_docbook.Formatter, MoinMoin.formatter.dom_xml.Formatter, and MoinMoin.formatter.text_xml.Formatter.

Definition at line 153 of file __init__.py.

00153 
00154     def anchorlink(self, on, name='', **kw):
00155         return ""

Here is the caller graph for this function:

def MoinMoin.formatter.text_plain.Formatter.attachment_drawing (   self,
  url,
  text,
  kw 
)

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 85 of file text_plain.py.

00085 
00086     def attachment_drawing(self, url, text, **kw):
00087         return "[drawing:%s]" % text

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 78 of file text_plain.py.

00078 
00079     def attachment_image(self, url, **kw):
00080         title = ''
00081         for a in (u'title', u'html__title', u'alt', u'html_alt'):
00082             if a in kw:
00083                 title = ':' + kw[a]
00084         return "[image:%s%s]" % (url, title)

def MoinMoin.formatter.FormatterBase.attachment_inlined (   self,
  url,
  text,
  kw 
) [inherited]

Reimplemented in MoinMoin.formatter.text_gedit.Formatter.

Definition at line 123 of file __init__.py.

00123 
00124     def attachment_inlined(self, url, text, **kw):
00125         from MoinMoin.action import AttachFile
00126         import os
00127         _ = self.request.getText
00128         pagename, filename = AttachFile.absoluteName(url, self.page.page_name)
00129         fname = wikiutil.taintfilename(filename)
00130         fpath = AttachFile.getFilename(self.request, pagename, fname)
00131         ext = os.path.splitext(filename)[1]
00132         Parser = wikiutil.getParserForExtension(self.request.cfg, ext)
00133         if Parser is not None:
00134             try:
00135                 content = file(fpath, 'r').read()
00136                 # Try to decode text. It might return junk, but we don't
00137                 # have enough information with attachments.
00138                 content = wikiutil.decodeUnknownInput(content)
00139                 colorizer = Parser(content, self.request, filename=filename)
00140                 colorizer.format(self)
00141             except IOError:
00142                 pass
00143 
00144         return (self.attachment_link(1, url) +
00145                 self.text(text) +
00146                 self.attachment_link(0))

Here is the call graph for this function:

def MoinMoin.formatter.text_plain.Formatter.attachment_link (   self,
  on,
  url = None,
  kw 
)

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 72 of file text_plain.py.

00072 
00073     def attachment_link(self, on, url=None, **kw):
00074         if on:
00075             return "["
00076         else:
00077             return "]"

def MoinMoin.formatter.text_plain.Formatter.big (   self,
  on,
  kw 
)

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 170 of file text_plain.py.

00170 
00171     def big(self, on, **kw):
00172         return u''

def MoinMoin.formatter.text_plain.Formatter.bullet_list (   self,
  on,
  kw 
)

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 119 of file text_plain.py.

00119 
00120     def bullet_list(self, on, **kw):
00121         if on:
00122             self._in_list = -1
00123             return [u'\n', u'\n\n'][not self._did_para]
00124         else:
00125             self._in_list = 0
00126             if not self._did_para:
00127                 self._did_para = 1
00128                 return u'\n'
00129         return u''

def MoinMoin.formatter.text_plain.Formatter.code (   self,
  on,
  kw 
)

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 154 of file text_plain.py.

00154 
00155     def code(self, on, **kw):
00156         #return [unichr(0x60), unichr(0xb4)][not on]
00157         return u"'" # avoid high-ascii

def MoinMoin.formatter.text_plain.Formatter.code_area (   self,
  on,
  code_id,
  code_type = 'code',
  show = 0,
  start = -1,
  step = -1,
  msg = None 
)

Definition at line 173 of file text_plain.py.

00173 
00174     def code_area(self, on, code_id, code_type='code', show=0, start=-1, step=-1, msg=None):
00175         snip = u'---CodeArea'
00176         snip = snip + (u'-' * (78 - len(snip)))
00177         if on:
00178             self._in_code_area = 1
00179             self._in_code_line = 0
00180             self._code_area_state = [show, start, step, start]
00181             return u'\n' + snip + u'\n'
00182         else:
00183             if self._in_code_line:
00184                 return self.code_line(0) + snip + u'\n'
00185             return snip + u'\n'

Here is the call graph for this function:

def MoinMoin.formatter.FormatterBase.code_area (   self,
  on,
  code_id,
  kw 
) [inherited]

Definition at line 248 of file __init__.py.

00248 
00249     def code_area(self, on, code_id, **kw):
00250         raise NotImplementedError

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 186 of file text_plain.py.

00186 
00187     def code_line(self, on):
00188         res = u''
00189         if not on or (on and self._in_code_line):
00190             res += u'\n'
00191         if on:
00192             if self._code_area_state[0] > 0:
00193                 res += u' %4d  ' % self._code_area_state[3]
00194                 self._code_area_state[3] += self._code_area_state[2]
00195         self._in_code_line = on != 0
00196         return res

def MoinMoin.formatter.text_plain.Formatter.code_token (   self,
  on,
  tok_type 
)

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 197 of file text_plain.py.

00197 
00198     def code_token(self, on, tok_type):
00199         return ""

def MoinMoin.formatter.FormatterBase.comment (   self,
  text,
  kw 
) [inherited]

Reimplemented in MoinMoin.formatter.text_gedit.Formatter.

Definition at line 389 of file __init__.py.

00389 
00390     def comment(self, text, **kw):
00391         return ""

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 244 of file text_plain.py.

00244 
00245     def definition_desc(self, on, **kw):
00246         return [u'    ', u'\n'][not on]

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 233 of file text_plain.py.

00233 
00234     def definition_list(self, on, **kw):
00235         return u''

def MoinMoin.formatter.text_plain.Formatter.definition_term (   self,
  on,
  compact = 0,
  kw 
)

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 236 of file text_plain.py.

00236 
00237     def definition_term(self, on, compact=0, **kw):
00238         result = u''
00239         if not compact:
00240             result = result + u'\n'
00241         if not on:
00242             result = result + u':\n'
00243         return result

def MoinMoin.formatter.FormatterBase.div (   self,
  on,
  kw 
) [inherited]
open/close a blocklevel division 

Reimplemented in MoinMoin.formatter.text_html.Formatter, and MoinMoin.formatter.text_docbook.Formatter.

Definition at line 354 of file __init__.py.

00354 
00355     def div(self, on, **kw):
00356         """ open/close a blocklevel division """
00357         return ""

def MoinMoin.formatter.text_plain.Formatter.emphasis (   self,
  on,
  kw 
)

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 102 of file text_plain.py.

00102 
00103     def emphasis(self, on, **kw):
00104         return u'/'

def MoinMoin.formatter.FormatterBase.endContent (   self) [inherited]

Reimplemented in MoinMoin.formatter.text_docbook.Formatter, and MoinMoin.macro.TableOfContents.TOCFormatter.

Definition at line 80 of file __init__.py.

00080 
00081     def endContent(self):
00082         if self.page:
00083             self.request.uid_generator.end()
00084         return ""

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 32 of file text_plain.py.

00032 
00033     def endDocument(self):
00034         return u'\n'

def MoinMoin.formatter.FormatterBase.escapedText (   self,
  on,
  kw 
) [inherited]
This allows emitting text as-is, anything special will
    be escaped (at least in HTML, some text output format
    would possibly do nothing here)

Reimplemented in MoinMoin.formatter.text_html.Formatter, and MoinMoin.formatter.dom_xml.Formatter.

Definition at line 382 of file __init__.py.

00382 
00383     def escapedText(self, on, **kw):
00384         """ This allows emitting text as-is, anything special will
00385             be escaped (at least in HTML, some text output format
00386             would possibly do nothing here)
00387         """
00388         return ""

def MoinMoin.formatter.text_plain.Formatter.heading (   self,
  on,
  depth,
  kw 
)

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 212 of file text_plain.py.

00212 
00213     def heading(self, on, depth, **kw):
00214         if on:
00215             self._text = []
00216             return '\n\n'
00217         else:
00218             result = u'\n%s\n\n' % (u'=' * len("".join(self._text)))
00219             self._text = None
00220             return result

def MoinMoin.formatter.text_plain.Formatter.highlight (   self,
  on,
  kw 
)

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 105 of file text_plain.py.

00105 
00106     def highlight(self, on, **kw):
00107         return u''

def MoinMoin.formatter.FormatterBase.icon (   self,
  type 
) [inherited]

Reimplemented in MoinMoin.formatter.text_html.Formatter, MoinMoin.formatter.text_docbook.Formatter, MoinMoin.formatter.dom_xml.Formatter, MoinMoin.formatter.text_gedit.Formatter, and MoinMoin.formatter.text_xml.Formatter.

Definition at line 268 of file __init__.py.

00268 
00269     def icon(self, type):
00270         return type

Here is the caller graph for this function:

def MoinMoin.formatter.text_plain.Formatter.image (   self,
  src = None,
  kw 
)
An inline image.

Extra keyword arguments are according to the HTML <img> tag attributes.
In particular an 'alt' or 'title' argument should give a description
of the image.

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 247 of file text_plain.py.

00247 
00248     def image(self, src=None, **kw):
00249         for a in (u'title', u'html__title', u'alt', u'html_alt'):
00250             if a in kw:
00251                 return kw[a]
00252         return u''

def MoinMoin.formatter.text_plain.Formatter.interwikilink (   self,
  on,
  interwiki = '',
  pagename = '',
  kw 
)
calls pagelink() for internal interwikilinks
    to make sure they get counted for self.pagelinks.
    IMPORTANT: on and off must be called with same parameters, see
       also the text_html formatter.

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 42 of file text_plain.py.

00042 
00043     def interwikilink(self, on, interwiki='', pagename='', **kw):
00044         if on:
00045             self._url = u"%s:%s" % (interwiki, pagename)
00046             self._text = []
00047             return u''
00048         else:
00049             if "".join(self._text) == self._url:
00050                 self._url = None
00051                 self._text = None
00052                 return ''
00053             else:
00054                 self._url = None
00055                 self._text = None
00056                 return u' [%s]' % (self._url)

def MoinMoin.formatter.text_plain.Formatter.lang (   self,
  on,
  lang_name 
)

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 259 of file text_plain.py.

00259 
00260     def lang(self, on, lang_name):
00261         return ''
00262 
def MoinMoin.formatter.FormatterBase.line_anchordef (   self,
  lineno 
) [inherited]

Reimplemented in MoinMoin.formatter.text_html.Formatter, MoinMoin.formatter.dom_xml.Formatter, and MoinMoin.formatter.text_gedit.Formatter.

Definition at line 150 of file __init__.py.

00150 
00151     def line_anchordef(self, lineno):
00152         return ""

def MoinMoin.formatter.FormatterBase.line_anchorlink (   self,
  on,
  lineno = 0 
) [inherited]

Reimplemented in MoinMoin.formatter.text_html.Formatter, and MoinMoin.formatter.text_gedit.Formatter.

Definition at line 156 of file __init__.py.

00156 
00157     def line_anchorlink(self, on, lineno=0):
00158         return ""

def MoinMoin.formatter.text_plain.Formatter.linebreak (   self,
  preformatted = 1 
)

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 206 of file text_plain.py.

00206 
00207     def linebreak(self, preformatted=1):
00208         return u'\n'

def MoinMoin.formatter.text_plain.Formatter.listitem (   self,
  on,
  kw 
)

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 130 of file text_plain.py.

00130 
00131     def listitem(self, on, **kw):
00132         if on:
00133             if self._in_list > 0:
00134                 self._in_list += 1
00135                 self._did_para = 1
00136                 return ' %d. ' % (self._in_list-1, )
00137             elif self._in_list < 0:
00138                 self._did_para = 1
00139                 return u' * '
00140             else:
00141                 return u' * '
00142         else:
00143             self._did_para = 1
00144             return u'\n'

def MoinMoin.formatter.FormatterBase.macro (   self,
  macro_obj,
  name,
  args,
  markup = None 
) [inherited]

Reimplemented in MoinMoin.formatter.text_docbook.Formatter, MoinMoin.formatter.dom_xml.Formatter, MoinMoin.formatter.text_gedit.Formatter, and MoinMoin.macro.TableOfContents.TOCFormatter.

Definition at line 307 of file __init__.py.

00307 
00308     def macro(self, macro_obj, name, args, markup=None):
00309         # call the macro
00310         try:
00311             return macro_obj.execute(name, args)
00312         except ImportError, err:
00313             errmsg = unicode(err)
00314             if not name in errmsg:
00315                 raise
00316             if markup:
00317                 return (self.span(1, title=errmsg) +
00318                         self.text(markup) +
00319                         self.span(0))
00320             else:
                return self.text(errmsg)

Here is the call graph for this function:

def MoinMoin.formatter.FormatterBase.make_id_unique (   self,
  id 
) [inherited]
Take an ID and make it unique in the current namespace.

Definition at line 406 of file __init__.py.

00406 
00407     def make_id_unique(self, id):
00408         '''
00409         Take an ID and make it unique in the current namespace.
00410         '''
00411         ns = self.request.uid_generator.include_id
00412         if not ns is None:
00413             ns = self.sanitize_to_id(ns)
00414         id = self.sanitize_to_id(id)
00415         id = self.request.uid_generator(id, ns)
00416         return id

Here is the call graph for this function:

Here is the caller graph for this function:

def MoinMoin.formatter.FormatterBase.nowikiword (   self,
  text 
) [inherited]

Reimplemented in MoinMoin.formatter.text_gedit.Formatter.

Definition at line 184 of file __init__.py.

00184 
00185     def nowikiword(self, text):
00186         return self.text(text)

Here is the call graph for this function:

def MoinMoin.formatter.text_plain.Formatter.number_list (   self,
  on,
  type = None,
  start = None,
  kw 
)

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 108 of file text_plain.py.

00108 
00109     def number_list(self, on, type=None, start=None, **kw):
00110         if on:
00111             self._in_list = 1
00112             return [u'\n', u'\n\n'][not self._did_para]
00113         else:
00114             self._in_list = 0
00115             if not self._did_para:
00116                 self._did_para = 1
00117                 return u'\n'
00118         return u''

def MoinMoin.formatter.text_plain.Formatter.pagelink (   self,
  on,
  pagename = '',
  page = None,
  kw 
)
make a link to page <pagename>. Instead of supplying a pagename,
    it is also possible to give a live Page object, then page.page_name
    will be used.

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 38 of file text_plain.py.

00038 
00039     def pagelink(self, on, pagename='', page=None, **kw):
00040         FormatterBase.pagelink(self, on, pagename, page, **kw)
00041         return (u">>", u"<<") [not on]

def MoinMoin.formatter.text_plain.Formatter.paragraph (   self,
  on,
  kw 
)

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 200 of file text_plain.py.

00200 
00201     def paragraph(self, on, **kw):
00202         FormatterBase.paragraph(self, on)
00203         if self._did_para:
00204             on = 0
00205         return [u'\n', u''][not on]

def MoinMoin.formatter.FormatterBase.parser (   self,
  parser_name,
  lines 
) [inherited]
parser_name MUST be valid!
    writes out the result instead of returning it!

Reimplemented in MoinMoin.formatter.dom_xml.Formatter, and MoinMoin.formatter.text_gedit.Formatter.

Definition at line 331 of file __init__.py.

00331 
00332     def parser(self, parser_name, lines):
00333         """ parser_name MUST be valid!
00334             writes out the result instead of returning it!
00335         """
00336         # attention: this is copied into text_python!
00337         parser = wikiutil.searchAndImportPlugin(self.request.cfg, "parser", parser_name)
00338         args = None
00339         if lines:
00340             args = self._get_bang_args(lines[0])
00341             logging.debug("formatter.parser: parser args %r" % args)
00342             if args is not None:
00343                 lines = lines[1:]
00344         if lines and not lines[0]:
00345             lines = lines[1:]
00346         if lines and not lines[-1].strip():
00347             lines = lines[:-1]
00348         p = parser('\n'.join(lines), self.request, format_args=args)
00349         p.format(self)
00350         del p
00351         return ''

Here is the call graph for this function:

Here is the caller graph for this function:

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 158 of file text_plain.py.

00158 
00159     def preformatted(self, on, **kw):
00160         FormatterBase.preformatted(self, on)
00161         snip = u'---%<'
00162         snip = snip + (u'-' * (78 - len(snip)))
00163         if on:
00164             return u'\n' + snip + u'\n'
00165         else:
00166             return snip + u'\n'

def MoinMoin.formatter.FormatterBase.qualify_id (   self,
  id 
) [inherited]
Take an ID and return a string that is qualified by
the current namespace; this default implementation
is suitable if the dot ('.') is valid in IDs for your
formatter.

Definition at line 417 of file __init__.py.

00417 
00418     def qualify_id(self, id):
00419         '''
00420         Take an ID and return a string that is qualified by
00421         the current namespace; this default implementation
00422         is suitable if the dot ('.') is valid in IDs for your
00423         formatter.
00424         '''
00425         ns = self.request.uid_generator.include_id
00426         if not ns is None:
00427             ns = self.sanitize_to_id(ns)
00428             return '%s.%s' % (ns, id)
00429         return id

Here is the call graph for this function:

Here is the caller graph for this function:

def MoinMoin.formatter.FormatterBase.rawHTML (   self,
  markup 
) [inherited]
This allows emitting pre-formatted HTML markup, and should be
    used wisely (i.e. very seldom).

    Using this event while generating content results in unwanted
    effects, like loss of markup or insertion of CDATA sections
    when output goes to XML formats.

Reimplemented in MoinMoin.formatter.text_html.Formatter, MoinMoin.formatter.text_docbook.Formatter, and MoinMoin.formatter.text_xml.Formatter.

Definition at line 362 of file __init__.py.

00362 
00363     def rawHTML(self, markup):
00364         """ This allows emitting pre-formatted HTML markup, and should be
00365             used wisely (i.e. very seldom).
00366 
00367             Using this event while generating content results in unwanted
00368             effects, like loss of markup or insertion of CDATA sections
00369             when output goes to XML formats.
00370         """
00371 
00372         import formatter, htmllib
00373         from MoinMoin.util import simpleIO
00374 
00375         # Regenerate plain text
00376         f = simpleIO()
00377         h = htmllib.HTMLParser(formatter.AbstractFormatter(formatter.DumbWriter(f)))
00378         h.feed(markup)
00379         h.close()
00380 
00381         return self.text(f.getvalue())

Here is the call graph for this function:

def MoinMoin.formatter.text_plain.Formatter.rule (   self,
  size = 0,
  kw 
)

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 94 of file text_plain.py.

00094 
00095     def rule(self, size=0, **kw):
00096         size = min(size, 10)
00097         ch = u"---~=*+#####"[size]
00098         return (ch * 79) + u'\n'

def MoinMoin.formatter.FormatterBase.sanitize_to_id (   self,
  text 
) [inherited]
Take 'text' and return something that is a valid ID
for this formatter.
The default returns the first non-space character of the string.

Because of the way this is used, it must be idempotent,
i.e. calling it on an already sanitized id must yield the
original id.

Reimplemented in MoinMoin.formatter.text_html.Formatter.

Definition at line 394 of file __init__.py.

00394 
00395     def sanitize_to_id(self, text):
00396         '''
00397         Take 'text' and return something that is a valid ID
00398         for this formatter.
00399         The default returns the first non-space character of the string.
00400 
00401         Because of the way this is used, it must be idempotent,
00402         i.e. calling it on an already sanitized id must yield the
00403         original id.
00404         '''
00405         return text.strip()[:1]

Here is the caller graph for this function:

def MoinMoin.formatter.FormatterBase.set_highlight_re (   self,
  hi_re = None 
) [inherited]
set the highlighting regular expression (e.g. for search terms)

@param hi_re: either a valid re as str/unicode (you may want to use
      re.escape before passing generic strings!) or a compiled
      re object. raises re.error for invalid re.

Definition at line 43 of file __init__.py.

00043 
00044     def set_highlight_re(self, hi_re=None):
00045         """ set the highlighting regular expression (e.g. for search terms)
00046 
00047         @param hi_re: either a valid re as str/unicode (you may want to use
00048                       re.escape before passing generic strings!) or a compiled
00049                       re object. raises re.error for invalid re.
00050         """
00051         if isinstance(hi_re, (str, unicode)):
00052             hi_re = re.compile(hi_re, re.U + re.IGNORECASE)
00053         self._highlight_re = hi_re

def MoinMoin.formatter.FormatterBase.setPage (   self,
  page 
) [inherited]

Reimplemented in MoinMoin.formatter.dom_xml.Formatter.

Definition at line 57 of file __init__.py.

00057 
00058     def setPage(self, page):
00059         self.page = page

def MoinMoin.formatter.text_plain.Formatter.small (   self,
  on,
  kw 
)

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 167 of file text_plain.py.

00167 
00168     def small(self, on, **kw):
00169         return u''

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 209 of file text_plain.py.

00209 
00210     def smiley(self, text):
00211         return text

def MoinMoin.formatter.FormatterBase.span (   self,
  on,
  kw 
) [inherited]
open/close a inline span 

Reimplemented in MoinMoin.formatter.text_html.Formatter, MoinMoin.formatter.text_docbook.Formatter, and MoinMoin.formatter.text_gedit.Formatter.

Definition at line 358 of file __init__.py.

00358 
00359     def span(self, on, **kw):
00360         """ open/close a inline span """
00361         return ""

Here is the caller graph for this function:

def MoinMoin.formatter.FormatterBase.startContent (   self,
  content_id = "content",
  kw 
) [inherited]

Reimplemented in MoinMoin.formatter.text_docbook.Formatter, and MoinMoin.macro.TableOfContents.TOCFormatter.

Definition at line 75 of file __init__.py.

00075 
00076     def startContent(self, content_id="content", **kw):
00077         if self.page:
00078             self.request.uid_generator.begin(self.page.page_name)
00079         return ""

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 28 of file text_plain.py.

00028 
00029     def startDocument(self, pagename):
00030         line = u"*" * (len(pagename) + 2) + u'\n'
00031         return u"%s %s \n%s" % (line, pagename, line)

def MoinMoin.formatter.text_plain.Formatter.strike (   self,
  on,
  kw 
)

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 151 of file text_plain.py.

00151 
00152     def strike(self, on, **kw):
00153         return u'__'

def MoinMoin.formatter.text_plain.Formatter.strong (   self,
  on,
  kw 
)

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 99 of file text_plain.py.

00099 
00100     def strong(self, on, **kw):
00101         return u'*'

def MoinMoin.formatter.text_plain.Formatter.sub (   self,
  on,
  kw 
)

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 148 of file text_plain.py.

00148 
00149     def sub(self, on, **kw):
00150         return u'_'

def MoinMoin.formatter.text_plain.Formatter.sup (   self,
  on,
  kw 
)

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 145 of file text_plain.py.

00145 
00146     def sup(self, on, **kw):
00147         return u'^'

def MoinMoin.formatter.text_plain.Formatter.sysmsg (   self,
  on,
  kw 
)
Emit a system message (embed it into the page).

    Normally used to indicate disabled options, or invalid markup.

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 35 of file text_plain.py.

00035 
00036     def sysmsg(self, on, **kw):
00037         return (u'\n\n*** ', u' ***\n\n')[not on]

def MoinMoin.formatter.text_plain.Formatter.table (   self,
  on,
  attrs = {},
  kw 
)

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 221 of file text_plain.py.

00221 
00222     def table(self, on, attrs={}, **kw):
00223         return u''

def MoinMoin.formatter.text_plain.Formatter.table_cell (   self,
  on,
  attrs = {},
  kw 
)

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 227 of file text_plain.py.

00227 
00228     def table_cell(self, on, attrs={}, **kw):
00229         return u''

def MoinMoin.formatter.text_plain.Formatter.table_row (   self,
  on,
  attrs = {},
  kw 
)

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 224 of file text_plain.py.

00224 
00225     def table_row(self, on, attrs={}, **kw):
00226         return u''

def MoinMoin.formatter.text_plain.Formatter.text (   self,
  text,
  kw 
)

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 88 of file text_plain.py.

00088 
00089     def text(self, text, **kw):
00090         self._did_para = 0
00091         if self._text is not None:
00092             self._text.append(text)
00093         return text

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 253 of file text_plain.py.

00253 
00254     def transclusion(self, on, **kw):
00255         return u''

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 256 of file text_plain.py.

00256 
00257     def transclusion_param(self, **kw):
00258         return u''

def MoinMoin.formatter.text_plain.Formatter.underline (   self,
  on,
  kw 
)

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 230 of file text_plain.py.

00230 
00231     def underline(self, on, **kw):
00232         return u'_'

def MoinMoin.formatter.text_plain.Formatter.url (   self,
  on,
  url = '',
  css = None,
  kw 
)

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 57 of file text_plain.py.

00057 
00058     def url(self, on, url='', css=None, **kw):
00059         if on:
00060             self._url = url
00061             self._text = []
00062             return u''
00063         else:
00064             if "".join(self._text) == self._url:
00065                 self._url = None
00066                 self._text = None
00067                 return ''
00068             else:
00069                 self._url = None
00070                 self._text = None
00071                 return u' [%s]' % (self._url)

Here is the caller graph for this function:


Member Data Documentation

Definition at line 22 of file text_plain.py.

Definition at line 24 of file text_plain.py.

Definition at line 20 of file text_plain.py.

Definition at line 21 of file text_plain.py.

Definition at line 23 of file text_plain.py.

Definition at line 26 of file text_plain.py.

Definition at line 25 of file text_plain.py.

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 16 of file text_plain.py.

Definition at line 38 of file __init__.py.

Reimplemented in MoinMoin.formatter.dom_xml.Formatter.

Definition at line 58 of file __init__.py.

Definition at line 37 of file __init__.py.


The documentation for this class was generated from the following file: