https://github.com/evmar/envelope
python script to generate envelopes
https://github.com/evmar/envelope
Last synced: about 1 year ago
JSON representation
python script to generate envelopes
- Host: GitHub
- URL: https://github.com/evmar/envelope
- Owner: evmar
- Created: 2011-10-09T00:13:30.000Z (over 14 years ago)
- Default Branch: master
- Last Pushed: 2021-01-04T06:42:07.000Z (over 5 years ago)
- Last Synced: 2025-03-25T00:11:12.652Z (about 1 year ago)
- Language: Python
- Homepage:
- Size: 89.8 KB
- Stars: 13
- Watchers: 2
- Forks: 9
- Open Issues: 2
-
Metadata Files:
- Readme: README.markdown
Awesome Lists containing this project
README
## Background
I recently had occasion to print a bunch of envelopes with different
addresses.
I found that the standard word-processing software included with
Windows or Mac OS didn't support automating that, while the more
complex freely-available software (Abiword, LibreOffice) had
maddeningly complicated and buggy implementations of mail merge.
I eventually, after 10 misprints and 3 do-overs, coaxed LibreOffice
into generating a PDF that I then printed with another program (the
combination of LibreOffice's conception of print settings and the
actual print settings caused many hilariously wrong misprints when
attempting to print from LibreOffice directly). I proudly showed
these to my wife, who then pointed out that in my last reprent I
somehow managed to swap the last two lines of every address.
And so, tasked with going through that ordeal again, it suddenly hit
me: it's not hard to generate a PDF with some text.
## The Code
The code is shorter than this README, but briefly:
1. Create a CSV with the data you want, like one address per row with
one line per column. (We used Google Docs, which can export CSV.)
2. Modify the constants in the `__main__` block of the code.
3. Run it, print the PDF using whatever PDF program you like.