This application uses OCR to create a backup of an ebook that you own from the screen on your PC.
Currently a work in progress!
You will need to install Pandoc. It must be on your system PATH — the pypandoc Python package is only a wrapper and does not bundle pandoc itself.
Windows:
winget install JohnMacFarlane.PandocRestart your terminal after installing so the PATH update takes effect.
macOS:
brew install pandocLinux:
sudo apt install pandoc # Debian/Ubuntu
sudo dnf install pandoc # FedoraFor other platforms see: https://pandoc.org/installing.html
First, install uv if you haven't already:
# On Windows (PowerShell)
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
# On macOS/Linux
curl -LsSf https://astral.sh/uv/install.sh | shThen clone and set up the project:
git clone https://github.com/chiplukes/clone-ebook
cd clone-ebook
uv syncgit clone https://github.com/chiplukes/clone-ebook
cd clone-ebook
python -m venv .venv
# On Windows:
.venv\Scripts\activate
# On macOS/Linux:
source .venv/bin/activate
pip install -e .Running main application:
# With uv
uv run python main.py
# Or if venv is activated
python main.pyTo convert an existing PDF file directly to markdown (skips screen capture):
uv run python main.py --input_pdf "path/to/your/book.pdf"- Evaluate replacing
pypandoc/pandoc withebooklibfor EPUB generation.ebooklibis pure Python and would remove the pandoc system binary requirement. Tradeoff: pandoc currently produces better-structured EPUB output.
Install development dependencies:
uv sync --extra devFor using pre-commit hooks:
uv run pre-commit install