Need help with calibredb.el?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

chenyanming
163 Stars 10 Forks GNU General Public License v3.0 391 Commits 9 Opened issues

Description

Emacs calibre client - An Ebook Management Solution in Emacs.

Services available

!
?

Need anything else?

Contributors list

+TITLE: [[https://github.com/chenyanming/calibredb.el][calibredb.el]]

+DATE: Aug 9, 2020

+SINCE:

+STARTUP: inlineimages nofold

+EXPORTFILENAME: index.html

+HTMLHEAD: <link rel="stylesheet" type="text/css" href="https://fniessen.github.io/org-html-themes/src/readtheorgtheme/css/htmlize.css"/>

+HTMLHEAD: <link rel="stylesheet" type="text/css" href="https://fniessen.github.io/org-html-themes/src/readtheorgtheme/css/readtheorg.css"/>

+HTML_HEAD:

+HTML_HEAD:

+HTML_HEAD:

+HTMLHEAD: <script type="text/javascript" src="https://fniessen.github.io/org-html-themes/src/readtheorgtheme/js/readtheorg.js">

[[https://melpa.org/#/calibredb][file:https://melpa.org/packages/calibredb-badge.svg]]

  • Table of Contents :TOC_1:noexport:
  • [[#description][Description]]
  • [[#installation][Installation]]
  • [[#configuration][Configuration]]
  • [[#workflows][Workflows]]
  • [[#qa][Q&A]]
  • [[#supported-features][Supported Features]]
  • [[#logs][Logs]]

  • Description Yet another [[https://calibre-ebook.com/][calibre]] client for emacs.

+attr_org: :width 600px

[[file:img/dashboard.jpg]]

This package integrates calibre (using calibredb) into emacs.

  1. Powerful ebook dashboard.
  2. Manage ebooks, actually not only ebooks!
  3. Fetch metadata from online sources incl. automatic detection of ISBN for pdf and djvu files (automatic detection of ISBN requires pdf-tools and djvu package for pdf and djvu files respectively)
  4. Manage Ebooks' libraries and virtual libraries.
  5. Customized Metadata: Tag, comment, highlight, favorite, archive etc.
  6. Quick search, filter, make actions on items with ivy and helm.
  7. Org-ref support.

** Related package - toc-mode (easily manage pdf/djvu document's Table Of Contents) - centaur-tabs/awesome-tab (Enable tab in emacs, turn eamcs into a modern multiple tabs pdf/epub reader.)

  • Installation

** Install sqlite and calibre

*** macOS

+BEGIN_SRC sh

brew install sqlite

+END_SRC

Download calibre's DMG file from https://calibre-ebook.com/download_osx, install calibre.app to /Applications

*** Windows With chocolatey

+BEGIN_SRC sh

choco install sqlite calibre

+END_SRC

*** Linux For example, in Ubuntu 18.04:

+BEGIN_SRC sh

sudo apt install sqlite3 calibre

+END_SRC

** Install calibredb.el It's available on [[https://melpa.org/][Melpa]] :

+BEGIN_SRC emacs-lisp

M-x package-install calibredb

+END_SRC

** Spacemacs Layer

For Spacemacs [[https://github.com/dalanicolai/calibre-layer][this calibre-layer]] implements calibre.el with evilified keybindings

  • Configuration

** Quick Start *** require

+BEGIN_SRC emacs-lisp

(require 'calibredb) (setq calibredb-root-dir "~/OneDrive/Doc/Calibre") (setq calibredb-db-dir (expand-file-name "metadata.db" calibredb-root-dir)) (setq calibredb-library-alist '(("~/OneDrive/Doc/Calibre") ("/Users/damonchan/Documents/Books Library") ("/Users/damonchan/Documents/HELLO") ("/Users/damonchan/Documents/Books") ("/Users/damonchan/Documents/World")))

+END_SRC

PS: If ~sqlite3~ and ~calibredb~ is in not in your system path, set them with

+BEGIN_SRC emacs-lisp

(setq sql-sqlite-program "/usr/bin/sqlite3") (setq calibredb-program "/Applications/calibre.app/Contents/MacOS/calibredb")

+END_SRC

*** use-package

+BEGIN_SRC emacs-lisp

(use-package calibredb :defer t :config (setq calibredb-root-dir "~/OneDrive/Org/Doc/Calibre") (setq calibredb-db-dir (expand-file-name "metadata.db" calibredb-root-dir)) (setq calibredb-library-alist '(("~/OneDrive/Org/Doc/Calibre") ("~/Documents/Books Library") ("~/Documents/LIB1") ("/Volumes/ShareDrive/Documents/Library/"))))

+END_SRC

** Virtual Libraries Virtual libraries are some convenient shortcuts for quick filtering the Ebooks by setting the ~calibredb-search-filter~.

+BEGIN_SRC emacs-lisp

(setq calibredb-virtual-library-alist '(("1. Development - work" . "work \(pdf\|epub\)") ("2. Read it later" . "Readit epub") ("3. Development - rust" . "rust")))

+END_SRC

** Column width You can configure the column width:

For example:

+BEGIN_SRC emacs-lisp

(setq calibredb-id-width 4)

+END_SRC

  • Set positive to limit the width.
  • Set 0 to hide.
  • Set -1 to keep original length.

The following columns are supported: - =calibredb-id-width= - =calibredb-format-width= - =calibredb-tag-width= - =calibredb-title-width= - =calibredb-author-width= - =calibredb-comment-width=

Then in =calibredb-search= buffer, press =r= to refresh the library.

** Size indicator Enable size indicator:

+BEGIN_SRC emacs-lisp

(setq calibredb-size-show t)

+END_SRC

Then in =calibredb-search= buffer, press =r= to refresh the library.

** File format icons You can choose [[https://github.com/domtronn/all-the-icons.el][all-the-icons]], [[https://github.com/seagle0128/icons-in-terminal.el][icons-in-terminal]], unicode icons to render the icons. You have to install the icons packages by yourself, otherwise it would not work.

To enable all-the-icons:

+BEGIN_SRC emacs-lisp

(setq calibredb-format-all-the-icons t)

+END_SRC

To enable icons-in-terminal:

+BEGIN_SRC emacs-lisp

(setq calibredb-format-icons-in-terminal t)

+END_SRC

To use unicode icons,

+BEGIN_SRC emacs-lisp

(setq calibredb-format-character-icons t)

+END_SRC

Then in =calibredb-search= buffer, press =r= to refresh the library.

Notice: Do not enable icons on big libraries, it will consume a lot of time than you imagine.

TODO: Auto disable format icons when dealing with big libraries.

** Configure to support org-ref You can output a BibTex file which can be used in org-ref.

+BEGIN_SRC emacs-lisp

(require 'org-ref) (setq calibredb-ref-default-bibliography (concat (file-name-as-directory calibredb-root-dir) "catalog.bib")) (add-to-list 'org-ref-default-bibliography calibredb-ref-default-bibliography) (setq org-ref-get-pdf-filename-function 'org-ref-get-mendeley-filename)

+END_SRC

** keybindings

+BEGIN_SRC emacs-lisp

(defvar calibredb-show-mode-map (let ((map (make-sparse-keymap))) (define-key map "?" #'calibredb-entry-dispatch) (define-key map "o" #'calibredb-find-file) (define-key map "O" #'calibredb-find-file-other-frame) (define-key map "V" #'calibredb-open-file-with-default-tool) (define-key map "s" #'calibredb-set-metadata-dispatch) (define-key map "e" #'calibredb-export-dispatch) (define-key map "q" #'calibredb-entry-quit) (define-key map "y" #'calibredb-yank-dispatch) (define-key map "," #'calibredb-quick-look) (define-key map "." #'calibredb-open-dired) (define-key map "\M-/" #'calibredb-rga) (define-key map "\M-t" #'calibredb-set-metadata--tags) (define-key map "\M-a" #'calibredb-set-metadata--author_sort) (define-key map "\M-A" #'calibredb-set-metadata--authors) (define-key map "\M-T" #'calibredb-set-metadata--title) (define-key map "\M-c" #'calibredb-set-metadata--comments) map) "Keymap for `calibredb-show-mode'.")

(defvar calibredb-search-mode-map (let ((map (make-sparse-keymap))) (define-key map [mouse-3] #'calibredb-search-mouse) (define-key map (kbd "") #'calibredb-find-file) (define-key map "?" #'calibredb-dispatch) (define-key map "a" #'calibredb-add) (define-key map "A" #'calibredb-add-dir) (define-key map "c" #'calibredb-clone) (define-key map "d" #'calibredb-remove) (define-key map "D" #'calibredb-remove-marked-items) (define-key map "j" #'calibredb-next-entry) (define-key map "k" #'calibredb-previous-entry) (define-key map "l" #'calibredb-virtual-library-list) (define-key map "L" #'calibredb-library-list) (define-key map "n" #'calibredb-virtual-library-next) (define-key map "N" #'calibredb-library-next) (define-key map "p" #'calibredb-virtual-library-previous) (define-key map "P" #'calibredb-library-previous) (define-key map "s" #'calibredb-set-metadata-dispatch) (define-key map "S" #'calibredb-switch-library) (define-key map "o" #'calibredb-find-file) (define-key map "O" #'calibredb-find-file-other-frame) (define-key map "v" #'calibredb-view) (define-key map "V" #'calibredb-open-file-with-default-tool) (define-key map "," #'calibredb-quick-look) (define-key map "." #'calibredb-open-dired) (define-key map "y" #'calibredb-yank-dispatch) (define-key map "b" #'calibredb-catalog-bib-dispatch) (define-key map "e" #'calibredb-export-dispatch) (define-key map "r" #'calibredb-search-refresh-and-clear-filter) (define-key map "R" #'calibredb-search-clear-filter) (define-key map "q" #'calibredb-search-quit) (define-key map "m" #'calibredb-mark-and-forward) (define-key map "f" #'calibredb-toggle-favorite-at-point) (define-key map "x" #'calibredb-toggle-archive-at-point) (define-key map "h" #'calibredb-toggle-highlight-at-point) (define-key map "u" #'calibredb-unmark-and-forward) (define-key map "i" #'calibredb-edit-annotation) (define-key map (kbd "") #'calibredb-unmark-and-backward) (define-key map (kbd "") #'calibredb-toggle-view) (define-key map (kbd "TAB") #'calibredb-toggle-view-at-point) (define-key map "\M-n" #'calibredb-show-next-entry) (define-key map "\M-p" #'calibredb-show-previous-entry) (define-key map "/" #'calibredb-search-live-filter) (define-key map "\M-t" #'calibredb-set-metadata--tags) (define-key map "\M-a" #'calibredb-set-metadata--author_sort) (define-key map "\M-A" #'calibredb-set-metadata--authors) (define-key map "\M-T" #'calibredb-set-metadata--title) (define-key map "\M-c" #'calibredb-set-metadata--comments) map) "Keymap for `calibredb-search-mode'.")

+END_SRC

PS: Keybindings might be changed in future versions.

  • Workflows There are three ways to manage your ebooks: ** Start with =calibredb= First, =M-x calibredb= to enter ebook dashboard. You can perform the following actions:
    • Open/View the ebook
    • Open Dired the ebook located
    • Fetch (from Google and Amazon.com) and set metadata on the ebook under cursor
    • Set metadata on marked ebooks
    • Add/Remove ebooks on current library
    • Export the ebook under cursor
    • Clone/Switch/Jump to different libraries
    • Live filter the results
    • Generate Catalog, such as a BibTex file
    • Favorite, highlight and archive the items

** Start with =calibredb-find-helm= or =calibredb-find-counsel= - =M-x calibredb-find-helm= or =calibredb-find-counsel= to enter the ebook list - =C-i= (Helm) =C-o= (Counsel) to enter the action menus. ** Start with =calibredb-list= - =M-x calibredb-list= to enter ebook dashboard (buffer =calibredb-list=)

PS: Workflows might be slightly changed in future versions.

Notice: This package use [[https://manual.calibre-ebook.com/generated/en/calibredb.html][calibredb]] update the metadata.db file rather than use sqlite to update the database. Sqlite is only used for reading rather than updating and deleting. It should be safe to modify the database with this package, but it is still very important to do backup by yourself. For example, with cloud services.

  • Q&A The keybindings mentioned below are referenced from #+html: keybindings.

** Transient commands ~calibredb~ supports ~Transient commands~ just like ~magit~. Most of the features are binded in ~Transient commands~. You can press ~?~ to checkout.

  • ~calibredb-dispatch~: Invoke a calibredb command from a list of available commands in ~calibredb-search~ buffer.
  • ~calibredb-entry-dispatch~: Invoke a calibredb command from a list of available commands in ~calibredb-entry~ buffer.
  • ~calibredb-set-metadata-dispatch~: Set metadata.
  • ~calibredb-export-dispatch~: Export files.
  • ~calibredb-catalog-bib-dispatch~: BibTex operation.
  • ~calibredb-yank-dispatch~: Invoke a Yank operation.

** What is my working library? =M-x calibredb=, your current library path shows in the header in buffer =calibredb-search= Besides, variable =calibredb-root-dir= also saves the current library location.

** How to open an ebook? 1. =M-x calibredb= - In =calibredb-search= buffer, move the cursor to the ebook you want to open. - Press =RET/o/O/V= to open it. - If you are using macOS, you can also press =,= to quick look the ebook.

  1. =M-x= =calibredb-find-helm= or =calibredb-find-counsel=

    • Select the ebook you want to open in the list
    • Press =RET= to open it.
  2. =M-x calibredb=

    • In =calibredb-search= buffer, move the cursor to the ebook and press =v= to show details, or just =Right Click= on the ebook.
    • Then in =calibredb-entry= buffer, press =o/O/V= to open it.

** How to add ebooks? 1. =M-x calibredb-add=, select, mark ebooks (only ivy supports mark/unmark currently - with =ivy-hydra=, in ivy-window, press =m= to mark, =DEL= or =u= to unmark. Other engines can only select one item) and add to current library.

  1. =M-x calibredb-add-dir= and select one directory, all supported formats will be added into current library.

Please notice: Add books may fail! There are some reasons: - The book already exists in the database. If you still want to add the duplicated books, you can set ~calibredb-add-duplicate~ to ~Non-Nil~. - Not all book formats are supported. If you can not add a specific book, check the logs in ~calibredb~ buffer.

** How to remove ebooks? 1. =M-x calibredb= - move the cursor to the ebook you want to delete, press =d=, calibredb will ask you to delete or not.

  1. =M-x= =calibredb-find-helm= or =calibredb-find-counsel=
    • Select the ebook you want to delete in the list
    • =C-i= (Helm) =C-o= (Counsel) to enter the action menu.
    • Perform remove action as shown in the menu.

PS: If you want to delete in bulk with marked items, use ~calibredb-remove-marked-items~. ~m~ to mark items, ~D~ to bulk delete.

** How to switch virtual libraries? First, set =calibredb-library-alist= to include the calibre virtual libraries.

+BEGIN_SRC emacs-lisp

(setq calibredb-virtual-library-alist '(("1. Development - work" . "work \(pdf\|epub\)") ("2. Read it later" . "Readit epub") ("3. Development - rust" . "rust")))

+END_SRC

Then, in =calibredb-search= buffer, - Press =l= to open the library list and select the library. - Press =n= or =p= to switch to next or previous library.

Or, in =calibredb-search= buffer, call =calibredb-virtual-library-list= directly and select the library.

** How to switch libraries? Set =calibredb-library-alist= to include the calibre libraries.

Make sure the libraries are valid. Create libraries using Calibre GUI or ~M-x calibredb-clone~ to clone the existing library to a new library, before setting it in ~calibredb-library-alist~.

+BEGIN_SRC emacs-lisp

(setq calibredb-library-alist '(("~/OneDrive/Doc/Calibre") ("/Users/damonchan/Documents/Books Library") ("/Users/damonchan/Documents/HELLO") ("/Users/damonchan/Documents/Books") ("/Users/damonchan/Documents/World")))

+END_SRC

Then, in =calibredb-search= buffer, - Press =L= to open the library list and select the library. - Press =N= or =P= to switch to next or previous library.

Or in =calibredb-search= buffer, call =calibredb-library-list= directly and select the library.

If the library is not defined in =calibredb-library-alist=, you can call =calibredb-switch-library= and select the path of the library that you want to switch temporarily.

** How to set metadata on ebooks? - In =calibredb-search= buffer, =m/DEL/u= to mark/unmark backward/unmark forward items, and =s= to set metadata in bulk. If you do not mark any items, actions will be performed on the item under cursor. - In =calibredb-entry= buffer, press =s= to set metadata. - In =calibredb-search= buffer, press =s f= to fetch metadata by author and title or =s i= to fetch by ISBN. For fetching by author and title enter one (or more) full lastnames of the author(s) (or delete redundant input from initial input). For fetching by ISBN enter the ISBN number (usually can be found and copied from on of the first pages of a book). As the title may contain the ISBN it is set as initial input. Wait few second for Emacs to retrieve metadata from the sources. Subsequently use =C-M-n/C-M-p= to select and preview the source to use for adding the metadata to the document. Press =RET= to add selected metadata to source. - In =calibredb-search= buffer, press =s d= to fetch metadata by identifier.

Tips: You can filter the result via ~/~ before setting the metadata.

*** About ~fetch-ebook-metadata~ We are using ~fetch-ebook-metadata~ cli tool to fetch the metadata. However, fetching ebook metadata is a little tricky, especially about the sources configurations. Since the settings on calibre GUI would affect the ~fetch-ebook-metadata~ cli. Follow below steps to setup.

  1. Set up the source settings in Calibre GUI. You are right, you need to configure the settings on GUI first.
    • Preferences -> Preferences -> Sharing/Metadata download
    • Tick 'source' you like to use
    • Set the 'Cover priority'
    • Apply
  2. Specify the list of metadata download plugins to use, this should be the same as the calibre GUI configuration. #+BEGINSRC emacs-lisp (setq calibredb-fetch-metadata-source-list '("Google" "Amazon.com" "Douban Books")) #+ENDSRC

** How to mark favorite/highlight/archive on ebooks? - In =calibredb-search= buffer, =m= to mark the items, =f/h/x= to toggle favorite/highlight/archive status on marked items.

Demo:

+attr_org: :width 600px

[[file:img/favoritehighlightarchive.png]]

** How to do live filtering? - Press ~/~ to start live filtering.

Minibuffer shows ~Filter (live)~, input some texts to start searching (REGEX is supported).

The following columns will be searched: - id - text (comment) - tag - title - format - author_sort - ids

If the keyword occurs in any of the columns above, the matched ebook records will be shown.

Here is the demo: [[file:img/filter.gif]]

If you want to search by one type of metadata, for example, by tag, please check:

+html: How to do group filtering?.

** How to do group filtering? Press ~f~, then press - t: fitler by tag - f: filter by format - a: filter by author - d: filter by date - l: filter by virutal library - L: filter by library - r: reset (clearing the search filter)

For example, after pressing ~f t~ then select any tags, group filter for tag is enabled. In this case, minibuffer shows ~Filter (tag)~, if you press ~/~, it only search in tag.

If you press ~g r~ or ~f r~, you can switch back to live filtering, and minibuffer will show ~Filter (live)~.

** How to do quick group filtering? - Click the =calibredb-favorite-icon=, authors, file format, and tags. - Press =r/R= to reset the filtering.

Demo:

[[file:img/quick_filter.gif]]

** How to do sorting? Press ~o~, then press - o: toggle the order (desc or asc) - i: sort by id - t: sort by title - f: sort by format - a: sort by author - d: sort by date - p: sort by pubdate - T: sort by Tag - s: sort by size - l: sort by language

** How to interact with org-ref? - Setup org-ref #+BEGINSRC emacs-lisp (require 'org-ref) (setq calibredb-ref-default-bibliography "~/Desktop/catalog.bib") (add-to-list 'org-ref-default-bibliography calibredb-ref-default-bibliography) (setq org-ref-get-pdf-filename-function 'org-ref-get-mendeley-filename) #+ENDSRC or #+BEGINSRC emacs-lisp (use-package! org-ref :after-call calibredb :config (setq calibredb-ref-default-bibliography "~/Desktop/catalog.bib") (add-to-list 'org-ref-default-bibliography calibredb-ref-default-bibliography) (setq org-ref-get-pdf-filename-function 'org-ref-get-mendeley-filename)) #+ENDSRC

  • In =calibredb-search= buffer, =b= =b= to generate the ebook catalogs with a BibTex file.
  • The BibTex file is generated under current library path - =calibredb-root-dir=.
  • Every time you switch your library, the corresponding BibTex file path will added into =org-ref-default-bibliography= temporarily.
  • In an org file, =C-c ]= to insert cite.

Demo: [[file:img/bib.gif]]

** Why the loading time is so long? For some big libraries, such as the libraries that has 10000+ books, the package will need a few seconds to query and decode all the metadata. This will be improved in future versions.

You should know the following test results and behaviors so that it will not frustrate you when dealing with big libraries:)

  1. Tested with a library that has 8668 books, using 4.2 GHz Intel Core i7 in macOS 10.13.6, around =2= to =3= seconds to query the database.
  2. DO NOT setq =calibredb-format-icon= t on big library. Tested with a library that has 8668 books, using 4.2 GHz Intel Core i7 in macOS 10.13.6, around =37= seconds to query the database.
  3. The first time to enter =calibredb=, is to query and decode the whole database. After that, all data will be saved in =calibredb-search-entries=. Therefore, the next time to load the library is just reading =calibredb-search-entries= and show again. And you can feel much happier starting from the second time.
  4. Update metadata, refresh dashboard, and switch library will re-query and decode the whole database.

** Can not remember the keybindings? Press ~?~, it will show you almost all actions.

Demo:

+attr_org: :width 600px

[[file:img/details.gif]]

** How to edit annotation with org-mode? In =calibredb-search= buffer,

+BEGIN_SRC emacs-lisp

M-x calibredb-edit-annotation

+END_SRC

Or press ~i~.

By default, the annotation would be saved to =comments= field. If you want to change to other filed, please set with the following statement:

+BEGIN_SRC emacs-lisp

(setq calibredb-annotation-field "comments")

+END_SRC

Please notice: Due to the limitation of calibredb, the blank new lines will be deleted.

** How to search in ebooks directly? We wrap ~counsel-ag~ in ~calibredb-rga~, using the power of [[https://github.com/phiresky/ripgrep-all][ripgrep-all]]. First, install [[https://github.com/phiresky/ripgrep-all][ripgrep-all]], then in =calibredb-search=, =calibredb-entry= buffer or under =pdf-view-mode= / =nov-view-mode=,

+BEGIN_SRC emacs-lisp

M-x calibredb-rga

+END_SRC

** How to interact with calibredb files in org files? In ~calibredb-search~ buffer, - ~y y~ copy as calibredb link. If you click the link, it will open the corresponding ~calibredb-entry~ buffer. - ~y f~ copy as file org link. If you click the link, it will open the file directly.

** More examples? Please check

+html: keybindings .

All are self documented.

  • Supported Features

For more details on the actions, check the official calibre documents: https://manual.calibre-ebook.com/generated/en/calibredb.html

** calibredb Enter calibre emacs client, a new buffer called =calibredb-search= with =calibredb-search-mode=

+BEGIN_SRC emacs-lisp

M-x calibredb

+END_SRC

=RET= open the entry

To toggle between detail view or compact view.

+BEGIN_SRC emacs-lisp

M-x calibredb-toggle-view

+END_SRC

TODO: - Multiple dashboard with different libraries. - Sorting.

** calibredb-search-live-filter In =calibredb-search=, perform live filtering:

+BEGIN_SRC emacs-lisp

M-x calibredb-search-live-filter

+END_SRC

The following columns will be searched: - id - text (comment) - tag - title - format - author_sort - ids

If the keyword occurs in any of the columns above, the matched ebook record will be shown.

  1. Live filter searches the results in =calibredb-full-entries= rather than query the database.
  2. Keywords are separated by "Spaces" (AND operation, mainly used to narrow down the results, the more spaces you insert, the fewer results.)
  3. Each keyword supports REGEX.

For example, to search Ebooks may contain a tag - work, and the format maybe pdf or epub. You can insert ~work (pdf|epub)~ (Notice the single backslash) in mini buffer.

If you set the filter keywords in ~calibredb-virtual-library-alist~, you should (Notice the double backslashes):

+BEGIN_SRC emacs-lisp

(setq calibredb-virtual-library-alist '(("1. Development - work" . "work \(pdf\|epub\)") ("2. Read it later" . "Readit epub") ("3. Development - rust" . "rust")))

+END_SRC

Check REGEX https://www.gnu.org/software/emacs/manual/html_node/efaq/Using-regular-expressions.html.

Tip: =calibredb-search=, =calibredb-find-counsel=, and =calibredb-find-helm= are sharing the same results. Therefore, after the filtering in =calibredb-search=, you can do second-level filter with =calibredb-find-counsel=, and =calibredb-find-helm=.

** calibredb-find-helm Use helm to list all ebooks

+BEGIN_SRC emacs-lisp

M-x calibredb-find-helm

+END_SRC

** calibredb-find-counsel Use counsel to list all ebooks

+BEGIN_SRC emacs-lisp

M-x calibredb-find-counsel

+END_SRC

** calibredb-list Generate an org buffer which contains all files' cover images, titles and the file links.

+BEGIN_SRC emacs-lisp

M-x calibredb-list

+END_SRC

** calibredb-clone Create a clone of the current library. This creates a new, empty library that has all the same custom columns, Virtual libraries and other settings as the current library.

+BEGIN_SRC emacs-lisp

M-x calibredb-clone

+END_SRC

Tips: Libraries can be used for any purposes, one for books, one for lecture notes, one for research references etc.

** calibredb-library-list Switch library from library list defined in =calibredb-library-alist=. If under =calibredb-search= buffer, it will auto refresh after selecting the new item.

+BEGIN_SRC emacs-lisp

M-x calibredb-library-list

+END_SRC

** calibredb-switch-library Switch a library temporary by selecting a path.

+BEGIN_SRC emacs-lisp

M-x calibredb-switch-library

+END_SRC

** Show details This action will get you to the book details buffer called =calibredb-entry=

** Dispatch *** calibredb-dispatch Under =calilbredb-search= or =calilbredb-entry= buffer, you can make actions on selected item with =calibredb-dispatch=, just like =magit-dispatch=.

+BEGIN_SRC emacs-lisp

M-x calibredb-dispatch

+END_SRC

Or fire with keybinding ~?~

*** calibredb-set-metadata-dispatch

+BEGIN_SRC emacs-lisp

M-x calibredb-set-metadata-dispatch

+END_SRC

Or fire with keybinding ~s~

*** calibredb-catalog-bib-dispatch

+BEGIN_SRC emacs-lisp

M-x calibredb-catalog-bib-dispatch

+END_SRC

Or fire with keybinding ~b~

*** calibredb-export-dispatch

+BEGIN_SRC emacs-lisp

M-x calibredb-export-dispatch

+END_SRC

Or fire with keybinding ~e~

** add To add a file into calibre, call

+BEGIN_SRC emacs-lisp

M-x calibredb-add

+END_SRC

To add a directory into calibre, call

+BEGIN_SRC emacs-lisp

M-x calibredb-add-dir

+END_SRC

** remove

To remove an item, call

+BEGIN_SRC emacs-lisp

M-x calibredb-remove

+END_SRC

To remove the marked items, call

+BEGIN_SRC emacs-lisp

M-x calibredb-remove-marked-items

+END_SRC

** set_metadata To set metadata,

+BEGIN_SRC emacs-lisp

M-x calibredb-set-metadata-dispatch

+END_SRC

** Export To export the ebook,

+BEGIN_SRC emacs-lisp

M-x calibredb-export-dispatch

+END_SRC

** Yank To yank the ebook as org links,

+BEGIN_SRC emacs-lisp

M-x calibredb-yank-dispatch

+END_SRC

** Catalog *** BibTex Export the ebook catalogs to a BibTex file.

+BEGIN_SRC emacs-lisp

M-x calibredb-catalog-bib-dispatch

+END_SRC

PS: Document can be found in https://github.com/kovidgoyal/calibre/blob/master/src/calibre/library/catalogs/bibtex.py

** calibredb-rga Search in ebooks.

  • Logs ** =2021-06-02= Version 2.10.0:
  • Change keybind for ~calibredb-toggle-favorite-at-point~ to ~*~ (original ~f~)
  • Add ~calibredb-filter-dispatch~, bind to ~f~
  • Add ~calibredb-sort-dispatch~, bind to ~o~
  • Mouse click on format/tags/author is enabled for group filtering
  • Improve the following functions:
    • ~calibredb-unmark-and-backward~
    • ~calibredb-add~
    • ~calibredb-remove~
    • ~calibredb-open-with-default-tool~
  • Add ~calibredb-format-character-icons~

** =2021-03-21= Version 2.9.0: - Now, it is able to set metadata asynchronously. - Add ~calibredb-org-link-setup~ to support org-link: ~calibredb:~, copy the marked items as org link with ~y y~ or ~y f~. - Improve exit functions on ~calibredb-search~ and ~calibredb-entry~ buffers. - Add universal prefix support for ~calibredb-open-file-with-default-tool~, #+beginsrc emacs-lisp C-u M-x calibredb-open-file-with-default-tool #+endsrc will open the folder where the file located.

** =2020-12-25= Merry Christmas! I am happy to release 2.8.0 - Add ~calibredb-add-duplicate~, if you want to add the duplicated files, set it to ~non-Nil~. - Add ~calibredb-quick-look~, in macOS, press =,= to Quick look the item. - Add ~calibredb-yank-dispatch~, you can copy the marked items with pressing ~y y~ as org links now. - Add "Fetch and set metadata by identifier", with keys ~s d~: ~calibredb-fetch-and-set-metadata-by-id~. Thanks [[https://github.com/tpeacock19][tpeacock19]]! - Minor improvement on ISBN auto detection. Thanks [[https://github.com/dalanicolai][dalanicolai]] tremendous help on auto fetching metadata feature! - Fix #23: Choosing the location where the bib file will be stored

** =2020-10-12= Version 2.7.0: - Add feature: Virtual Library - Add configuration: =calibredb-virtual-library-alist= - Adjust keybindings: #+BEGINSRC emacs-lisp (define-key map "l" #'calibredb-virtual-library-list) (define-key map "L" #'calibredb-library-list) ; previous l (define-key map "n" #'calibredb-virtual-library-next) (define-key map "N" #'calibredb-library-next) ; previous n (define-key map "p" #'calibredb-virtual-library-previous) (define-key map "P" #'calibredb-library-previous) ; previous p (define-key map "R" #'calibredb-search-clear-filter) #+ENDSRC

** =2020-08-29= Version 2.6.0: - Add fields: ids, publisher, series and lang_code. - Add: =calibredb-rga=. - Add: =calibredb-remove-marked-items=. - Improve live filter: support space-separated multiple keywords. - Add configuration: =calibredb-show-results= - Add configuration: =calibredb-entry-render-comments=

** =2020-08-09= Version 2.5.0: - Add: =calibredb-fetch-and-set-metadata-by-author-and-title= and =calibredb-fetch-and-set-metadata-by-isbn= (thanks to Daniel Nicolai)

** =2020-07-16= Version 2.4.1: - Add: =calibredb-add-format= and =cliabredb-remove-format=

** =2020-07-01= Version 2.4.0: - Add: =calibredb-toggle-view= - Split to multiple source files

** =2020-06-22= Version 2.3.2: - Add: =icons-in-terminal= support - Rename =calibredb-format-icons= to =calibredb-format-all-the-icons= - Add =calibredb-format-icons-in-terminal=

** =2020-06-21= Version 2.3.1: - Sort favorite, highlight, and archive items: favorite -> highlight -> rest -> archive - Add: =calibredb-condense-comments=

** =2020-06-11= Version 2.3.0: - New features: =calibredb-edit-annotation=

** =2020-06-07= Version 2.2.0: - New features: favorite, highlight, and archive the items. - Clickable items: tags, authors, and format.

** =2020-06-06= Version 2.1.0: - Improve the performance of live filter when dealing with big libraries.

** =2020-06-05= Version 2.0.0: - Adjust or add keybindings: =RET= =v= =V= ~.~ =M-n= =M-p= to provide better user experience. - Add =calibredb-open-dired= - Upgrade =calibredb-add= to support add marked items in ivy. - Improve user experience

** =2020-06-05= Version 1.9.0: - Add BibTex support: =calibredb-catalog-bib-dispatch=

** =2020-06-04= Version 1.8.0: - Add =calibredb-show-next-entry= and =calibredb-show-previous-entry=. - Add Total, Filter keyword, Marked in =calibredb-search= header. - Improve the =calibredb-show= performance.

** =2020-05-31= Version 1.7.0: - Add =calibredb-search-live-filter= to support live filtering.

** =2020-05-30= Version 1.6.0: - Add mark/unmark features in =calibredb-search= - Upgrade =calibredb-set-metadata-dispatch= and =calibredb-export-dispatch.= - Add =calibredb-library-next= and =calibredb-library-previous= - Improve the library management experience.

** =2020-05-16= Version 1.5.0: - Add keybindings.

** =2020-05-15= Version 1.4.0: - Add customization items, faces and formats for =calibredb-search= and completing list.

** =2020-05-14= Version 1.3.0: - =calibredb-clone= - =calibrede-switch-library= - =calibrede-library-list=

** =2020-05-13= Version 1.2.0: - =calibredb-export= - =calibredb=

** =2020-05-10= Version 1.1.0: - =calibredb-dispatch=

** =2020-05-09= Version 1.0.0: - =calibredb-find-helm= - =calibredb-find-counsel= - =calibredb-list=

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.