Gantt Chart Generation from Trello (POC)
Quick Start
pip install trello-gantt
trello-gantt init # creates a .env file — fill in your credentials
trello-gantt # generates the Gantt HTML
To publish directly to Google Apps Script (optional):
python3 scripts/publish_gantt.py
See Automated publishing for first-time Google setup.
Overview
This project is a proof of concept that:
- fetches tasks from Trello,
- maps card data to a Gantt model,
- generates Mermaid Gantt syntax,
- renders a standalone HTML file with the chart and validation report.
The goal is to validate Trello as the source of truth for project timelines without using a heavy PM tool.
Prerequisites
- Python 3.10+ (tested with
python3) - Trello API credentials:
TRELLO_API_KEYTRELLO_API_TOKEN
Setup
- Create and activate a virtual environment:
python3 -m venv .venv
source .venv/bin/activate
- Install dependencies:
pip install requests python-dotenv
- Copy the example environment file and fill in your values:
cp .env.example .env
Edit .env with your Trello credentials and board configuration:
# Trello API credentials
TRELLO_API_KEY=your_api_key_here
TRELLO_API_TOKEN=your_api_token_here
# Accepts a full URL (https://trello.com/b/abc123/board-name) or just the ID
GANTT_BOARD_ID=https://trello.com/b/your_board_id/board-name
# Comma-separated list names to include. Leave empty to use all open lists.
GANTT_LISTS=To Do,In Progress,Done
GANTT_OUTPUT=output/gantt.html
GANTT_TITLE=Project Gantt Chart
# Comma-separated list names to render as milestones. Leave empty for none.
GANTT_MILESTONE_LISTS=Milestone 1,Milestone 2,Milestone 3
Usage
With .env configured, just run:
python3 -m src.main
All settings are read from .env. No arguments needed.
CLI arguments can override .env values when needed:
--board-id: Trello board URL or ID. Env:GANTT_BOARD_ID--lists: comma-separated list names. Env:GANTT_LISTS--output(defaultgantt.html): output HTML file. Env:GANTT_OUTPUT--title(defaultProject Gantt Chart): diagram title. Env:GANTT_TITLE--milestone-list: comma-separated list names for milestones. Env:GANTT_MILESTONE_LISTS
Example with CLI overrides:
python3 -m src.main \
--board-id "https://trello.com/b/7nlpWm2R/testing-gantt-chart" \
--lists "TO DO,DOING,DONE 🎉" \
--output output/gantt-selected.html \
--title "Roadmap Sprint"
Interactive Features
The generated HTML includes interactive features that work directly in the browser:
- Filter by assignee: A dropdown at the top of the Gantt chart lets you filter tasks by team member. The chart re-renders in place while keeping the same time scale for easy comparison.
- Horizontal scroll: When the date range is large, the chart renders at full width with day-level tick marks inside a scrollable container.
Sharing the Gantt with Clients
The output is a standalone HTML file. To share it with non-technical users, you can publish it as a Google Apps Script Web App:
- Create a project at https://script.google.com
- Add a
doGet()function that serves the HTML - Deploy as a web app with public access
- Share the URL with clients — they open it in any browser, no setup needed
Automated publishing
A single command regenerates the Gantt and publishes it to the live web app:
python3 scripts/publish_gantt.py
This script:
- Installs/verifies
trello-ganttfrom PyPI - Generates the HTML from the Trello board
- Uploads the HTML + access-controlled
Code.gsto Google Apps Script via API - Creates a new version and updates the existing deployment (URL stays the same)
First-time setup:
- Create a Google Cloud project and enable the Google Apps Script API
- Create OAuth 2.0 Desktop credentials, download the JSON
- Save it as
credentials/google_oauth_client.json - Enable the Apps Script API in your user settings: https://script.google.com/home/usersettings
- Run the script — it opens the browser once for authorization, then saves the token for future runs
Access control (allowlist by Google account) is built into the published Code.gs.
Field Mapping
| Trello Field | Gantt Field | Notes |
|---|---|---|
id / shortLink |
task_id |
Sanitized Mermaid-safe identifier |
name |
name |
Sanitized and truncated for Mermaid parser safety |
idList + board list map |
section |
Grouped by milestone label when present, else list name |
due |
end_date |
If missing: processing_date + 1 day, used_due_fallback=True |
start / due-1d |
start_date |
Explicit start wins, else end_date - 1 day |
List column + dueComplete |
status |
Column → Mermaid modifier(s) for bar color; done if dueComplete |
desc (## Progress section) |
progress |
Parsed from card description; 0-100, clamped. No section = 0% |
Column → bar style (HTML/CSS): Backlog (gray), To Do (crit, white), Doing (active, blue), Done (done, green), Blocked (active,crit, orange). Add a Blocked list in Trello and include it in --lists when generating.
Progress Tracking
Since Trello's Free plan does not support Custom Fields, progress is tracked via a convention in the card description:
## Progress
72%
Parsing rules:
- No
## Progresssection → 0% - Valid number with or without
%→ that value (72%or72both work) - Value above 100 → clamped to 100%
- Non-numeric value (
hello,asdf70%, empty) → 0%
The percentage is displayed on each Gantt bar next to the task name (e.g. List filtering logic [YN] (72%)).
Start Date Heuristic
Current mapper uses this priority:
card.startif present (from Trello custom field / API)- otherwise
end_date - 1 day(so the bar spans at least one day whendueis set)
If due is missing, end_date is set to processing_date + 1 day and the same rule yields start_date == processing_date.
Validation Rules
Errors:
- no valid tasks after mapping
end_date < start_date- duplicate
task_id
Warnings:
- list names requested by user not found
- cards without
due(still included; informational) - cards without assignee
- task names truncated
- more than 50% of cards missing
due
Architecture
See docs/architecture.md for the full solution design, including module responsibilities, data flow, data structures, and technical decisions.
Tests
From the project root:
PYTHONPATH=. python3 -m unittest discover -s tests -v
Modules covered: field_mapper, mermaid_generator, validator (see tests/test_*.py).
Limitations (POC)
- No automatic dependency inference from Trello.
- High warning volume on boards where many cards lack due date.
- Limited CLI output format (console only, no JSON mode yet).
Feasibility Notes
The POC is technically viable:
- Trello data can be pulled reliably via API.
- Mermaid output renders correctly in standalone HTML.
- End-to-end execution with real board data is validated (see
.claude/tasks/poc-for-gantt-chart-generation-from-trel/e2e-test-report.md).
To move from POC to an internal tool:
- Expand automated tests (validator,
trello_data, integration smoke with mocked API). - Add robust report artifacts (JSON summary + warning categories).
- Improve list matching UX (fuzzy matching / suggestion for emoji list names).
- Add optional overdue highlighting (
crit) and richer status mapping. - Provide packaging and onboarding script for new developers.
Metadata
Release files for trello-gantt 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| trello_gantt-0.1.5.tar.gz | 27.6 kB | Without provenance | Details for trello_gantt-0.1.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| trello_gantt-0.1.5-py3-none-any.whl | Python 3 | none | any | Details for trello_gantt-0.1.5-py3-none-any.whl |
Total release size: 54.6 kB
Release files / trello_gantt-0.1.5.tar.gz
| Download URL | trello_gantt-0.1.5.tar.gz |
|---|---|
| Size | 27.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
52291d3bfbe50341563246c13986681c3c65b2051dd2bba9112cfdfa0e7e3173
|
|
BLAKE2b-256 checksum How to use checksums |
098ae71ea567e0e0e637c062e2411a57264dc9fdacb4fb299c2f10253c34529c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / trello_gantt-0.1.5-py3-none-any.whl
| Download URL | trello_gantt-0.1.5-py3-none-any.whl |
|---|---|
| Size | 27.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dde2dd2e71f233a1d33b3696ecd785b2108c62725ca6c3eed85a823f78b2cd79
|
|
BLAKE2b-256 checksum How to use checksums |
79d9de2f8d51e9cff72c7fa725616620d4591f65859bca17f8baf6aa6b96bc5c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Security for trello-gantt 0.1.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.