Skip to content

colarusso/docx_webmerge

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

docx_webmerge

Use JSON to populate a .docx file via a form submit. Here is a live example. This tool is pretty much Dave Zvenyach's docx_mailmerge.py as a webservice. You can find the original code in his post Mailmerge for Word Docs... in Python?

How To

Assuming you have this repo's Python app up and running on a server, all one has to do is:

  1. Create a .docx Word document with mailmerge feilds;
  2. Upload your document to a webserver hosted on a whitelisted domain (defined in docxmerge/docxmerge.py); and
  3. Pass the document's location (docx_uri), your desired filename (name), and some JSON data (json_doc) to the service.

After that, the service will return a .docx document populated with your JSON data.

Note: if you're a non-profit and would like me to add your website to the whitelist for the example service available at http://colarusso.pythonanywhere.com/ (the app behind the live example linked above), let me know. As long as you aren't expecting wicked crazy volume, I'll probably just add you to the list.

Known Issues

Check out this repo's Issues tab for a list of known issues.

About

Use JSON to drive a web-based mailmerge of docx files.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages