Skip to main content

Search local Calibre XML export, lookup results online.

Project description

import calibre_search as cali

Accessing specific books and fields

calibre_search loads the .csv Calibre library export file in its main folder on import.

This library is represented by the books object:

cali.books['Dive Into Python']
Dive Into Python   (pdf)   (Python, Programming, Computers)
res = cali.books['Dive Into Python']

[field for field in dir(res) if not "__" in field]           # the Book object fields
['amazon_url',
 'amazon_url_method',
 'author',
 'book_format',
 'description',
 'id_no',
 'identifiers',
 'isbn',
 'language',
 'library_name',
 'lookup_amazon_link',
 'path_to_cover_jpg',
 'pubdate',
 'publisher',
 'rating',
 'series',
 'series_index',
 'size',
 'tags',
 'time_stamp',
 'title',
 'title_sort',
 'uuid']

The Book object fields can be accessed by dot field name:

cali.books['Dive Into Python'].tags
'Python, Programming, Computers'

Searching

General search

You can search any specific field using .search(search_term, field_name):

cali.books.search('spa', 'language')
Ficciones   (Fiction, Classics)
Conceptos de espacio   (Architecture, Spanish, Language, Classics)
Ideas. Historia Intelectual de La Humanidad by ...   (Philosophy, History, Spanish, Language)
Los enemigos del comercio   (Spanish, Language)
Termodinámica   (Physics, Spanish, Language, Textbook, Science)
Microeconomía intermedia   (Economics, Micro, Language, Spanish)
Frame Analysis. Los Marcos De La Experiencia (Spanish Edition)   (Psychology, Social Psychology, Language, Spanish)
A lomos de dragones   (Spanish, Language)
Escupelo

Filtering on title

You can partially match title field using .intitle:

cali.books.intitle('spanish')
Schaum's Outline of Spanish Grammar   (Language, Spanish, Schaums, Science, Teaching Methods & Materials)
A Political History of Spanish: The Making of a Language   (Language, Spanish, History, Politics, To Read)
Frame Analysis. Los Marcos De La Experiencia (Spanish Edition)   (Psychology, Social Psychology, Language, Spanish)
Practice Makes Perfect® Complete Spanish Grammar: Premium: Second Edition
Oxford Spanish Dictionary   (Spanish, Language, Dictionary)

Filtering on tag

You can partially match tags using books.intags:

cali.books.intags('spanish')
Schaum's Outline of Spanish Grammar   (Language, Spanish, Schaums, Science, Teaching Methods & Materials)
Wing-Chun   (Wing Chun, Martial Arts & Self-Defense, Spanish, Language, Grey)
Persuasión   (Negotiation, Spanish, Language)
Conceptos de espacio   (Architecture, Spanish, Language, Classics)
Ideas. Historia Intelectual de La Humanidad by ...   (Philosophy, History, Spanish, Language)
A Political History of Spanish: The Making of a Language   (Language, Spanish, History, Politics, To Read)
Los enemigos del comercio   (Spanish, Language)
Termodinámica   (Physics, Spanish, Language, Textbook, Science)
Microeconomía intermedia   (Economics, Micro, Language, Spanish)
Frame Analysis. Los Marcos De La Experiencia (Spanish Edition)   (Psychology, Social Psychology, Language, Spanish)
A lomos de dragones   (Spanish, Language)
The Reign of Greed   (Philippine fiction (Spanish) -- Translations into English, Nationalists -- Philippines -- Fiction, Philippines -- History -- Fiction)
Oxford Spanish Dictionary   (Spanish, Language, Dictionary)

Chaining filters

The .intitle and .intags filters can be chained:

cali.books.intitle('spanish').intags('psychology')
Frame Analysis. Los Marcos De La Experiencia (Spanish Edition)   (Psychology, Social Psychology, Language, Spanish)

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

calibre search-0.3.7.tar.gz (9.7 kB view details)

Uploaded Source

Built Distribution

calibre_search-0.3.7-py2.py3-none-any.whl (11.4 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file calibre search-0.3.7.tar.gz.

File metadata

  • Download URL: calibre search-0.3.7.tar.gz
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for calibre search-0.3.7.tar.gz
Algorithm Hash digest
SHA256 823143c65a083b4e7e6d3eb6f39ca24a6125d207a7a680988761697c436bf696
MD5 fd7307fa56f1e5f43835ada5b40597d6
BLAKE2b-256 309d121c2eb5275001f47f58af80320b19ec3ad65b3717da90267b5d5498ec72

See more details on using hashes here.

File details

Details for the file calibre_search-0.3.7-py2.py3-none-any.whl.

File metadata

  • Download URL: calibre_search-0.3.7-py2.py3-none-any.whl
  • Upload date:
  • Size: 11.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for calibre_search-0.3.7-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 3ca6cc037530562375d447c5a9a3fa171640c52d594f0a7bb5e9de361343abdc
MD5 dad91491f702520e84d352e346fafbf0
BLAKE2b-256 e7a880752df975399ad90ada5c3b053506241c48d3379778eb4f16bc7dff85c4

See more details on using hashes here.

Supported by

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