WeRead Text Downloader
Use this skill to download a purchased WeRead book and export it as chapter-based plain text.
Default behavior:
- CLI-only workflow
- final output is plain text, not
epub - chapter-based output for downstream AI reading
- no intermediate
rdata.zipis kept
Dependencies
Required:
python3pyppeteer
Optional for --headless QR display:
pillowpyzbarqrcode
Install the minimum dependency set with:
pip install pyppeteer
Install the headless extras only if needed:
pip install pillow pyzbar qrcode
Command
python3 weread-text-downloader/scripts/weread_text.py download "Book Name"
Optional flags:
--out-dir ./out--headless--delay 2--verbose
Example:
python3 weread-text-downloader/scripts/weread_text.py download "怦然心动" \
--out-dir ./out \
--verbose
Output
The script writes:
out/
<book-slug>/
metadata.json
toc.json
chapters/
001-<chapter-slug>.txt
002-<chapter-slug>.txt
Use metadata.json and toc.json for structure-aware downstream processing. Use chapters/*.txt as the primary AI reading input.
Workflow
- Start the CLI command.
- Log in to WeRead through the web reader.
- Open the target book from the bookshelf.
- Iterate chapters through the reader state.
- Convert chapter HTML into plain text.
- Write the output files.
Notes
- The book title match is substring-based against the bookshelf text.
- This tool assumes the requested book is already available in the logged-in WeRead account.
- When
--headlessis used, the QR code is printed in the terminal only if the optional QR dependencies are installed.