Skip to main content

Generate documents according to the template.

Project description

使用方法见 test.py

from template import DocumentTemplate

if __name__ == '__main__':
    id_dict = {"title": "标题", "head": "正文标题", "url": "https://github.com/liying2008", "large_font": "大号字体"}
    id_dict['show_span'] = True
    # id_dict['contents'] = 'Hello World'
    id_dict['contents'] = ('A', 'B', 'C', 'D', 'E', 'F', 'G')
    temp = DocumentTemplate()
    temp.load("test.html")
    temp.set_identifier_dict(id_dict)
    temp.save_document("new_test.html")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

document-template-0.0.1.tar.gz (2.6 kB view hashes)

Uploaded Source

Built Distribution

document_template-0.0.1-py2.7.egg (4.8 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page