No description
- Python 98.7%
- Shell 1.3%
| .gitignore | ||
| config.json.example | ||
| forgejo-daily-report.py | ||
| pyrightconfig.json | ||
| README.md | ||
| setup.sh | ||
forgejo-daily-report
Generates a daily summary of Forgejo repository activity and posts it to TriliumNext as child notes under the day's date note.
For each repo with activity on the target day, it:
- Fetches commits via the Forgejo API
- Fetches the diff for each commit
- Sends the diffs and commit messages to Ollama for an HTML summary
- Posts the summary as a child note under that day's Trilium date note
Requirements
- Python 3.11+
- An Ollama instance with a model loaded
- A TriliumNext instance with ETAPI enabled
- A Forgejo instance with an API token
Setup
cp config.json.example config.json
# Edit config.json with your details
bash setup.sh
Configuration
All settings can be provided via config.json (takes precedence) or environment variables.
| Key | Description | Default |
|---|---|---|
FORGEJO_URL |
Base URL of your Forgejo instance | https://git.nimmog.uk |
FORGEJO_TOKEN |
API token with read:repository and read:user scopes |
(required) |
FORGEJO_USER |
Forgejo username whose repos to report on | nimmo |
OLLAMA_URL |
Ollama API base URL | http://192.168.8.124:11434 |
OLLAMA_MODEL |
Model to use for summarisation | qwen3.5:122b |
TRILIUM_URL |
TriliumNext base URL | https://notes.nimmog.uk |
TRILIUM_TOKEN |
ETAPI token | (required) |
MAX_DIFF_BYTES |
Max bytes of diff to send per repo | 100000 |
DIFF_EXCLUDE_PATTERNS |
Extra filename patterns to exclude from diffs (config.json only, as a list) | [] |
Usage
# Report on yesterday (default)
venv/bin/python3 forgejo-daily-report.py
# Report on a specific date
venv/bin/python3 forgejo-daily-report.py 2026-03-05
Cron
0 1 * * * /home/nimmo/scripts/forgejo-daily-report/venv/bin/python3 /home/nimmo/scripts/forgejo-daily-report/forgejo-daily-report.py
Trilium notes
Each generated note is tagged with:
git-report— allows searching across all reportsiconClass=bx bxl-git— git icon in the note tree<repo-name>=<date>— e.g.nixos-config=2026-03-05, for per-repo history searches