8000 feat: confirm a dropped book's metadata before filing by DArtagan · Pull Request #13 · DArtagan/bookdrop · GitHub
[go: up one dir, main page]

Skip to content

feat: confirm a dropped book's metadata before filing - #13

Merged
DArtagan merged 10 commits into
mainfrom
confirm
Nov 5, 2026
Merged

DArtagan merged 10 commits into
mainfrom
confirm

Conversation

@DArtagan
@DArtagan DArtagan commented Nov 3, 2026
Copy link
Copy Markdown
Owner

A drop now leads to its own page: title, authors, series, ISBN and the
rest read from the book's OPF, EPUB 2 or 3 and Calibre's series, gaps
filled from Open Library, every field editable and labelled with where
its value came from, the cover, and the destination path folded to
Latin-1 with a warning when it already exists. Drops are kept under
/data and listed on the upload page, so they survive a restart, and an
authors.toml there maps variant spellings to one name. Confirming
records the decision and writes nothing to the library.

Google Books is left out: keyless callers share one daily quota, which
answered 429 on 2026-11-03.

A drop now leads to its own page: title, authors, series, ISBN and the
rest read from the book's OPF, EPUB 2 or 3 and Calibre's series, gaps
filled from Open Library, every field editable and labelled with where
its value came from, the cover, and the destination path folded to
Latin-1 with a warning when it already exists. Drops are kept under
/data and listed on the upload page, so they survive a restart, and an
authors.toml there maps variant spellings to one name. Confirming
records the decision and writes nothing to the library.

Google Books is left out: keyless callers share one daily quota, which
answered 429 on 2026-11-03.
Comment thread docs/design.md Resolved
Comment thread src/bookdrop/drops.py Resolved
Comment thread src/bookdrop/drops.py Resolved
Comment thread src/bookdrop/layout.py Resolved
Comment thread tests/test_web.py Resolved
Comment thread src/bookdrop/lookup.py Resolved
Comment thread src/bookdrop/lookup.py Resolved
Comment thread src/bookdrop/lookup.py Resolved
Comment thread src/bookdrop/lookup.py Resolved
Comment thread src/bookdrop/metadata.py Resolved
- Fold paths to ASCII, not Latin-1. The library's older accented names
  are UTF-8 on disk and read through the share as mojibake, so Latin-1
  writes would add a third encoding; ASCII is the same in all of them.
- Refuse to confirm a series number that is not a finite, non-negative
  number, or one without a series.
- Ask Open Library for authors' names only when the book has none, and
  name a contact in the User-Agent when BOOKDROP_CONTACT is set, as its
  API guidance asks; identified clients get three times the rate limit.
- Derive the editable fields from Metadata and read the form whole, so
  the field list exists once.
- Save and load a drop's record with asdict and **record, rename done
  to preparation, and say why the record is written then renamed.
- Docstrings for fill and _date, and a fuller note on the tool stubs.
Open Library asks for a contact address from clients making several calls a minute. A drop makes about two per book bought, so the setting would go unset; the User-Agent names bookdrop and its repository, as before.
Their names cost a request each, and were asked for only when the book named none. No EPUB in the library lacks a dc:creator (230 of 230 on 2026-11-05) and a PDF has no ISBN to look up, so that path never ran. A book without authors now shows the field empty, to be typed in.
@DArtagan DArtagan left a comment
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good enough.

Read from Stump v0.1.11's source and its database on 2026-11-05: series and ISBN only in Calibre's EPUB 2 forms, dc:subject as genres, calibre:title_sort, a sidecar only as <book>.opf, and a collection-based library whose series are author folders.
Will's decision, 2026-11-05: Stump ignores it, but it is the Calibre-compatible backup the rest of the library carries.
From dc:subject, where Stump reads genres and Calibre writes its tags,
deduplicated, and edited one a line since a genre can contain a comma.
Open Library does not fill them: its subjects for The Way of Kings mix
four spellings of epic fantasy with "New York Times Bestseller" and
nyt:hardcover-fiction=2010-09-19, each of which would become a genre.
Confirming now needs a title and an author, as the design's first
version required, and refuses an ISBN whose check digit fails, since
filing writes it into the book. A book with no title is no longer named
after its upload: an .acsm's file name is URLLink, and it was labelled
as coming from the book.
@DArtagan
DArtagan merged commit 8fbad67 into main Nov 5, 2026
2 checks passed
@DArtagan
DArtagan deleted the confirm branch November 5, 2026 19:08
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

0