Commit Graph
5 Commits
Author SHA1 Message Date
kosmos 85ddfb4a71 Add arrow-key menus and report loading status
wizard: when stdin and stdout are both TTYs, menus render inline and
are driven by keys: up/down/j/k/Home/End move the bold '>' highlight,
Enter accepts, Esc/Ctrl-C/q back out of cancellable menus while Ctrl-C
on fixed menus still aborts. Rows redraw with erase+CR across the
option block only and clear before returning so prompts stay aligned.
Non-TTY stdio keeps the original numbered prompt verbatim.

report: each configured source shows a transient "# Generating
report: pulling <name> data..." line that is erased on completion,
only when stdout is a TTY; piped output remains exactly the report.

tests: cover the numbered fallback, row rendering, status suppression
and show+clear parity; reformat stray test files to satisfy ruff.
2026-08-27 07:46:48 +00:00
kosmosandvhaudiquet 6d8cc3d817 Add config onboarding wizard and aggregated report
- `weekly-activity config`: interactive wizard writing
  ~/.config/weekly-activity.toml (XDG-aware, --config override), one
  section per source, 0600 permissions, tokens never echoed; re-runs show
  current settings and pre-fill defaults
- `weekly-activity report` (and bare invocation): loads enabled sources,
  collects each independently, joins blocks under one header; a failing
  source renders as [skipped: <source> — error] without aborting
- config.py: typed schema, tomllib reader with strict validation,
  hand-formatted TOML writer (stdlib-only, no new dependency)
- aggregate.py: source spec building + failure-isolated collection +
  combined rendering
- README: document config/report usage and config schema
- tests/: 16 stdlib-unittest cases (config round-trip/escaping/validation,
  aggregation mapping/isolation)
2026-08-26 20:18:41 +00:00
vhaudiquet 98eb6ab542 Add Debian BTS source for bugs filed and owned
New `bts` subcommand backed by python-debianbts (bugs.debian.org SOAP):

- Identify by email address: get_bugs(submitter=...) for bugs filed,
  get_bugs(owner=...) for bugs owned
- Filed filtered on creation date, owned on log_modified; status
  lookups capped at 500 bugs per collect
- Per-query failures degrade to warnings like other sources
2026-08-25 19:44:56 +02:00
vhaudiquet 5b89313c4a Add GitLab source for gitlab.com and self-hosted instances (Salsa) 2026-08-25 18:02:52 +02:00
vhaudiquet 3625229056 Restructure to multi-source architecture; fix GitHub repo timeline filter
- Rename package launchpad_weekly_activity -> weekly_activity
- Split into model.py (ActivityReport, Section), report.py (source-agnostic
  formatter), cli.py (subcommand dispatch), sources/ (per-source modules)
- Move Launchpad code to sources/launchpad.py implementing ActivitySource
- Add GitHub source (sources/github.py) using httpx: PRs, issues, repos, commits
- Fix GitHub 'Repositories modified' filtering on pushed_at not updated_at
  (metadata changes were showing stale repos with no recent code pushes)
- Add --credentials-file for Launchpad OAuth (bypass keyring for headless)
- Add keyring dep (launchpadlib optional dep; bare import crashes without it)
- Graceful per-query error handling: degraded sections + concise warnings
- Rolling 7-day window (was previous calendar week)
2026-08-25 15:24:10 +02:00