Skip to main content

Project-to-EPUB

Convert a software project directory into an EPUB file for offline code reading and browsing on e-readers and tablets.

Features

  • Preserves your project's directory structure in the EPUB table of contents
  • Applies syntax highlighting to recognized code files
  • Respects .gitignore rules to exclude unwanted files
  • Optimized for e-ink devices with high-contrast themes
  • Configurable via command-line options

Installation

pip install project-to-epub

Or install from source:

git clone https://github.com/PsychArch/project-to-epub.git
cd project-to-epub
pip install -e .

Usage

Basic usage:

project-to-epub /path/to/your/project

This will create an EPUB file named after your project directory in the current working directory.

Command-line options

Usage: project-to-epub [OPTIONS] [INPUT_DIRECTORY]

  Convert a software project directory into an EPUB file for offline code reading.

  This tool creates an EPUB that preserves your project structure in the table of
  contents, applies syntax highlighting to code files, and respects .gitignore rules.

Arguments:
  INPUT_DIRECTORY  Path to the project directory to convert. Defaults to the current directory.

Options:
  -o, --output PATH               Output EPUB file path
  --theme TEXT                    Syntax highlighting theme (e.g., default_eink, 
                                 monokai)
  --log-level TEXT                Log level (DEBUG, INFO, WARNING, ERROR)
                                 [default: INFO]
  --title TEXT                    Set EPUB title (defaults to project directory name)
  --author TEXT                   Set EPUB author
  --limit-mb FLOAT                Set large file threshold in MB
  --no-skip-large                 Include large files instead of skipping
  --hierarchical-toc              Use a hierarchical table of contents
  --version                       Show version and exit
  --help                          Show this message and exit.

Examples

Specify an output file:

project-to-epub /path/to/project -o ~/Documents/my-project.epub

Use a different syntax highlighting theme:

project-to-epub /path/to/project --theme monokai

Custom title and author:

project-to-epub /path/to/project --title "My Awesome Project" --author "Jane Developer"

Configuration

The tool uses sensible defaults but can be customized using command-line options:

  • Theme: Default is default_eink, a monochrome high-contrast theme optimized for black-white e-ink displays.
  • Output File: Defaults to <project_name>.epub in the current directory.
  • File Size Handling: Files larger than 10MB are skipped by default.
  • Table of Contents: Defaults to a flat TOC. Use --hierarchical-toc to group entries by directory.
  • Metadata: Title defaults to the project directory name. Author defaults to "Project-to-EPUB Tool".

All settings can be customized via command-line options as shown in the usage section.

Supported Code File Types

Project-to-EPUB supports all file types recognized by Pygments. This includes most popular programming languages like Python, JavaScript, Java, C/C++, Ruby, Go, Rust, and many more.

Requirements

  • Python 3.8.1+
  • Pygments
  • pathspec
  • PyYAML
  • typer
  • Markdown

License

MIT

Metadata

Release files for project-to-epub 0.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for project-to-epub 0.2.3
File Size Uploaded Provenance Actions
project_to_epub-0.2.3.tar.gz 24.2 kB With provenance Details for project_to_epub-0.2.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for project-to-epub 0.2.3
File Interpreter ABI Platform Actions
project_to_epub-0.2.3-py3-none-any.whl Python 3 none any Details for project_to_epub-0.2.3-py3-none-any.whl

Total release size: 44.6 kB

Release files / project_to_epub-0.2.3.tar.gz

Download URL project_to_epub-0.2.3.tar.gz
Size 24.2 kB
Tags Source
SHA-256 checksum
How to use checksums
1d33d1d9117cfe5657e67839451fcf780177738e1292317902015c6e439c5cc0
BLAKE2b-256 checksum
How to use checksums
f928dd16d0a8445d3e2ed92a880f28c9417bed430738be991847ca51fde24791
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.

Transparency log

Release files / project_to_epub-0.2.3-py3-none-any.whl

Download URL project_to_epub-0.2.3-py3-none-any.whl
Size 20.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
11c67ef43bf919c94567e7c5a607e8c84d98aa1cfdb8561f665db8ba8bb04db0
BLAKE2b-256 checksum
How to use checksums
56703499b5403df70eebb61f145c8e9036015f26a933f4a6d26447d2f6080fa3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.

Transparency log

Security for project-to-epub 0.2.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for project_to_epub-0.2.3.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page