-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Hi! First of all, thank you for this project — the optimizer looks very useful for Xteink X4 / CrossPoint-style constrained devices.
I’m using it for a local/offline workflow to prepare a copy of my EPUB library for reading on Xteink X4. The source library is already organized in a deep folder tree (authors/series/books), and I want to preserve that structure in the optimized copy.
Current use case
Source: large EPUB library (generated offline from FB2)
Goal: optimize only the copy of the library for better performance (CSS cleanup, image optimization, grayscale, font stripping, etc.)
Requirement: offline, batch, recursive, preserve folder structure
What works now
Web optimizer is available and useful
CLI convert exists (init, convert) for EPUB → XTC/XTCH
What is missing (for EPUB optimizer workflow)
A CLI/offline way to optimize EPUB files recursively in a directory tree.
Requested features (priority order)
- CLI command for EPUB optimization
Something like:
node index.js optimize -o -c settings.json
Where:
can be a file or folder
is target file/folder
uses the same optimization options as the web Optimizer tab
- Recursive folder processing
Support recursive processing of subfolders, e.g.:
node index.js optimize ./library-epub -o ./library-epub-x4 --recursive
3) Preserve directory structure
When optimizing a folder tree, preserve relative paths:
library-epub/Author/Series/Book.epub
→
library-epub-x4/Author/Series/Book.epub
This is extremely important for existing libraries.
- In-place mode (optional)
Useful for optimized copy maintenance:
node index.js optimize ./library-epub-x4 --recursive --in-place
5) Dry-run and report/log output (optional but very useful)
For large libraries, it would help to have:
--dry-run
--report <file.json/csv>
summary of:
processed files
failed files
size before/after
applied optimizations
- Filter options (optional)
Examples:
--include "*.epub"
--exclude "*_original.epub"
--skip-existing
--overwrite
Thanks again!