MyGit

chenyanming/calibredb.el

Fork: 17 Star: 321 (更新于 2024-10-17 13:24:43)

license: GPL-3.0

Language: Emacs Lisp .

Emacs calibre client - An Ebook Management Solution in Emacs.

GitHub网址

#+TITLE: [[https://github.com/chenyanming/calibredb.el][calibredb.el]] #+AUTHOR: Damon Chan #+DATE: Aug 9, 2020 #+SINCE: #+STARTUP: inlineimages nofold #+EXPORT_FILE_NAME: index.html #+HTML_HEAD: #+HTML_HEAD:

#+HTML_HEAD: <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> #+HTML_HEAD: <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script> #+HTML_HEAD: <script type="text/javascript" src="https://fniessen.github.io/org-html-themes/src/lib/js/jquery.stickytableheaders.min.js"></script> #+HTML_HEAD: <script type="text/javascript" src="https://fniessen.github.io/org-html-themes/src/readtheorg_theme/js/readtheorg.js"></script>

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

  • Table of Contents :TOC_1:noexport:
  • [[#description][Description]]
  • [[#installation][Installation]]
  • [[#configuration][Configuration]]
  • [[#workflow][Workflow]]
  • [[#qa][Q&A]]
  • [[#features][Features]]
  • [[#releases][RELEASES]]
  • [[#contributor][Contributor]]
  • 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 calibredb will use the built-in SQLite engine if it is available (for emacs

29). For older emacs or emacs that is not built with SQLite support, you should install the external sqlite3 program.

*** macOS #+BEGIN_SRC sh brew install sqlite #+END_SRC

*** Windows With chocolatey #+BEGIN_SRC sh choco install sqlite #+END_SRC

*** Linux For example, in Ubuntu 18.04: #+BEGIN_SRC sh sudo apt install sqlite3 #+END_SRC

** Install calibre *** macOS 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 calibre #+END_SRC

*** Linux For example, in Ubuntu 18.04: #+BEGIN_SRC sh sudo apt install 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") ;; for emacs < 29 or no sqlite built-in emacs (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

** Page The maximum number of entries to display in a single page: #+begin_src emacs-lisp (setq calibredb-search-page-max-rows 44) #+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") ("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=
  • =calibredb-date-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

  • [[file:WORKFLOW.org][Workflow]]

  • [[file:Q&A.org][Q&A]]

  • [[file:FEATURES.org][Features]]

  • [[file:RELEASES.org][RELEASES]]

  • Contributor #+html:

最近版本更新:(数据更新于 2024-10-30 17:39:56)

chenyanming/calibredb.el同语言 Emacs Lisp最近更新仓库

2024-08-22 13:46:09 emacs-helm/helm

2023-12-04 16:21:08 bbatsov/solarized-emacs

2023-10-13 23:11:27 bbatsov/projectile

2023-08-08 10:48:13 jaypei/emacs-neotree

2023-08-01 00:10:37 seagle0128/.emacs.d

2022-09-29 21:26:44 ocaml/tuareg