book_whisperer
A book whisperer for you to recommend what to read from a Calibre DB
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (10.4%) to scientific vocabulary
Repository
A book whisperer for you to recommend what to read from a Calibre DB
Basic Info
- Host: GitHub
- Owner: stratosphereips
- License: gpl-2.0
- Language: Python
- Default Branch: main
- Size: 0 Bytes
Statistics
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
📚 Calibre Book Recommender
Welcome to Calibre Book Recommender, a command-line tool that fetches your Calibre library catalog and suggests what to read next using various methods like TF-IDF, fuzzy matching, or query-based similarity, and can return multiple recommendations at once.
🎯 Purpose
- Automatically recommend daily reading from your Calibre library 📖
- Avoid recommending the same book twice until every book has been suggested 🔄
- Support thematic searches (e.g.,
-r fantasy) and fuzzy title matching 🧙♂️ - Return top X recommendations in one go 📋
- Lightweight: pure Python, SQLite for caching, no heavy dependencies by default 🐍
🚀 Features
- TF-IDF-based content similarity (default) 📝
- Fuzzy title matching using FuzzyWuzzy 🔍
- Query-based TF-IDF similarity for custom search strings ✏️
- Return top X recommendations with
-x📊 - Local SQLite cache of book metadata and history 🗄️
- Rich console output with Rich tables 🌈
- CLI flags for listing, recommending, clearing history, and debugging ⚙️
👽👽👽 Contributors
🛠️ Installation
- Clone this repo:
bash git clone git@github.com:stratosphereips/book_whisperer.git cd book_whisperer - Create and activate a virtual environment:
bash python3 -m venv venv source venv/bin/activate - Install dependencies:
bash pip install -r requirements.txt - Create a
.envin the project root with your Calibre server info and (optionally) OpenAI key: ```dotenv CALIBREURL=http://xx.xx.xx.xx:8081 CALIBREUSER=youruser CALIBREPASS=your_pass
# OPENAIAPIKEY=sk-... (if using OpenAI method) ```
🎛️ Usage
```bash
List all books
./book_wisperer.py -l
Recommend 1 book (TF-IDF default)
./book_wisperer.py
Recommend 3 books using TF-IDF
./book_wisperer.py -x 3
Recommend a book with a search term
./book_wisperer.py -r mystery
Recommend top 2 for 'fantasy'
./book_wisperer.py -r fantasy -x 2
Use fuzzy title-matching
./book_wisperer.py -m fuzzy -r 'python'
Use query-based TF-IDF explicitly
./book_wisperer.py -m query -r 'deep learning'
Debug mode: show internal logs
./book_wisperer.py -d
Clear recommendation history
./book_wisperer.py -c ```
📖 Parameters
| Flag | Alias | Description |
|---------------------|--------------|-----------------------------------------------------------------------------------------------|
| -l, --list | N/A | List all books in a formatted table |
| -r, --recommend | N/A | Recommend books; optionally provide a query string |
| -m, --method | N/A | Choose method: tfidf (default), fuzzy, or query |
| -x, --top | N/A | Number of top recommendations to return (default: 1) |
| -c, --clear | N/A | Clear all past recommendation history |
| -d, --debug | N/A | Enable debug logging |
💡 Examples
Daily reading recommendation (TF-IDF default): ```bash ./book_wisperer.py
Library contains 659 books.
Top 1 recommendation today:
- The Hobbit by J.R.R. Tolkien 🧝♂️
```
Top 5 thematic picks: ```bash ./book_wisperer.py -r sci-fi -x 5
Top 5 for 'sci-fi':
- Dune by Frank Herbert 🚀
- Neuromancer by William Gibson 🧠
- Foundation by Isaac Asimov 📚
- Ender's Game by Orson Scott Card 🛰️
- Snow Crash by Neal Stephenson 🏙️
```
Fuzzy title match: ```bash ./book_wisperer.py -m fuzzy -r 'python'
Recommended for 'python':
- Advanced Guide to Python 3 Programming by John Hunt 🐍
```
Clear recommendation history:
bash ./book_wisperer.py -c 🔄 Recommendation history cleared.
🔄 Caching Behavior
- Books metadata: cached locally in
books_cache.db, refreshed only when the library list changes. - Recommendations history: stored to avoid repeats until every book has been suggested.
🎉 Contribute
Feel free to open issues or PRs! Your feedback and enhancements are welcome. ✨
© 2025 eldraco. Built with ❤️ and Python.
Owner
- Name: Stratosphere IPS
- Login: stratosphereips
- Kind: organization
- Location: Prague
- Website: https://www.stratosphereips.org
- Twitter: StratosphereIPS
- Repositories: 25
- Profile: https://github.com/stratosphereips
Cybersecurity Research Laboratory at the Czech Technical University in Prague. Creators of Slips, a free software machine learning-based behavioral IDS/IPS.
Citation (CITATION.cff)
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "YOUR_NAME_HERE"
given-names: "YOUR_NAME_HERE"
email: youremailhere
affiliation: >-
Stratosphere Laboratory, AIC, FEL, Czech
Technical University in Prague
orcid: "https://orcid.org/0000-0000-0000-0000"
- family-names: "Lisa"
given-names: "Mona"
email: youremailhere
affiliation: >-
Stratosphere Laboratory, AIC, FEL, Czech
Technical University in Prague
orcid: "https://orcid.org/0000-0000-0000-0000"
title: "repository-template"
version: 1.0.0
doi: 10.5281/zenodo.1234
date-released: 2022-07-13
url: "https://github.com/stratosphereips/repository-template"
GitHub Events
Total
- Issues event: 2
- Watch event: 1
- Delete event: 1
- Issue comment event: 3
- Push event: 13
- Pull request event: 3
- Create event: 14
Last Year
- Issues event: 2
- Watch event: 1
- Delete event: 1
- Issue comment event: 3
- Push event: 13
- Pull request event: 3
- Create event: 14
Dependencies
- actions/checkout v2 composite
- anothrNick/github-tag-action 1.36.0 composite
- numpy *
- openai *
- python-dotenv *
- requests *
- rich *
- scikit-learn *