Skip to content

die/calibre-rpc

Repository files navigation

calibre-rpc

Calibre RPC is a plugin for the e-book manager Calibre to enable Discord Rich Presence.

This project was inspired by Split.

Features

  • Displays a browsing message when Calibre is opened, including the number of books in the current library.
  • Displays the most recent book and its author opened by Calibre's ebook reader.
  • Displays the most recent book and its author opened by Calibre's ebook editor.

Installation

  1. Download the latest release.
  2. Go into Calibre and select Preferences -> Plugins -> Loan plugin from file -> select the zip you downloaded.
  3. Restart Calibre.

Development

Windows

  • Clone this repository and install make.
  • Open the repository in Visual Studio Code, or your preferable IDE, and run make install to get the calibre source or to update your current source.
  • Set the CALIBRE_DEVELOP_FROM system environment variable to a local installation of calibre's source code, which should now be in the directory under calibre.
  • Set the Path system environment variable to your local installation of Calibre, typically C:\Program Files\Calibre2.
  • To build the plugin from source, run make compile inside the terminal.
  • To export the plugin as a zip, run make zip.

To learn more about plugin development, there are quick tutorials found on the calibre website.

Goals

  • Display the current page out of the total pages calculated by Calibre's ebook reader.
  • Display the current file being edited in Calibre's ebook editor.
  • Update the size of the library shown by the presence in real-time.

Credits

The image found in this README.md originates from Calibre's source. The discord icon used for this plugin is from freepnglogos. This plugin makes use of pypresence to allow a user to showcase their current Calibre activity within Discord.