Rework the Pushover/Apprise summary so it reads as a report instead of a dump of counters.
Changes
Single builder.build_summary() is now the one source of truth for both notifiers, removing the duplicated body string and the stray leading indentation caused by backslash line continuations.
format option:plain (aligned columns) or html (bold labels, sets html=1 for Pushover). Apprise always receives the plain body since it has no HTML support.
use_emoji for emoji-prefixed rows.
Title states the outcome (qbit-maid: 7 torrents removed) instead of --- qbit-maid summary ---.
Dry-run safety: says Would remove when delete_torrents = false, so a dry run is never mistaken for a real deletion.
Runtime formatted as 12s / 1m 04s / 1h 02m 03s instead of a timedelta with microseconds.
New options:include_hostname, notify_on_empty, priority, sound, retry, expire.
Failures are logged, not raised, so a Pushover outage can't abort a run.
All new config keys are optional and defaulted, so existing config.toml files keep working unchanged.
Tests
51 tests pass (python3 -m unittest test_qbitmaid test_write_csv), 24 of them new — covering all four style/emoji combinations, both delete_torrents states, runtime formatting, notify_on_empty, priority/retry/expire handling, error swallowing, and that Apprise never receives HTML.
Rework the Pushover/Apprise summary so it reads as a report instead of a dump of counters.
## Changes
- **Single builder.** `build_summary()` is now the one source of truth for both notifiers, removing the duplicated body string and the stray leading indentation caused by backslash line continuations.
- **`format` option:** `plain` (aligned columns) or `html` (bold labels, sets `html=1` for Pushover). Apprise always receives the plain body since it has no HTML support.
- **`use_emoji`** for emoji-prefixed rows.
- **Title states the outcome** (`qbit-maid: 7 torrents removed`) instead of `--- qbit-maid summary ---`.
- **Dry-run safety:** says `Would remove` when `delete_torrents = false`, so a dry run is never mistaken for a real deletion.
- **Runtime** formatted as `12s` / `1m 04s` / `1h 02m 03s` instead of a timedelta with microseconds.
- **New options:** `include_hostname`, `notify_on_empty`, `priority`, `sound`, `retry`, `expire`.
- **Failures are logged**, not raised, so a Pushover outage can't abort a run.
## Example
```
qbit-maid: 7 torrents removed
Scanned 42 torrents in 12s
Removed 7
Orphaned 4
Ignored 5
Premature 3
Protected 10
Non-protected 20
```
## Compatibility
All new config keys are optional and defaulted, so existing `config.toml` files keep working unchanged.
## Tests
51 tests pass (`python3 -m unittest test_qbitmaid test_write_csv`), 24 of them new — covering all four style/emoji combinations, both `delete_torrents` states, runtime formatting, `notify_on_empty`, priority/retry/expire handling, error swallowing, and that Apprise never receives HTML.
Rework the Pushover/Apprise summary so it reads as a report instead of a
dump of counters.
- Extract build_summary() as the single source of truth for both notifiers,
removing the duplicated body string and the stray leading indentation
caused by backslash line continuations.
- Add a 'format' option: 'plain' (aligned columns) or 'html' (bold labels,
sets html=1 for Pushover). Apprise always receives the plain body.
- Add 'use_emoji' for emoji-prefixed rows.
- Title now states the outcome ('7 torrents removed') instead of
'--- qbit-maid summary ---'.
- Say 'Would remove' when delete_torrents is false, so a dry run is never
mistaken for a real deletion.
- Format runtime as 12s / 1m 04s instead of a timedelta with microseconds.
- Add include_hostname, notify_on_empty, priority, sound, retry and expire.
- Log notification failures instead of letting them abort the run.
- Cover the new formatting with unit tests; document the options in the
README and config.toml.example.
jblu
merged commit 1caa346a7c into main2026-11-02 01:13:23 -06:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Rework the Pushover/Apprise summary so it reads as a report instead of a dump of counters.
Changes
build_summary()is now the one source of truth for both notifiers, removing the duplicated body string and the stray leading indentation caused by backslash line continuations.formatoption:plain(aligned columns) orhtml(bold labels, setshtml=1for Pushover). Apprise always receives the plain body since it has no HTML support.use_emojifor emoji-prefixed rows.qbit-maid: 7 torrents removed) instead of--- qbit-maid summary ---.Would removewhendelete_torrents = false, so a dry run is never mistaken for a real deletion.12s/1m 04s/1h 02m 03sinstead of a timedelta with microseconds.include_hostname,notify_on_empty,priority,sound,retry,expire.Example
Compatibility
All new config keys are optional and defaulted, so existing
config.tomlfiles keep working unchanged.Tests
51 tests pass (
python3 -m unittest test_qbitmaid test_write_csv), 24 of them new — covering all four style/emoji combinations, bothdelete_torrentsstates, runtime formatting,notify_on_empty, priority/retry/expire handling, error swallowing, and that Apprise never receives HTML.Rework the Pushover/Apprise summary so it reads as a report instead of a dump of counters. - Extract build_summary() as the single source of truth for both notifiers, removing the duplicated body string and the stray leading indentation caused by backslash line continuations. - Add a 'format' option: 'plain' (aligned columns) or 'html' (bold labels, sets html=1 for Pushover). Apprise always receives the plain body. - Add 'use_emoji' for emoji-prefixed rows. - Title now states the outcome ('7 torrents removed') instead of '--- qbit-maid summary ---'. - Say 'Would remove' when delete_torrents is false, so a dry run is never mistaken for a real deletion. - Format runtime as 12s / 1m 04s instead of a timedelta with microseconds. - Add include_hostname, notify_on_empty, priority, sound, retry and expire. - Log notification failures instead of letting them abort the run. - Cover the new formatting with unit tests; document the options in the README and config.toml.example.