Skip to content

target_path/in_series_no_part: a series entry without a part no longe… - #17

Merged
Mancolt merged 1 commit into
mainfrom
feat/in-series-no-part
Sep 18, 2026
Merged

Mancolt merged 1 commit into
mainfrom
feat/in-series-no-part

Conversation

@Mancolt

@Mancolt Mancolt commented Sep 18, 2026

Copy link
Copy Markdown
Owner

Bug and impact

A book that belongs to a series but has no part number (a novella collection, a companion book, an entry Audible lists without a
sequence) rendered {part} empty in the in_series template, producing folders such as

Lee Child/Jack Reacher/Jack Reacher # - Three More Jack Reacher Novellas
Brad Taylor/Pike Logan/Pike Logan # - The Honeymoon Heist

Two unnumbered entries of the same series get identically prefixed folders, which risks a collision. Upstream issue myxdvz#27.

Fix

New template Config/target_path/in_series_no_part, default {author}/{series}/{series} - {title}, used when the book is in a series
and its part is empty after sanitisation. It takes the same tokens as in_series / no_series; a missing or blank value means the
default, and setting it to your in_series value keeps the old names. Books already filed are not moved (they carry a processed marker).
Docs: templates/default_config.cfg, CONFIG.md (target_path table), CHANGELOG.md.

Validation

  • New tests: empty / whitespace part → no-part template; 3 and 23.5 still use in_series; custom template honoured; blank falls back
    to the default; the old layout is reproducible.
  • python3 -m unittest discover -s tests -t .: 199 tests, OK; ruff clean.
  • Offline corpus replay (1,577 books, main vs. branch): 12 book-runs / 10 titles change from Series # - Title to Series - Title
    (Witcher ×2, The Honeymoon Heist, Pursuit of Honor, Incerto ×2, The Greatest Raid of All, The Dichotomy of Leadership, Three More Jack
    Reacher Novellas, Cleaning the Gold). No other target path, match, cache key or stdout line changes.
    Independent of the series round-trip PR (fix/series-part-roundtrip); either order merges. The docs/FORK.md row for item 6 is left for
    the release PR to avoid a same-line conflict.

…r files as "Series # - Title"

New template, default {author}/{series}/{series} - {title}, used when the
book is in a series but its part is empty after sanitisation (upstream myxdvz#27).
Configurable like in_series/no_series; setting it to the in_series value keeps
the old names. Corpus replay: 12 book-runs (10 distinct titles) change from
"Series # - Title" to "Series - Title", nothing else.

Co-authored-by: Cursor <cursoragent@cursor.com>
@Mancolt
Mancolt merged commit 7d5db59 into main Sep 18, 2026
2 of 3 checks passed
@Mancolt
Mancolt deleted the feat/in-series-no-part branch September 18, 2026 16:25
@Mancolt Mancolt mentioned this pull request Sep 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant