Merge Document Template Service
Project description
Document Merge Service
A document template merge service providing an API to manage templates and merge them with given data.
Installation
Requirements
- docker
- docker-compose
After installing and configuring those, download docker-compose.yml and run the following command:
docker-compose up -d
You can now access the api at http://localhost:8000/api/v1/ which includes a browsable api.
Workaround LibreOffice lockup
The workaround has a setting called ISOLATE_UNOCONV, it is only enabled in the development environment. If ISOLATE_UNOCONV is enabled the container needs CAP_SYS_ADMIN. See docker-compose.override.yml.
cap_add:
- CAP_SYS_ADMIN
security_opt:
- apparmor:unconfined
environment:
- ISOLATE_UNOCONV=true
Getting started
Uploading templates
Upload templates using the following:
curl --form template=@docx-template.docx --form name="Test Template" --form engine=docx-template http://localhost:8000/api/v1/template/
Merging a template
After uploading successfully, you can merge a template with the following call:
curl -H "Content-Type: application/json" --data '{"data": {"test": "Test Input"}}' http://localhost:8000/api/v1/template/test-template/merge/ > output.docx
Further reading
- Configuration - Further configuration and how to do a production setup
- Usage - How to use the DMS and it's features
- Contributing - Look here to see how to start with your first contribution. Contributions are welcome!
License
Code released under the GPL-3.0-or-later license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file document_merge_service-6.1.0.tar.gz.
File metadata
- Download URL: document_merge_service-6.1.0.tar.gz
- Upload date:
- Size: 727.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
89b7ca1520e4d35cbdecbabbc341c9e55b05e604fa96e174e0ce22789dff8e42
|
|
| MD5 |
17b27d5bc351a8221037955fb9d1c255
|
|
| BLAKE2b-256 |
1ac993695840538aa0559023376302e651a95c8c6cf13b3f4550dc32b2950eaa
|
File details
Details for the file document_merge_service-6.1.0-py3-none-any.whl.
File metadata
- Download URL: document_merge_service-6.1.0-py3-none-any.whl
- Upload date:
- Size: 749.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7d190ac23b9950d3a8d1e6df4cf18d0ca72f3b6a58c6413e613422ce94636b9a
|
|
| MD5 |
14a5c2ec2f1d3fa3d476d28133e4f821
|
|
| BLAKE2b-256 |
eb3de7e93aa67ddd79d85cc3efa80b6415779323bff121b45b11c02c40968872
|