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
A self-taught developer
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: 10
Karma: 37422
Join Date: Feb 2025
Location: Shanghai
Device: Kindle Paperwhite 2, iPad mini 5
Lightbulb [GUI Plugin] Ask Grok

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:	146
Size:	276.2 KB
ID:	214864   Click image for larger version

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

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

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

Name:	Screen4_Shortcuts.jpg
Views:	93
Size:	152.8 KB
ID:	214868  
Attached Files
File Type: zip Ask_Grok_v1.1.19.zip (2.13 MB, 1023 views)

Last edited by PeterT; 07-01-2025 at 03:01 PM. Reason: Attach updated plugin
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,611
Karma: 7891011
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
A self-taught developer
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: 10
Karma: 37422
Join Date: Feb 2025
Location: Shanghai
Device: Kindle Paperwhite 2, iPad mini 5
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
A self-taught developer
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: 10
Karma: 37422
Join Date: Feb 2025
Location: Shanghai
Device: Kindle Paperwhite 2, iPad mini 5
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, 24 views)
sheldonrrr is offline   Reply With Quote
Old 06-30-2025, 09:28 AM   #5
sheldonrrr
A self-taught developer
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: 10
Karma: 37422
Join Date: Feb 2025
Location: Shanghai
Device: Kindle Paperwhite 2, iPad mini 5
Changelog for v1.1.19

I am happy to announce the release of Ask Grok version 1.1.19, which includes several bug fixes, improvements, and new features. Here's what's new:
  • Bug Fix: Resolved an issue on Windows in version 1.1.15.
  • Improvement: Added string localization for better language support.
  • UI Update: Renamed the 'Suggest Button' to 'Random Question Button' for clarity.
  • New Feature - History: Automatically saves the most recent query history. When you reopen the same book, the latest history will be displayed in the ask dialogue.
  • New Feature - Copy Button: Easily copy the answer content or both the question and answer content with a single click.

Download: The new release is available at GitHub Releases.

Welcome your feedback! Please share your thoughts and suggestions in this thread.
sheldonrrr is offline   Reply With Quote
Old 06-30-2025, 12:09 PM   #6
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
Posts: 13,528
Karma: 78910202
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
Quote:
Originally Posted by sheldonrrr View Post

Download: The new release is available at GitHub Releases.

Welcome your feedback! Please share your thoughts and suggestions in this thread.
Rather than pointing people to GitHub (which people would need to read this thread to know an update was available) you might like to update the first post of this thread with the new version.

Additionally could you not include the __MACOSX folder in the zip.

Last edited by PeterT; 06-30-2025 at 12:12 PM.
PeterT is offline   Reply With Quote
Old 06-30-2025, 08:22 PM   #7
sheldonrrr
A self-taught developer
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: 10
Karma: 37422
Join Date: Feb 2025
Location: Shanghai
Device: Kindle Paperwhite 2, iPad mini 5
Quote:
Originally Posted by PeterT View Post
Rather than pointing people to GitHub (which people would need to read this thread to know an update was available) you might like to update the first post of this thread with the new version.

Additionally could you not include the __MACOSX folder in the zip.
Hey, Peter. Thanks for your guidance.

Actually, I also want to put the new version information in the first post of this thread, but I can't find the entry. It seems that my account lacks this permission. Currently I can only reply and quote the first post. In fact, I also want to update to the first post. If you can teach me, I will be very grateful.

Thanks for the feedback on the zip file. I will solve the problem of the __MACOSX folder and deal with this problem later. It seems that I still have a lot of details to consider in solving the compatibility problem of different platform systems.
sheldonrrr is offline   Reply With Quote
Old 06-30-2025, 09:30 PM   #8
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
Posts: 13,528
Karma: 78910202
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
It's quite possible that you don't have enough posts yet to edit the message. When you have a version you want released, I'll handle the updating of the post for youyu.
PeterT is offline   Reply With Quote
Old 06-30-2025, 09:35 PM   #9
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
Posts: 13,528
Karma: 78910202
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
We will also need to update the Plugin index to include the plugin. If you look at Index of Plugins you will see an attachment which is the standardized template we add to the index. Again, just fill it out and one of the admins can handle getting your plugin added.
PeterT is offline   Reply With Quote
Old 07-01-2025, 01:21 PM   #10
sheldonrrr
A self-taught developer
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: 10
Karma: 37422
Join Date: Feb 2025
Location: Shanghai
Device: Kindle Paperwhite 2, iPad mini 5
This is Ask Grok's PluginIndexSample-Information

Quote:
Originally Posted by PeterT View Post
We will also need to update the Plugin index to include the plugin. If you look at Index of Plugins you will see an attachment which is the standardized template we add to the index. Again, just fill it out and one of the admins can handle getting your plugin added.
Hey, Peter, you made my day.

The attached file (pluginIndexSample-Ask_Grok.txt) is based on the standard information downloaded from the Index rules you provided. I edited and filled it.

The Ask_Grok_v1.1.19.zip is the file without any hidden folder can be used for Index.

If the plugin is added to the index, I will also add a new way to search and install it through the official index! (I wrote it before, and it finally will work till now.)

Is this OK for publish for Index?

Thanks a lot.
Attached Files
File Type: txt pluginIndexSample-Ask_Grok.txt (261 Bytes, 17 views)
File Type: zip Ask_Grok_v1.1.19.zip (2.13 MB, 18 views)
sheldonrrr is offline   Reply With Quote
Old 07-01-2025, 03:06 PM   #11
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
Posts: 13,528
Karma: 78910202
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
Should be done; takes an hour or so for calibre to detect the change in plugins.
PeterT is offline   Reply With Quote
Old 07-01-2025, 04:16 PM   #12
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
Posts: 13,528
Karma: 78910202
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
OK. It's visible.
PeterT is offline   Reply With Quote
Old 07-01-2025, 06:31 PM   #13
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,731
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Moderator Notice

Changed thread title to comply with convention


BR
BetterRed is offline   Reply With Quote
Old 07-01-2025, 11:20 PM   #14
sheldonrrr
A self-taught developer
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: 10
Karma: 37422
Join Date: Feb 2025
Location: Shanghai
Device: Kindle Paperwhite 2, iPad mini 5
Thanks a lot

Quote:
Originally Posted by PeterT View Post
OK. It's visible.
You made my day. Hope this plugin could help more people.
sheldonrrr is offline   Reply With Quote
Reply

Tags
ai tool, grok, xai


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] K2pdfopt Plugin capink Plugins 19 03-01-2025 04:37 PM
[GUI Plugin] Noosfere_util, a companion plugin to noosfere DB lrpirlet Plugins 2 08-18-2022 03:15 PM
[GUI Plugin] Save Virtual Libraries To Column (GUI) chaley Plugins 14 04-04-2021 05:25 AM
[GUI Plugin] Plugin Updater **Deprecated** kiwidude Plugins 159 06-19-2011 12:27 PM


All times are GMT -4. The time now is 11:35 AM.


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