Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 04-05-2025, 03:51 AM   #1
sheldonrrr
Junior Member
sheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five words
 
Posts: 6
Karma: 37422
Join Date: Feb 2025
Device: KW2
Lightbulb [PLUGIN] Ask Grok - Ask Questions About Books Using Grok in Calibre

Ask Grok - A Calibre Plugin to Ask Questions About Books

A simple plugin that lets you ask questions about books directly in Calibre using Grok.

Why Use This Plugin?
With so many AI tools available, you might want to use AI to ask questions about a book directly within Calibre. However, doing this manually means you’d need to copy-paste the book’s information—like its title, author, or publisher—into an AI tool. This plugin eliminates that hassle by letting you call Grok’s AI capabilities directly in Calibre, with no copy-pasting required! Just select a book, ask your question, and get answers seamlessly.

---

Features
  • Ask questions about books directly in Calibre
  • Automatically includes the current book's metadata (title, author, publisher) - no copy-paste needed
  • Simple single input-output dialog interface
  • Configurable API key for Grok
  • Customizable prompt template
  • Previewable interface shortcuts
  • Check plugin version info in the interface

---

Installation

Method 1: Install via GitHub Zip File
  1. Download the plugin zip file (attached below as Ask_Grok.zip)
  2. In Calibre, go to Preferences -> Plugins -> Load plugin from file
  3. Select the downloaded Ask_Grok.zip file to install
  4. Restart Calibre after installation

Method 2: Install via Calibre Official Plugin Market

Note: I would be very grateful if this plugin could be added to the official Calibre plugin index, making it easier for users to find and install.
  1. Open Calibre’s Preferences
  2. Go to Plugins
  3. Click Get new plugins
  4. Search for Ask Grok in the Filter by name field
  5. Select the plugin and install
  6. Restart Calibre

---

How to Get Your Grok API Key
  1. Go to the Grok backend configuration page: https://console.x.ai/
  2. Create a team if you don’t have one
  3. Navigate to API Keys
  4. Click Create API Keys
  5. Name your API Key (suggested: calibre_Ask_Grok)
  6. Click Save
  7. Copy the generated Key value (e.g., Bearer x-ai ***** or x-ai *****)

---

Configure the API Key in Calibre
  1. In Calibre, click the Ask Grok dropdown menu in the toolbar, then select Configure
  2. Paste your API Key into the X.AI Authorization Token input box
  3. Click Save
  4. You’ll see a Save successful message

---

How to Use the Plugin
  1. Select a book in your Calibre library
  2. Click the Ask Grok button in the toolbar
  3. Enter your question in the popup dialog
  4. Click Send to get Grok’s answer
  5. Click Suggestion? to see AI-generated question ideas

---

Shortcuts
  • Global Ask Shortcut: Command + L

---

Supported Languages
  • Danish (da), German (de), English (en), Spanish (es), Finnish (fi), French (fr), Japanese (ja), Dutch (nl), Norwegian (no), Portuguese (pt), Russian (ru), Swedish (sv), Simplified Chinese (zh), Traditional Chinese (zht), Cantonese (yue)

---

Requirements
  • Calibre 7.25 or higher
  • External Python modules: requests, bleach, markdown2

Note: The plugin uses built-in Calibre modules like PyQt5 for the GUI and standard Python libraries (os, sys, json, etc.).

---

Grok API Key Notes
  • API call limits depend on your Grok account permissions

---

Privacy Handling
  • The plugin sends book metadata (title, author, publisher, publish time, language) to Grok but excludes user-defined data like Tags or Comments
  • Your Grok API Key is stored locally in a JSON file and isn’t sent to any server
  • Uses Python’s requests module, no third-party servers involved
  • Grok may use submitted data for model training (Private Chat not yet supported)
  • You can set the API Key via environment variable: XAI_AUTH_TOKEN

Grok Official Statement: Private Chat is private and won’t be used for training, but may be retained for up to 30 days for safety purposes.

---

Feedback Welcome!
Let me know if you have any questions or suggestions for the plugin. I’ll update this thread with any new features or changes.

