Ask before reopening a bundle that carries no cuts

A bundle without a source block cannot be round-tripped, but its PDF can
still be cut from scratch. Offer that instead of refusing: confirm, run
detection, and line the markers up by position when the slice counts
match exactly.
This commit is contained in:
Esa Kataja
2026-07-29 15:06:45 +03:00
parent 61b8ec8301
commit cdf37302d7
5 changed files with 223 additions and 66 deletions
+9
View File
@@ -117,6 +117,15 @@ It refuses to overwrite a PDF or project file that is already there, since the
obvious place to unpack is exactly where someone's unfinished work lives — pass
`--pdf elsewhere.pdf` or `--force` if you mean it.
A bundle from a producer that does not record its cuts can still be opened, but
it is a fresh session rather than a round trip: it asks first, then cuts the PDF
from scratch with detection. The title block always comes back. Markers and
re-engraved systems land only if detection happens to find exactly as many
slices as the bundle has — the slices are in reading order on both sides, so
they can be lined up, but one system found or missed would shift every marker
onto the wrong slice, so in that case they are left off entirely and it says so.
`--detect` answers the question in advance, for scripts.
## Re-engraving a slice (optional, needs LilyPond)
When a system is beyond rescue — a bad scan, a wrong transposition, a passage