spug.nml.troff
index
/home/mmuller/w/spug/nml/troff.py

#==============================================================================
#
#  $Id$
#
#  Formatter to write an NML TextBlock to TROFF.
#
#  Copyright (C) 2005 Michael A. Muller
#
#  This program is free software; you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation; either version 2 of the License, or
#  (at your option) any later version.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with this program; if not, write to the Free Software
#  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
#==============================================================================

 
Modules
       
re
string

 
Classes
       
nml.StdFormatter.StdFormatter
nml.troff.TroffFormatter

 
class TroffFormatter(nml.StdFormatter.StdFormatter)
    An HTML Formatter formats TextBlock objects into HTML.
 
  Methods defined here:
__init__(self, out)
Constructs an HTML formatted from an output stream.
format(self, block)
Formats the block as its HTML equivalent.
formatAll(self, text)
Formats /text/ (an NML @TextBlock) as a complete HTML document.

Data and other attributes defined here:
AFTER_BLOCK = 1
AFTER_PARA = 2
BLOCK_START = 0
COMMENT = 4
INLINE = 3
maxLineWidth = 79
newline = 0
period = 3
periodrx = <_sre.SRE_Pattern object at 0x827c430>
punct = 1
punctrx = <_sre.SRE_Pattern object at 0x8278818>
word = 2
wordrx = <_sre.SRE_Pattern object at 0x821acd0>

Methods inherited from nml.StdFormatter.StdFormatter:
close(self)
Closes the formatting of the block, committing the contents of the
buffer.

Data and other attributes inherited from nml.StdFormatter.StdFormatter:
wsrx = <_sre.SRE_Pattern object at 0x821a800>

 
Data
        StringTypes = (<type 'str'>, <type 'unicode'>)