예제 #1
0
def create_html_doc(lib, outpath, title=None):
    if title:
        title = title.replace('_', ' ')
    else:
        title = '%s - Documentation' % lib.name
    generated = utils.get_timestamp(daysep='-', millissep=None)
    namespace = Namespace(LIB=lib, TITLE=title, GENERATED=generated)
    doc = Template(template=DOCUMENT_TEMPLATE).generate(namespace) + '\n'
    outfile = open(outpath, 'w')
    outfile.write(doc.encode('UTF-8'))
    outfile.close()
예제 #2
0
def create_html_doc(lib, outpath, title=None, styles=None):
    if title:
        title = title.replace('_', ' ')
    else:
        title = lib.name
    generated = utils.get_timestamp(daysep='-', millissep=None)
    namespace = Namespace(LIB=lib, TITLE=title, STYLES=_get_styles(styles),
                          GENERATED=generated)
    doc = Template(template=HTML_TEMPLATE).generate(namespace) + '\n'
    outfile = open(outpath, 'w')
    outfile.write(doc.encode('UTF-8'))
    outfile.close()
예제 #3
0
def create_html_doc(lib, outpath, title=None, styles=None):
    if title:
        title = title.replace('_', ' ')
    else:
        title = lib.name
    generated = utils.get_timestamp(daysep='-', millissep=None)
    namespace = Namespace(LIB=lib,
                          TITLE=title,
                          STYLES=_get_styles(styles),
                          GENERATED=generated)
    doc = Template(template=HTML_TEMPLATE).generate(namespace) + '\n'
    outfile = open(outpath, 'w')
    outfile.write(doc.encode('UTF-8'))
    outfile.close()