5 Commits
Author SHA1 Message Date
patrick ff75f2c758 chore: clear the lint in the files this branch touches
Unused imports, duplicated import lines, and bare excepts that swallowed
KeyboardInterrupt along with everything else.
2026-08-15 22:01:04 -04:00
patrick 8ee406533c feat: canonicalise author names
Extractors wrote whatever the file said, so one person held several rows:
"Sam Newman" beside "Newman, Sam;" beside "Sam Newman.epub", the last because
the upload path never stripped the file extension. Tidy on write, in the
validator and in the uniqueness lookup alike, and merge the rows that collide.
2026-08-15 21:56:35 -04:00
patrick 373c96d6d6 fix: match the compact edition markers a cover carries
"Building Microservices, 2E" never matched "Building Microservices". Key the
strip on the trailing "e" so 2E, 5e and 3 Ed are caught, while a bare number
leaves "Catch 22" and "Blade Runner 2049" alone. Stored keys are recomputed.
2026-08-15 21:55:45 -04:00
patrick 523117ec28 fix: keep the identifiers an EPUB declares
DC:identifier was validated verbatim, so hyphenated and urn:isbn: forms never
reached the checksum and every non-ISBN identifier was discarded. Normalise
first, and name whatever survives.
2026-08-15 21:54:12 -04:00
patrick 86e1d096ef feat: add normalisation helpers for book matching
Reduce a title, an author and an identifier to a single comparison key, so
two copies of one book can be recognised by equality rather than by a
similarity score.
2026-08-15 21:44:50 -04:00