Skip to main content

Generate kindle-like x-ray for e-books with LLM

Project description

🔬📖 X-ray GPT

PyPI version Release Building Code style: black

Generate kindle-like X-ray for e-books with LLM

🚀 Usage

pip install xraygpt
python -m xraygpt [epub_file]

🤖 LLM Support

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 URL
  • OPENAI_API_KEY: OpenAI API key
  • OPENAI_API_VERSION: OpenAI API version
  • AZURE_OPENAI_ENDPOINT: Use Azure OpenAI endpoint instead of standard OpenAI

Model name can be set by command line argument --chat_model and --embedding_model.

📚 E-book Support

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.

🧑‍💻 Dev Setup

pip install -e '.[dev]'

🎩 Static analysis

make format

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xraygpt-0.2.7.post0.tar.gz (18.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

xraygpt-0.2.7.post0-py3-none-any.whl (20.5 kB view details)

Uploaded Python 3

File details

Details for the file xraygpt-0.2.7.post0.tar.gz.

File metadata

  • Download URL: xraygpt-0.2.7.post0.tar.gz
  • Upload date:
  • Size: 18.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for xraygpt-0.2.7.post0.tar.gz
Algorithm Hash digest
SHA256 affb943a80e82f12cc569f697e76e56335835d357b381bf5bde5bede7226def8
MD5 3cd1d05207589136ff3d1bff96ee9411
BLAKE2b-256 9c38b4b86a8b8951582c44d88c7d3289c9843ce19ce546071e8b1d7baa6c5c9b

See more details on using hashes here.

File details

Details for the file xraygpt-0.2.7.post0-py3-none-any.whl.

File metadata

  • Download URL: xraygpt-0.2.7.post0-py3-none-any.whl
  • Upload date:
  • Size: 20.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for xraygpt-0.2.7.post0-py3-none-any.whl
Algorithm Hash digest
SHA256 1d4533dba9c6a288d907c2c906b3d6b0be8b5adac319744eff3f5fe664ca0d9b
MD5 3af3618c84a610bedc7cb83b5bf944aa
BLAKE2b-256 76c067337cad82ea82aa0ff3faf860566f5c36681ad116d950fe337de5ab699b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page