A Python application to streamline the creation of dunning letters (reminders for overdue payments). This tool combines Tkinter/CustomTkinter for a user-friendly GUI, ReportLab for generating PDF letters, and PIL for handling images such as logos and addresses.
DunnQuick/
├── main.py # Entry point for the Tkinter application
├── ui.py # Contains the DunningLetterUI class (GUI elements)
├── letter_generator.py # Contains the DunningLetterGenerator class (PDF generation logic)
├── agents.py # Contains the collectors dictionary (agent details)
├── templates/ # Folder with TXT templates for Level 1, 2, and 3 letters
├── assets/
│ ├── logo.png # Logo used in the PDF
│ └── address.png # Address image used in the PDF
├── requirements.txt # List of dependencies
└── README.md # Project documentation
letter_generator.pytemplates/ui.pyDunningLetterUI class, which:
DunningLetterGenerator to create PDFsmain.py
Simply starts the Tkinter event loop, launching DunningLetterUI.
agents.pycollectors, mapping agent names to their email, phone, and location.Below is the requirements.txt content:
pandas
Pillow
reportlab
customtkinter
Note:
- tkinter, datetime, os, and sys are part of the Python standard library—no separate installation needed.
agents.pyandletter_generator.pyare custom modules, so they are not inrequirements.txt.- If you plan to bundle this with PyInstaller or another tool, the standard library is included automatically.
git clone https://github.com/AArCh95/DunnQuick.git
cd DunnQuick
# On Windows:
python -m venv venv
.\venv\Scripts\activate
# On macOS/Linux:
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
This command installs pandas, Pillow, reportlab, and customtkinter.
python main.py
Templates:
In the templates/ folder, you’ll find three TXT files (e.g., level1.txt, level2.txt, level3.txt). Each contains placeholders like [CUSTOMER NAME] or [AMOUNT] that get replaced by dynamic values during PDF generation.
Assets:
logo.png: Placed at the top of the PDF letter.address.png: Placed at the bottom of the PDF letter for contact info.Ensure these filenames match exactly what’s referenced in letter_generator.py.
In agents.py, there’s a predefined dictionary called collectors. Each key is the agent’s name, and each value is a sub-dictionary containing:
{
"email": "agent.email@placeholder.com",
"phone": "+1 (555) 123-4567",
"location": "Country or Region"
}
Feel free to add or remove agents as needed. The UI’s dropdown is populated by this dictionary.
This project is a work in progress, and we’re continuously adding new features and improvements. If you encounter issues or have ideas for enhancements, feel free to open an issue or submit a pull request.
Happy Generating!
Enjoy creating your dunning letters with DunnQuick. If you find this tool helpful, please ⭐ the repo to show your support!