Easy command line mailmerge csv -> pdf tool.
Project description
pdf-mailmerge
Mailmerge to a pdf or html file. Adds csv data to an html jinja template. Can be configured to generate filenames and subdirectories as well as sort order from columns in the csv.
Install
pip install pdf-mailmerge
Usage
Requires a config.yml file in your directory containing:
data: Some.csv
template: "Some_jinja.html"
identifier_columns:
- "col1"
- "col2"
filename_columns:
- "col3"
- "col4"
output_folders:
- "col1"
- "col5"
sort:
- "col2"
- "col3"
Required Configuration Fields
data: csv file with the data you wish to mailmerge
template: jinja template being used for the mailmerge
identifier_columns: columns used to construct a primary key for the data. If a column already contains the primary key, list it but only it. A mailmerge document will be created for every unique value or unique value combination of the identifier columns.
filename_columns: columns used to construct the filename for the document. Name will be "col1_col2_" etc.
Optional Configuration Fields
output_folders: columns used to construct output subdirectories. All files placed in either html or pdf directory. Additional folder nesting levels based on order of output folders. Sample file path pdf/col1/col5.
sort: columns used to sort documents within their output folder. If multiple options, sort precedence given in order of list.
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 pdfmailmerge-0.1.1.tar.gz.
File metadata
- Download URL: pdfmailmerge-0.1.1.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.3 CPython/3.7.6 Darwin/17.7.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e0707d08849800bed5bcd73348e7b0e3f20b9d0742611a7e2fca64441f3bf653
|
|
| MD5 |
ccf4251b2610e76d1520440624c0d586
|
|
| BLAKE2b-256 |
a32cb07a437f0e83a105087c53263f6f2cb140a70bcbf0003949c6c118299e32
|
File details
Details for the file pdfmailmerge-0.1.1-py3-none-any.whl.
File metadata
- Download URL: pdfmailmerge-0.1.1-py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.3 CPython/3.7.6 Darwin/17.7.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8e524e9b4804697cbdbf80ae85c05e52e9a904e9f392b13ae61229501c10bf78
|
|
| MD5 |
e3e6ae6986876c4e6c85e4a400c09f52
|
|
| BLAKE2b-256 |
abbcebc27f4119398d8375b1b33670f2f73d32e4e314c169e9a28d975fc4fcbd
|