41 lines
2.8 KiB
Markdown
41 lines
2.8 KiB
Markdown
# Booksorter
|
|
|
|
A small local web app for labelling a personal library with Library of Congress call numbers. Hold a book's barcode up to a laptop webcam (or type the ISBN), and Booksorter looks up the call number from the Library of Congress and Open Library, builds a spine label, and prints cards on Avery 5388 sheets (three 3 x 5 inch cards per sheet). Everything runs on your own machine; the only outside traffic is the book lookups made by the server.
|
|
|
|
## Install and run
|
|
|
|
```
|
|
npm install
|
|
npm start
|
|
```
|
|
|
|
`npm start` builds the web app into `dist/web` and serves it at http://localhost:4321 (only reachable from this computer). Set `PORT` to use another port. If the port is taken, the server says so and exits.
|
|
|
|
Requires a recent Node (the server runs TypeScript directly).
|
|
|
|
## Using it
|
|
|
|
The header has **Scan**, **Library (N)** and a gear for settings.
|
|
|
|
**Scan** is the home screen. On the left are the camera, the last book handled, and one entry box. Hold a barcode in the box on the video (a beep and a green flash mean it was read), press **Capture** or Space for one careful picture, or type an ISBN and press Enter (a USB barcode scanner does the same). The same box takes an LCCN (from the copyright page) or a title: type `Dune by Frank Herbert`, pick a result, or choose *Not listed? Enter it by hand*. On the right, **Cards to print** lists every queued book, books needing attention first. Use **Fix** on a book that needs attention, or the x to remove it (with 6 seconds to undo). A book already printed is only taken off the list, never deleted.
|
|
|
|
**Print** opens a small panel: pick where the first card goes on the sheet (handy for a partly used sheet), then **Make PDF**. Cards are printed in shelf order on Avery 5388 sheets (three 3 x 5 inch cards).
|
|
|
|
1. Open the PDF and print at **Actual size / 100%** (never "Fit to page"), **single-sided**, through the **manual feed slot**.
|
|
2. When the cards came out correctly, answer **Yes, clear them** so they are not printed twice.
|
|
|
|
**Library** shows every book in shelf order, grouped by main class, with search and a *Needs attention* filter. Click a book to edit it, print another card, look it up again, or delete it. A number marked `~` was borrowed from another edition or from similar books; check those.
|
|
|
|
**Settings** (the gear) holds the camera picker and printer alignment. If the text sits off-centre on the cards, print the calibration page on plain paper, hold it against a real sheet up to the light, and enter the X and Y offsets in millimetres (limit 10). They are saved and applied to every later PDF.
|
|
|
|
## Where the data lives
|
|
|
|
In `data/booksorter.db` (SQLite) in this folder, created on first run. Back it up by copying the file while the server is stopped. Set `BOOKSORTER_DB` to use a different file.
|
|
|
|
## Tests
|
|
|
|
```
|
|
npm test # unit and server tests
|
|
npm run typecheck
|
|
```
|