Install
openclaw skills install calibre-ebooksQuery and operate the local Calibre library using calibredb and metadata.db. Use when the user asks to list, search, locate, summarize metadata, find available formats, export, or prepare books/e-books/PDFs/EPUBs from the Calibre library for reading, analysis, or RAG.
openclaw skills install calibre-ebooksUse this skill to work with the local Calibre library and a semantic RAG base derived from the books.
/mnt/Backup_2/Biblioteca/mnt/Backup_2/Biblioteca/metadata.dbcalibredbscripts/calibre_query.pyscripts/document_semantic_rag.py/tmp/openclaw-calibre-rag/data/tmp/openclaw-calibre-rag/convertedscalibredb, not the .db file:calibredb list --library-path "/mnt/Backup_2/Biblioteca"
If calibredb fails due to sandbox, mutex, or Calibre configuration, request elevated permission to repeat the query. For read-only queries, use scripts/calibre_query.py as a SQLite fallback.
list, search, show_metadata, or scripts/calibre_query.py.id before exporting, changing metadata, adding, or removing anything./tmp/openclaw-calibre-export when the user requests file access.id with document_semantic_rag.py, then search with --search.remove, remove_format, set_metadata, set_custom, restore_database) without explicit request.List books:
calibredb list --library-path "/mnt/Backup_2/Biblioteca" --fields id,title,authors,formats --limit 20
Search by term:
calibredb search --library-path "/mnt/Backup_2/Biblioteca" "python"
View complete metadata of a book:
calibredb show_metadata --library-path "/mnt/Backup_2/Biblioteca" 123
Export a book to a temporary directory:
mkdir -p /tmp/openclaw-calibre-export
calibredb export --library-path "/mnt/Backup_2/Biblioteca" --to-dir /tmp/openclaw-calibre-export 123
Use full-text search if the index exists:
calibredb fts_search --library-path "/mnt/Backup_2/Biblioteca" "searched term"
Use the script when you only need to query metadata.db without depending on the Calibre process:
python3 skills/calibre-ebooks/scripts/calibre_query.py list --limit 20
python3 skills/calibre-ebooks/scripts/calibre_query.py search "python" --limit 10
python3 skills/calibre-ebooks/scripts/calibre_query.py metadata 123
python3 skills/calibre-ebooks/scripts/calibre_query.py path 123 --format PDF
The script returns JSON by default and does not write to the library.
Before converting or searching semantically, check dependencies:
python3 skills/calibre-ebooks/scripts/document_semantic_rag.py --check --json
If Python dependencies are missing, install the RAG set:
pip install -r skills/calibre-ebooks/scripts/requirements-rag.txt
Index a book directly by Calibre ID:
python3 skills/calibre-ebooks/scripts/document_semantic_rag.py --calibre-id 123 --format PDF --json
Index an exported or resolved file:
python3 skills/calibre-ebooks/scripts/document_semantic_rag.py --convert "/path/book.pdf" --json
Index all supported documents in a folder:
python3 skills/calibre-ebooks/scripts/document_semantic_rag.py --convert-all "/path/folder"
Search in the RAG base:
python3 skills/calibre-ebooks/scripts/document_semantic_rag.py --search "convolutional neural networks" --json
List or check base status:
python3 skills/calibre-ebooks/scripts/document_semantic_rag.py --list --json
python3 skills/calibre-ebooks/scripts/document_semantic_rag.py --status --json
Removing a book from the RAG base requires the internal ID returned during indexing/listing, not the Calibre ID:
python3 skills/calibre-ebooks/scripts/document_semantic_rag.py --delete RAG_BOOK_ID --json
OLLAMA_MODEL, skill default: nomic-embed-text-v2-moe).The script reads skills/calibre-ebooks/.env and accepts CLI override:
python3 skills/calibre-ebooks/scripts/document_semantic_rag.py --status --data-dir /tmp/my-base --converted-dir /tmp/my-markdowns
python3 skills/calibre-ebooks/scripts/document_semantic_rag.py --search "term" --embedding-model nomic-embed-text-v2-moe
If a base was already created with another embedding model, use the same previous model. Only use --allow-model-mismatch when accepting potentially incorrect results.
id, title, authors, and formats when there are multiple results.calibre_query.py, confirm available format, then use document_semantic_rag.py --calibre-id.--check points to missing dependencies, inform exactly which ones are missing before attempting to index.