Ebook Search 📚
Search and download ebooks from jbiaojerry.github.io/ebook-treasure-chest (24,000+ books).
Quick Start
# Search for books
python3 scripts/ebook-db.py search "武侠"
# Search with category filter
python3 scripts/ebook-db.py search "科幻" --category "科幻"
# Limit results
python3 scripts/ebook-db.py search "python" -l 10
# Update the database cache
python3 scripts/ebook-db.py update
# Show database stats
python3 scripts/ebook-db.py stats
# List all categories
python3 scripts/ebook-db.py categories
How It Works
- Downloads
all-books.jsonfrom the website (~5MB) - Caches locally at
~/.cache/ebook-search/all-books.json - Cache refreshes every 24 hours automatically
- Searches by title, author, and category (case-insensitive, multi-word)
Book Data Structure
Each book has:
title- Book titleauthor- Author namecategory- Genre/category (武侠, 科幻, 文学, etc.)link- Download URL (ctfile.com/城通网盘)formats- Available formats (epub, mobi, azw3)language- Language code (ZH, EN)
Workflow
- Run
searchwith user's query - Present results in a readable format
- When user picks a book, show the download link
- If user wants more results, increase
-llimit or refine keywords
Tips
- Use multiple keywords for better results (e.g., "金庸 武侠")
- Check
categoriesfirst to find the right genre - Run
updateif searches return stale results - The download links are on ctfile.com (城通网盘) - users need to visit them in browser