easytable.presets
index
/home/djung/lib/easytable/presets.py

This module contains presets for formatting tables.
 
The presets are dictionaries which contain keyword arguments. To apply a
preset, the dictionary of the user's choice has to be passed to
:py:meth:`easytable.Table.make` or one of the shortcut functions
:func:`easytable.autotable` using a double-star notation (**),
:func:`easytable.docl` etc. Example:
 
    >>> data = dict(a=[1, 2, 3], b=[1, 2], c=[1])
    >>> print easytable.docl(d, coltitles=1, **easytable.presets.asciielegant)
    ===========
     a   c   b
    -----------
     1   1   1
     2       2
     3
    ===========

 
Data
        asciibox = {'hb': '-', 'hp': 1, 'vb': '|'}
asciicross = {'border': '', 'hc': '|', 'hp': 1, 'ht': '|', 'vc': '-', 'vt': '-'}
asciicross2 = {'border': '', 'hc': '|', 'hp': 1, 'ht': '|', 'vc': '-', 'vt': '='}
asciidense = {'hb': '=', 'hc': '|', 'hp': 1, 'ht': '|', 'vb': '|', 'vc': '-', 'vt': '='}
asciielegant = {'hb': '=', 'hp': 1, 'vt': '-'}
asciiheader = {'hb': '-', 'hp': 1, 'ht': '|', 'vb': '|', 'vt': '-'}
asciimatrix = {'hb': '-', 'hc': '|', 'hp': 1, 'ht': '|', 'vb': '|', 'vc': '-', 'vt': '-'}
box = {'border': 'l', 'hp': 1}
cross = {'border': '', 'hc': 'l', 'hp': 1, 'ht': 'l', 'vc': 'l', 'vt': 'l'}
cross2 = {'border': '', 'hc': 'l', 'hp': 1, 'ht': 'd', 'vc': 'l', 'vt': 'd'}
dense = {'border': 'h', 'hc': 'l', 'hp': 1, 'ht': 'd', 'vc': 'l', 'vt': 'd'}
doublebox = {'border': 'd', 'hp': 1}
elegant = {'hb': 'd', 'hp': 1, 'vt': 'l'}
elegant2 = {'hb': 'h', 'hp': 1, 'vt': 'l'}
fatbox = {'border': 'h', 'hp': 1}
header = {'border': 'l', 'hp': 1, 'ht': 'l', 'vt': 'l'}
matrix = {'border': 'l', 'hc': 'l', 'hp': 1, 'ht': 'l', 'vc': 'l', 'vt': 'l'}
plain = {'border': '', 'hc': ' ', 'ht': ' ', 'padding': 0, 'vc': '', 'vt': ''}