Previously git diff checked unstaged changes, so new untracked files
(like the new Abstimmungen/ directory) would not trigger a commit.
Now stages first, then checks the staged diff.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Loads the previous raw.json before saving, compares against current
crawl, and generates commit messages listing: new/departed representatives,
party changes, new disclosures, and total profiles updated.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Creates Abstimmungen/ with one markdown file per vote topic, sorted by
party. Uses a JSON backing store so votes are preserved even after they
are removed from the Bundestag website.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add encoding="utf-8" to all file writes
- Catch requests.RequestException instead of bare except
- Use raise_for_status() to also retry on HTTP errors
- Use removeprefix/removesuffix instead of lstrip/rstrip
- Use makedirs(exist_ok=True)
- Remove unused common_suffix function and commonprefix import
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>