Generate kindle-like X-ray for e-books with LLM
pip install xraygpt
python -m xraygpt [epub_file]
Current this tool only support OpenAI (or compatible API like DeepSeek, Kimi, etc.) and Azure OpenAI by setting environment variables.
You can config following environment variables to use different LLM service:
OPENAI_API_BASE
: OpenAI API or other compatible API base URLOPENAI_API_KEY
: OpenAI API keyOPENAI_API_VERSION
: OpenAI API versionAZURE_OPENAI_ENDPOINT
: Use Azure OpenAI endpoint instead of standard OpenAI
Model name can be set by command line argument --chat_model
and --embedding_model
.
Currently only support .epub
format. Output format is a .json file as WordDumb style. You can import this file manualy via Calibre. First select the book and click "Open book Folder". Then create/replace worddumb-custom-x-ray.json
with the generated json file.
Generating X-Ray DB file is in progress.
pip install -e '.[dev]'
make format