No description
  • Python 99.2%
  • Shell 0.8%
Find a file
Nimmo 72fc73af8b Extract dependencies into requirements.txt
setup.sh now calls pip install -r requirements.txt so manual setup and
script setup follow identical steps.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 22:28:52 +01:00
.gitignore Add Claude Code CLI fallback, manual pipeline scripts, and #model attribute 2026-04-14 22:26:48 +01:00
config.json.example Starting point 2026-03-06 19:56:43 +00:00
extract_diffs.py Add Claude Code CLI fallback, manual pipeline scripts, and #model attribute 2026-04-14 22:26:48 +01:00
forgejo-daily-report.py Add Claude Code CLI fallback, manual pipeline scripts, and #model attribute 2026-04-14 22:26:48 +01:00
post_note.py Add Claude Code CLI fallback, manual pipeline scripts, and #model attribute 2026-04-14 22:26:48 +01:00
pyrightconfig.json Add setup.sh, pyrightconfig.json, and fix type/style warnings 2026-03-06 20:36:58 +00:00
README.md Add README 2026-03-06 21:04:37 +00:00
requirements.txt Extract dependencies into requirements.txt 2026-04-14 22:28:52 +01:00
setup.sh Extract dependencies into requirements.txt 2026-04-14 22:28:52 +01:00

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:

  1. Fetches commits via the Forgejo API
  2. Fetches the diff for each commit
  3. Sends the diffs and commit messages to Ollama for an HTML summary
  4. 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 reports
  • iconClass=bx bxl-git — git icon in the note tree
  • <repo-name>=<date> — e.g. nixos-config=2026-03-05, for per-repo history searches