Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit a38821e
Author: chenyanming <elecming@gmail.com>
Date:   Sun Jul 7 19:21:17 2024 +0800

    Fix some docs

commit a54c552
Author: chenyanming <elecming@gmail.com>
Date:   Sun Jul 7 19:14:51 2024 +0800

    Improve the sql with AND

commit 5b24a2e
Author: chenyanming <elecming@gmail.com>
Date:   Sun Jul 7 18:21:41 2024 +0800

    Rename to calibredb-search-candidates

commit bd6d069
Author: chenyanming <elecming@gmail.com>
Date:   Sun Jul 7 15:40:23 2024 +0800

    Reset current page

commit 0ae88a9
Author: chenyanming <elecming@gmail.com>
Date:   Sun Jul 7 15:33:55 2024 +0800

    Order by highlight/favorite/archive on db, update calibredb

commit 74211a6
Author: chenyanming <elecming@gmail.com>
Date:   Sun Jul 7 11:42:18 2024 +0800

    Update Q&A

commit f1a3b88
Author: chenyanming <elecming@gmail.com>
Date:   Sun Jul 7 11:40:06 2024 +0800

    Update README

commit 63a775d
Author: chenyanming <elecming@gmail.com>
Date:   Sun Jul 7 11:35:12 2024 +0800

    Organize README

commit e911c9c
Author: chenyanming <elecming@gmail.com>
Date:   Sun Jul 7 11:28:27 2024 +0800

    Reset current page

commit 2c7ff6a
Author: chenyanming <elecming@gmail.com>
Date:   Sun Jul 7 11:22:23 2024 +0800

    Improve calibredb-candidates

commit 9e0e2f7
Author: chenyanming <elecming@gmail.com>
Date:   Sun Jul 7 11:08:50 2024 +0800

    Update calibredb-all

commit 7787299
Author: chenyanming <elecming@gmail.com>
Date:   Sun Jul 7 02:10:17 2024 +0800

    Support pages
  • Loading branch information
chenyanming committed Jul 7, 2024
1 parent 8ca1b52 commit a12746c
Show file tree
Hide file tree
Showing 21 changed files with 761 additions and 2,939 deletions.
192 changes: 192 additions & 0 deletions FEATURES.org
Original file line number Diff line number Diff line change
@@ -0,0 +1,192 @@
#+title: 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 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.

Loading

0 comments on commit a12746c

Please sign in to comment.