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.
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.
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.
- In
M-x
calibredb-find-helm
orcalibredb-find-counsel
- Select the ebook you want to open in the list
- Press
RET
to open it.
M-x calibredb
- In
*calibredb-search*
buffer, move the cursor to the ebook and pressv
to show details, or justRight Click
on the ebook. - Then in
*calibredb-entry*
buffer, presso/O/V
to open it.
- In
M-x calibredb-add
, select, mark ebooks (only ivy supports mark/unmark currently - withivy-hydra
, in ivy-window, pressm
to mark,DEL
oru
to unmark. Other engines can only select one item) and add to current library.M-x calibredb-add-dir
and select one directory, all supported formats will be added into current library.M-x dired
, mark the files, thenM-x calibredb-dired-add
, marked files indired
will be added to current library. After adding process ends,dired
will ask the user delete the files or not.
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
toNon-Nil
. - Not all book formats are supported. If you can not add a specific book, check the logs in
*calibredb*
buffer.
M-x calibredb
- move the cursor to the ebook you want to delete, press
d
, calibredb will ask you to delete or not.
- move the cursor to the ebook you want to delete, press
M-x
calibredb-find-helm
orcalibredb-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.
First, set calibredb-library-alist
to include the calibre virtual libraries.
(setq calibredb-virtual-library-alist '(("1. Development - work" . "work \\(pdf\\|epub\\)")
("2. Read it later" . "Readit epub")
("3. Development - rust" . "rust")))
Then, in *calibredb-search*
buffer,
- Press
l
to open the library list and select the library. - Press
n
orp
to switch to next or previous library.
Or, in *calibredb-search*
buffer, call calibredb-virtual-library-list
directly and select
the library.
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
.
(setq calibredb-library-alist '(("~/OneDrive/Doc/Calibre")
("/Users/damonchan/Documents/Books Library")
("/Users/damonchan/Documents/HELLO")
("/Users/damonchan/Documents/Books")
("/Users/damonchan/Documents/World")
("http://192.168.1.2/opds" "account" "password") ; https://github.com/janeczku/calibre-web
("http://opds.oreilly.com/opds/")
("https://bookserver.archive.org/catalog/")
("http://arxiv.maplepop.com/catalog/")
("https://m.gutenberg.org/ebooks.opds/")
("http://www.feedbooks.com/catalog.atom")
("https://tatsu-zine.com/catalogs.opds")
("http://aozora.textlive.net/catalog.opds")))
Then, in *calibredb-search*
buffer,
- Press
L
to open the library list and select the library. - Press
N
orP
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.
- In
*calibredb-search*
buffer,m/DEL/u
to mark/unmark backward/unmark forward items, ands
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, presss
to set metadata. - In
*calibredb-search*
buffer, presss f
to fetch metadata by author and title ors 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 useC-M-n/C-M-p
to select and preview the source to use for adding the metadata to the document. PressRET
to add selected metadata to source. - In
*calibredb-search*
buffer, presss d
to fetch metadata by identifier.
Tips: You can filter the result via /
before setting the 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.
- 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
- Specify the list of metadata download plugins to use, this should be the same as the calibre GUI configuration.
(setq calibredb-fetch-metadata-source-list '("Google" "Amazon.com" "Douban Books"))
- In
*calibredb-search*
buffer,m
to mark the items,f/h/x
to toggle favorite/highlight/archive status on marked items.Demo:
- 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.
If you want to search by one type of metadata, for example, by tag, please check:
How to do group filtering?.Press g
, 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 g 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
, you can switch back to live filtering, and minibuffer will show Filter (live)
.
- Click the
calibredb-favorite-icon
, authors, file format, and tags. - Press
r/R
to reset the filtering.Demo:
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
Configure calibredb-sort-by
and calibredb-order
to control the default sorting.
- Setup org-ref
(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)
or
(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))
- 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.
Press ?
, it will show you almost all actions.
Demo:
In *calibredb-search*
buffer,
M-x calibredb-edit-annotation
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:
(setq calibredb-annotation-field "comments")
Please notice: Due to the limitation of calibredb, the blank new lines will be deleted.
We wrap counsel-ag
in calibredb-rga
, using the power of ripgrep-all.
First, install ripgrep-all,
then in *calibredb-search*
, *calibredb-entry*
buffer or under pdf-view-mode
/ nov-view-mode
,
M-x calibredb-rga
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.