EN | RU
Work Report Generator is a Python tool designed for automatically generating PDF work reports based on activity from GitLab, JIRA, Confluence, and Redmine.
It collects user actions for a specified period, groups them by day, adds additional activities (daily meetings, planning sessions, and retrospectives), visualizes statistics, and creates a PDF report. Optionally, the report can be automatically sent by email or uploaded to FTP.
| Component | Requirement |
|---|---|
| Python | 3.9 or higher |
| Dependencies | see requirements.txt or pyproject.toml |
| Font | DejaVuSans.ttf file for PDF (optional) |
-
Clone the repository:
git clone https://github.com/hawkab/work-report-generator.git cd work-report-generator -
Install dependencies either via:
pip install .Or:
pip install -r requirements.txt
-
Obtain API tokens for all used systems (
GitLab,Jira, Confluence,Redmine) -
Optional: Obtain SMTP parameters for sending reports via email
-
Optional: Obtain FTP parameters for uploading reports to an FTP server
-
Create a
.envfile in the project root or in your home directory, based on the.env.exampletemplate:... GITLAB_URL=https://gitlab.example.com GITLAB_TOKEN=your_gitlab_token GITLAB_USERNAME=username ...
-
Vacation settings 📆 (
vacations.json)
If you did not work on certain days (e.g., vacation, sick leave, or day off), you can list these dates in the vacations.json file to:
- avoid generating static activity for those days;
- exclude them from the report;
- accurately reflect absence periods.
The vacations.json file should be located in the project root.
The file should be a JSON array of objects with from and to keys in YYYY-MM-DD format.
[
{
"from": "2025-02-17",
"to": "2025-02-21"
},
{
"from": "2025-03-17",
"to": "2025-03-21"
}
]🔄 If
fromandtoare the same, it is considered a single-day absence.
work-report --start 01.07.2025 --end 31.07.2025work-report --start 01.07.2025 --end 31.07.2025 --email --ftp- The PDF file will be saved in the working directory
./report_generator/reports - File name format:
work_report_YYYY-MM-DD_YYYY-MM-DD.pdf Example report
- To view the report archive, you can use Google Drive or your own hosting with a PHP script
- To upload reports from
ftpto Google Drive, you can userclone:
- Install rclone:
curl https://rclone.org/install.sh | sudo bash- Configure Google Drive:
rclone config- n (new connection)
- name, e.g.: gdrive
- type: Google Drive
- complete browser authorization.
- Copy files from FTP to Google Drive:
rclone copy ftpuser:password@ftp.example.com:/path gdrive:/Backup --progresspython-dotenv— loading configuration from.envfiles.reportlab— PDF generation.qrcode— QR code generation.colorlog— colored log output in the terminal.python-redmine— interacting with Redmine via REST API.python-gitlab— interacting with GitLab API.pytest— for testing project components.
Many thanks to the authors of these libraries for their contribution to open source 💚