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

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Egg

File details

Details for the file document-template-0.0.1.tar.gz.

File metadata

File hashes

Hashes for document-template-0.0.1.tar.gz
Algorithm Hash digest
SHA256 81d54c93d4cb1a4d29db2feb52a73ca480a7e0a27122b899e56c1a4c5bb9c702
MD5 f0fdc70d8002a5441217dddf3d1a1790
BLAKE2b-256 e548ca06aaa3872cd9dd5eb804d62cd0723496c24cb7d882efa0c830487e4e58

See more details on using hashes here.

File details

Details for the file document_template-0.0.1-py2.7.egg.

File metadata

File hashes

Hashes for document_template-0.0.1-py2.7.egg
Algorithm Hash digest
SHA256 7dd11e26c58683479735835b7d3a5fbeb24471f68ea8f9cdd4b6ec02a101fa45
MD5 9229284c5d6240589ca8459144516fa3
BLAKE2b-256 5891769abcf2dfd5788e3886b276206ce6f28fd4e5cbbf270df2d5525ee974f9

See more details on using hashes here.

Supported by

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