target_path/in_series_no_part: a series entry without a part no longe… - #17
Merged
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 thein_seriestemplate, producing folders such asLee 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 seriesand its part is empty after sanitisation. It takes the same tokens as
in_series/no_series; a missing or blank value means thedefault, and setting it to your
in_seriesvalue 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
3and23.5still usein_series; custom template honoured; blank falls backto the default; the old layout is reproducible.
python3 -m unittest discover -s tests -t .: 199 tests, OK; ruff clean.Series # - TitletoSeries - 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. Thedocs/FORK.mdrow for item 6 is left forthe release PR to avoid a same-line conflict.