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()
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()