A Note on Development
This is my first time developing a Calibre plugin, so my understanding of Calibre’s codebase might be limited. I’ve primarily tested this plugin on macOS, where it works well. On Linux, there are still some minor bugs—like the shortcuts not working yet. I haven’t fully tested it on Windows, so there might be issues there. If you run into any problems or have feedback, please include your environment details in this format at the start of your comment: [OS]\[Calibre Version]\Platform (e.g., [Windows]\[7.25]\x64). This will help me debug and improve the plugin!

GitHub Repository
You can find the source code and contribute to the project on GitHub: https://github.com/sheldonrrr/ask_grok

Happy reading and questioning!
Attached Thumbnails
Click image for larger version

Name:	Screen1_Suggest.jpg
Views:	87
Size:	276.2 KB
ID:	214864   Click image for larger version

Name:	Screen2_ask.jpg
Views:	80
Size:	479.9 KB
ID:	214865   Click image for larger version

Name:	Screen3_Config.jpg
Views:	73
Size:	266.0 KB
ID:	214866   Click image for larger version

Name:	Screen5_About.jpg
Views:	65
Size:	173.5 KB
ID:	214867   Click image for larger version

Name:	Screen4_Shortcuts.jpg
Views:	66
Size:	152.8 KB
ID:	214868  
Attached Files
File Type: zip Ask_Grok.zip (1.20 MB, 43 views)
sheldonrrr is offline   Reply With Quote
Old 04-05-2025, 06:44 PM   #2
Comfy.n
want to learn what I want
Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.
 
Posts: 1,605
Karma: 7511185
Join Date: Sep 2020
Device: none
Looks cool, I'll be definitely trying this when I get the API key. Congratulations!

Notes:

- Files should be placed in the root of zip structure. They're currently inside a 'ask_grok-main' folder.

- Upon toolbar button click, I should get a menu in English, as that is my UI language. Not a big deal, I figured how to change it

Last edited by Comfy.n; 04-05-2025 at 06:48 PM.
Comfy.n is offline   Reply With Quote
Old 04-05-2025, 11:44 PM   #3
sheldonrrr
Junior Member
sheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five words
 
Posts: 6
Karma: 37422
Join Date: Feb 2025
Device: KW2
Quote:
Originally Posted by Comfy.n View Post
Looks cool, I'll be definitely trying this when I get the API key. Congratulations!

Notes:

- Files should be placed in the root of zip structure. They're currently inside a 'ask_grok-main' folder.

- Upon toolbar button click, I should get a menu in English, as that is my UI language. Not a big deal, I figured how to change it
---

Hi Comfy.n, thanks for your feedback! Both issues have been addressed:

1. I've added a Release page on GitHub (https://github.com/sheldonrrr/ask_grok/releases) with an installation ZIP where the zip file are placed directly in the root directory. The first issue was caused by GitHub's automated ZIP generation when downloading from the repo.
2. The default language has now been set to English.

Feel free to grab the updated version from the Release page. Let me know if there's anything else!
sheldonrrr is offline   Reply With Quote
Old 06-09-2025, 02:49 AM   #4
sheldonrrr
Junior Member
sheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five wordssheldonrrr can name that ebook in five words
 
Posts: 6
Karma: 37422
Join Date: Feb 2025
Device: KW2
Ask Grok -v1.1.15 Update

Changelog for v1.1.15
  • Fix: Resolved [400 error] request bugs on Windows and Linux.
  • API Update: Now using x.ai API version: grok-3-latest.
  • New Feature: Added window size memory support.

New release available here: v1.1.15 on GitHub

Thanks to our real user Ken for the feedback! Fixing compatibility issues across different systems with this release has been quite interesting.
Attached Files
File Type: zip Ask_Grok_v1.1.15.zip (2.55 MB, 10 views)
sheldonrrr is offline   Reply With Quote
Reply

Tags
ai tool, grok, xai


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calibre x Apple iBooks/Books interfacing / plugin olerite Development 11 01-12-2025 02:04 PM
Grok, long time lurker, first time poster Grok Introduce Yourself 1 12-03-2023 04:18 PM
Editing books using Calibre and some kindle feature questions happy_123 Calibre 2 01-19-2013 08:51 AM
Trying to Grok eBooks FatDog Introduce Yourself 8 11-22-2009 08:47 AM


All times are GMT -4. The time now is 12:52 AM.


MobileRead.com is a privately owned, operated and funded community.