Skip to main content

Download Royal Road fiction chapters as Markdown and EPUB (CLI + API)

Project description

FictionReaper

Download Royal Road fiction as Markdown and/or EPUB.

Works on macOS and Linux (Python 3.12+). Ships a CLI and a small HTTP API.

Install (end users)

Pick one. All put a fictionreaper command on your PATH.

Option A — uv tool (recommended)

Install uv, then:

uv tool install git+https://github.com/Fluder-Paradyne/FictionReaper.git
fictionreaper --version

Upgrade later:

uv tool upgrade fictionreaper
# or reinstall from git tip:
uv tool install --force git+https://github.com/Fluder-Paradyne/FictionReaper.git

Option B — pipx

pipx install git+https://github.com/Fluder-Paradyne/FictionReaper.git
fictionreaper --version

Option C — pip (venv)

python3 -m venv .venv
source .venv/bin/activate
pip install "git+https://github.com/Fluder-Paradyne/FictionReaper.git"
fictionreaper --version

Option D — PyPI (after first publish)

pip install fictionreaper
# or:  uv tool install fictionreaper
# or:  pipx install fictionreaper

Publishing notes for maintainers: docs/PUBLISHING.md.

Requirements

OS macOS or Linux
Python 3.12+ (3.13 supported)
Network outbound HTTPS to royalroad.com / CDN

Native wheels for dependencies (lxml, etc.) are published for common Mac/Linux platforms; a normal install does not need a compiler in most cases.

Quick start

# One chapter → Markdown + EPUB (default)
fictionreaper download \
  "https://www.royalroad.com/fiction/21220/mother-of-learning/chapter/301778/1-good-morning-brother"

# Whole fiction (many chapters — be polite with --delay)
fictionreaper download \
  "https://www.royalroad.com/fiction/21220/mother-of-learning" \
  --delay 1.0

# Formats
fictionreaper download "<url>" --format markdown
fictionreaper download "<url>" --format epub
fictionreaper download "<url>" --format markdown,epub
fictionreaper download "<url>" -f markdown -f epub

# Output directory
fictionreaper download "<url>" --output-dir ~/Books/rr

Output layout:

downloads/<fiction-slug>/
  0001-chapter-slug.md
  0002-chapter-slug.md
  ...
  <fiction-slug>.epub

HTTP API

fictionreaper serve --host 127.0.0.1 --port 8000
# docs: http://127.0.0.1:8000/docs
curl -sS -X POST 'http://127.0.0.1:8000/download' \
  -H 'Content-Type: application/json' \
  -d '{
    "url": "https://www.royalroad.com/fiction/21220/mother-of-learning/chapter/301778/1-good-morning-brother",
    "output_dir": "downloads",
    "delay_seconds": 1.0,
    "formats": ["markdown", "epub"]
  }'

Development

git clone https://github.com/Fluder-Paradyne/FictionReaper.git
cd FictionReaper
uv sync --all-groups
uv run pytest
uv run mypy src
uv run ruff check src tests
uv build

Ethics & legal

  • For personal archival / offline reading of content you are allowed to access.
  • Be polite: keep a non-zero --delay, don’t hammer the site.
  • Respect Royal Road’s Terms of Service and copyright.
  • Default User-Agent: FictionReaper/0.1 (+https://github.com/Fluder-Paradyne/FictionReaper).

License

MIT — see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fictionreaper-0.1.0.tar.gz (15.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fictionreaper-0.1.0-py3-none-any.whl (20.7 kB view details)

Uploaded Python 3

File details

Details for the file fictionreaper-0.1.0.tar.gz.

File metadata

  • Download URL: fictionreaper-0.1.0.tar.gz
  • Upload date:
  • Size: 15.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fictionreaper-0.1.0.tar.gz
Algorithm Hash digest
SHA256 acadf0d4755316642c295bc95b24c4faf3cb930d52886e709b74cbd942e7cc37
MD5 9eb3670cd85443c9fd1fceb5db20ce39
BLAKE2b-256 d51831abb70c6d98845181710f4067991c6279bad24e99c5b1628d214bd852d1

See more details on using hashes here.

File details

Details for the file fictionreaper-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: fictionreaper-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 20.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fictionreaper-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 baac9d62a9e64ae0c6577dd43d416dc7bcdd22ccb653acc34d97777845dc862c
MD5 7f9c1025d81af5f8cb13c0bf5b0c6a8b
BLAKE2b-256 72a7a48ad6e26ab750fa6a5b8ac5f392b18f715936d53e59c8302651c1278626

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page