bookish.text package

Submodules

bookish.text.convert module

class bookish.text.convert.ReWiki

Bases: HTMLParser.HTMLParser

handle_charref(name)
handle_comment(data)
handle_data(data)
handle_decl(data)
handle_endtag(tag)
handle_entityref(name)
handle_starttag(tag, attrs)
class bookish.text.convert.WikiWriter(stream)

Bases: object

block(obj, indent=0)
default_block(obj, indent=0)
default_span(obj)
do_bullet_block(obj, indent)
do_cell_block(obj, indent)
do_code_block(obj, indent)
do_code_span(obj)
do_comment_span(obj)
do_dt_block(obj, indent)
do_em_span(obj)
do_h_block(obj, indent)
do_hcell_block(obj, indent)
do_item_block(obj, indent)
do_keys_span(obj)
do_ord_block(obj, indent)
do_para_block(obj, indent)
do_prop_block(obj, indent)
do_pxml_block(obj, indent)
do_quote_span(obj)
do_strong_span(obj)
do_summary_block(obj, indent)
do_ui_span(obj)
do_var_span(obj)
do_xml_span(obj)
indent(spaces)
markup(run)
process_text(run)
span(obj)
text(run)
bookish.text.convert.dechar(text, charmap=[(u'\u201d', '"'), (u'\u201c', '"'), (u'\u2019', "'"), (u'\u2014', '---'), (u'\u2013', '--'), (u'\u2190', '<-'), (u'\u2192', '->'), (u'\u2264', '<='), (u'\u2265', '>='), (u'\u21d4', '<=>'), (u'\xbc', '1/4'), (u'\xbd', '1/2'), (u'\xbe', '3/4'), (u'\u2026', '...'), (u'\xd7', 'x'), (u'\xa9', '(c)'), (u'\u2122', '(tm)'), (u'\xae', '(r)')])

bookish.text.textify module

class bookish.text.textify.BookishTextifier(root, left=0, top=0, bottom=0, width=72, vars=None, charfilter=True)

Bases: bookish.text.textify.TextifierBase

bullet_block(block)
bullet_group_block(block)
dt_block(block)
em_span(span)
h_block(block)
item_block(block)
keys_span(span)
list_block(block)
note_block(block)
ord_block(block)
ord_group_block(block)
para_block(block)
pre_block(block)
section_block(block)
strong_span(span)
subtopics_block(block)
tip_block(block)
var_span(span)
warning_block(block)
class bookish.text.textify.TextFrame(parent, left=0, top=0, bottom=0, width=72, padding_top=0, padding_bottom=0, replacements=None, buffered=False, vars=None, charfilter=None, charmap=None, xform=None)

Bases: object

display_vars = ['left', 'top', 'bottom', 'width', 'replacements', 'buffered', 'vars']
emit(string, indent=0, wrap=True, first='', rest='', upper=False, lower=False, normalize=True, before='', after='')
finish()
get(name)
getvalue()
inc(name)
write(string)
class bookish.text.textify.TextifierBase(root, left=0, top=0, bottom=0, width=72, vars=None, charfilter=True)

Bases: object

blank_lines(n)
emit(text, indent=0, wrap=True, top=0, bottom=0, first=u'', rest=u'', upper=False, lower=False, before='', after='')
emit_block_text(block, **kwargs)
find(block, ave, **vars)
frame
pop()
push(indent=0, left=None, top=0, bottom=0, width=None, padding_top=0, padding_bottom=0, replacements=None, buffered=False, charfilter=None, charmap=None, xform=None, **kwargs)
render(block, ns=None)
render_body(body, eat_top=True, **kwargs)
render_span(span)
render_super(block)
render_text(text)
transform()
write(string)
bookish.text.textify.addindent(first, subsequent, text, trim=False)
bookish.text.textify.dechar(text, charmap=((u'\u201d', '"'), (u'\u201c', '"'), (u'\u2019', "'"), (u'\u2014', '---'), (u'\u2013', '--'), (u'\u2190', '<-'), (u'\u2192', '->'), (u'\u2264', '<='), (u'\u2265', '>='), (u'\u21d4', '<=>'), (u'\u25b8', '>'), (u'\xbc', '1/4'), (u'\xbd', '1/2'), (u'\xbe', '3/4'), (u'\u2026', '...'), (u'\xd7', 'x'), (u'\xa9', '(c)'), (u'\u2122', '(tm)'), (u'\xae', '(r)'), (u'\u02da', 'deg'), (u'\u03c0', 'pi'), (u'\u03c3', 'sigma')))
bookish.text.textify.format_block(text, left=0, width=72, wrap=True, first='', rest='', upper=False, lower=False, xform=None, charfilter=True, charmap=None, normalize=True)
bookish.text.textify.join(arg, *args)

Module contents