wikipedia-to-epub
v0.1.1 Released: 2026-06-01
GitHub

Generate Ebooks from Wikipedia

A blazing fast CLI tool to compile your favorite Wikipedia articles into clean, readable EPUB books ready for Kindle, Kobo, or Apple Books.

Download Executable

Get the latest pre-compiled binaries matching release v0.1.1

About & Getting Started

Wikipedia to epub

A command line tool written in Rust that given a configuration file in YAML Format will generate an .epub file that can used on an Amazon Kindle.

To get started:

  1. Download the tool from above.
  2. Copy the content of Configuration template.
  3. Adjust the fields to your liking.
  4. Run the wikipedia-to-epub command.

Amazon

You can upload your book to your Kindle via this link: Send to Kindle

Example Books

To see real-world usage and compile reference books, explore the configuration files stored in the examples/ directory of the repository.

View examples folder

Configuration Template

Copy this template configuration skeleton.yaml to customize your eBook compilations:
# ==============================================================================
# skeleton.yaml - Book Configuration Template for wikipedia-to-epub
# ==============================================================================
# Use this file as a starting point to compile Wikipedia articles into an EPUB.

# Metadata block for the compiled EPUB book.
metadata:
  # The title of the book.
  # Value: Any descriptive string.
  title: "My Custom Wikipedia Book"

  # The author or compiler of the book.
  # Value: Any descriptive string.
  author: "Wikipedia Contributors & Compiler"

  # (Optional) The license under which the book/content is compiled.
  # Value: A license string or null/omitted.
  license: "Creative Commons Attribution-ShareAlike 4.0 License"

  # The language of the Wikipedia articles to download (e.g., "en", "es", "he", "ko").
  # Value: Any valid ISO 639-1 language code of a live Wikipedia project.
  language: "en"

  # (Optional) The publication date of the book.
  # Value: Date string (typically YYYY-MM-DD) or null/omitted.
  date: "2026-05-29"

  # The edition designation for the compiled book.
  # Value: Any descriptive string (e.g., "First edition").
  edition: "First edition"

# The name or path of the output EPUB file to be generated.
# Value: A valid relative or absolute file path ending in .epub.
output-file: "my-custom-book.epub"

# Whether to fetch and embed images found in the articles.
# Valid values:
#   - true  : Download and embed matching images as high-quality EPUB assets.
#   - false : Do not embed images (produces a text-only EPUB).
images: false

# Cache strategy to use for article metadata, wikitext, and images.
# Valid values:
#   - "none"    : Disable caching completely. Always fetches fresh data from live Wikipedia APIs.
#   - "local"   : Uses a relative ".cache/" directory in the current working directory.
#   - "central" : Uses a platform-specific user cache directory (e.g. "~/.cache/wikipedia-to-epub" on Linux).
caching: "central"

# Depth level of link recursion to follow.
# Valid values:
#   - 0 : Only download and compile the articles explicitly listed under the 'articles' field.
#   - 1 : Follow links inside the listed articles. Download and add linked pages to the book
#         (only following links within the same language Wikipedia, without duplicates, depth-first).
depth: 0

# List of Wikipedia article page titles to compile into the book.
# Value: An array of article page title strings. The book will be constructed in the
# order listed (depth-first if depth > 0).
articles:
  - "Earth"
  - "Solar System"