Repository navigation
🦗 Add Internet Archive BookReader PDF export and web panel - #14
Merged
Merged
Conversation
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.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.
Adds an Internet Archive export path to the PDF toolbench, so an item ID or a full two-page reader URL can be used to capture a book as one PDF page per scan. This captures images shown by BookReader rather than downloading an archive-hosted PDF.
export-archive-book.pyopens a visible, persistent Playwright Chromium session and pauses for sign-in or borrowing and an Enter keypress in Terminal. It switches BookReader to single-page (1up) mode, navigates by scan index, waits for the matching image to load, and captures it without reader controls.Inclusive
--startand--endpositions count scans, including covers and front matter; output paths are configurable. Numbered PNG captures are reused when resuming. Temporary writes and PDF replacement preserve an existing PDF when a requested scan fails.A dedicated Internet Archive panel validates item IDs, URLs, and scan ranges and builds a shell-safe local command. As with the other panels, the web interface does not execute the export.
README instructions explain the login/borrow handoff, persistent local browser profile, dependencies, and access limits. The new profile is ignored by Git; scan captures remain outside version control. Internet Archive's lending guidance describes reader-only access for some loans.
Frontend and Playwright-backed Python tests cover input rejection, delayed image loading, switching from 2up to 1up, identical blank pages, resuming gaps, out-of-range scans, and retaining an existing PDF after capture failure.
The additional panel builds on the modular toolbench and command-builder approach introduced by 🧩 Introduce modular PDF toolbench #1 without combining it with the existing Google Books, OCR, review, or compression workflows.
A complete export still depends on access to every requested scan in the current reader session; this change does not establish full-book access for the example title.
Source links
Online · Local · Desktop