-
Notifications
You must be signed in to change notification settings - Fork 0
Usage
./epubify.shRun with no arguments. There are no flags or positional parameters.
pdf2epub prompts interactively for EPUB metadata and fails with an EOFError if it can't read from a terminal, so EPUB output and unattended batching are mutually exclusive. The choice is made once per run, at startup:
============= Select Conversion Mode =============
1) Markdown + EPUB -- prompts for metadata on each document
2) Markdown only -- unattended (--skip-epub)
Choice [1-2]:
| Mode | What you get | Unattended? |
|---|---|---|
| 1 — Markdown + EPUB | Markdown, images, metadata JSON and an EPUB per document | No — pdf2epub asks for title, author and language on every document |
| 2 — Markdown only | Markdown, images and metadata JSON | Yes — passes --skip-epub and never prompts |
Mode 1 refuses to start if stdin isn't a TTY, rather than failing later mid-batch.
Epubify pauses at a few points during a run:
| Prompt | When it appears |
|---|---|
| Copy N more from input? [y/N] | Both the input folder and staging contain PDFs at startup |
| Press any key to continue . . . | After the mode menu and each of the three steps |
| Clean staging folder? [y/N] | At the end, before exiting — only if PDFs were found |
Each document gets its own folder under OUTPUT_DIR:
2) Done/
├── Some Document Name/
│ ├── Some Document Name.md
│ ├── Some Document Name.epub (mode 1 only)
│ ├── Some Document Name.json
│ └── images/
└── logs/
└── Some Document Name.log (mode 2 only)
In Markdown-only mode each conversion's console output is teed to logs/<name>.log. Those live in their own folder so they don't clutter the output root or get picked up by the name-tidying pass.
================= Processing Complete =================
Mode: Markdown + EPUB
Image: ghcr.io/overcuriousity/pdf2epub:latest
PDFs found: 5
PDFs converted: 4
PDFs skipped: 1
------------------------
Files copied: 5
Name tidying: Completed
Errors logged to: /path/to/output/error_log.txt
PDFs skipped counts documents that already had a converted result — see How It Works for how that's detected. Failure and rename-error counters appear only when non-zero, and the error-log line only when a log was actually written.