gutenberg_get_text sources from the PG-sanctioned mirror
Text fetches now go through gutenberg.pglaf.org instead of the ToS-restricted www.gutenberg.org, and has_plain_text no longer advertises un-fetchable books.
Fixed:
gutenberg_get_textbuilds fetch URLs from the book ID against the PG-sanctioned mirror (GUTENBERG_TEXT_BASE_URL, defaultgutenberg.pglaf.org), never from Gutendex's raw format URLs, which point at the ToS-restrictedwww.gutenberg.org. (#1)has_plain_textrequires a UTF-8text/plainformat; us-ascii-only books now reporthas_plain_text: falseinstead of promising agutenberg_get_textcall that always failed. (#7)resolveTextUrlreturnsnullfor us-ascii-only books;fetchAndCacheTextthrowsnotFound(no_text_format) instead ofserviceUnavailable, and the tool's own format guard matches.
Changed:
GUTENBERG_TEXT_BASE_URLdefault:https://www.gutenberg.org→https://gutenberg.pglaf.org- README /
docs/design.mdupdated for the mirror-sourced UTF-8/HTML fallback chain
76 tests pass; bun run devcheck clean.