Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 09-06-2024, 02:59 AM   #1
Dizzy
Junior Member
Dizzy began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Sep 2024
Device: Kobo Touch
Calibre Suggestion - AI Blurb and Cover Art Generation

I love Calibre and spending time curating my collection of eBooks. I make sure that all metadata is correct and that all books have a compelling book cover and blurb that make me want to pick up the book and read it. You can't judge a book by its cover but you'll never read it if it look boring to start with. To that end I have started using AI to write the blurbs and generate the cover art.

I ask ChatGPT "Write a one paragraph blurb for <title> by <author>" and paste the result into the Comments field on the metadata page. Would this be a feature worth automating in Calibre. I am sure that there is a API for these chatbots. It is faster than "Download metadata".

More difficult to automate but what I have been doing is getting AI image generators to create the cover art for me also. I first use ChatGPT to identify and describe an iconic scene from the book. I then paste the result into an AI image generator. I repeat until I find an image that I like then download it, resize, and add title and author, with an appropriate font, before importing it into Calibre.

When I've finished I convert the book to incorporate the new information.

Just thought that I'd suggest this as a new feature.
Dizzy is offline   Reply With Quote
Old 09-06-2024, 03:11 AM   #2
Dizzy
Junior Member
Dizzy began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Sep 2024
Device: Kobo Touch
The attached image shows some examples. Those in red boxes were generated by AI.
Attached Thumbnails
Click image for larger version

Name:	Example AI book cover art.jpg
Views:	257
Size:	141.0 KB
ID:	210640  
Dizzy is offline   Reply With Quote
Advert
Old 09-06-2024, 05:04 AM   #3
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,722
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Here's a couple of threads that may be of interest:

[GUI Plugin] * PROPOSED * AI Book Summary

Using GPT4All as a research tool

BR
BetterRed is offline   Reply With Quote
Old 11-05-2024, 04:24 AM   #4
Dizzy
Junior Member
Dizzy began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Sep 2024
Device: Kobo Touch
I take it back. AI generated blurbs are awful! AI just strings words together without any resemblance to the truth.
For example: I took it for granted that ChatGPTs blurb for "A fragment of Glass" by D. H. Lawrence was correct. I've just read this 14 page short story. It's about a boy who burns down a manor house, runs off with his girlfriend and picks a fragment of stained glass from a church window, thinking that it has magical powers.

ChatGPT wrote: "A Fragment of Stained Glass" by D.H. Lawrence offers readers a glimpse into the intricate tapestry of human emotions and desires through the lens of a seemingly mundane encounter. Set in the quiet countryside, the story follows the chance meeting between the introspective artist, Frederick Peel, and the enigmatic Anna Lascelles, a woman shrouded in mystery and allure. As Peel becomes increasingly captivated by Anna's elusive charm, Lawrence skillfully explores themes of longing, yearning, and the transformative power of art. Through vivid imagery and nuanced characterization, the story delves into the complexities of desire and the fleeting nature of human connection. "A Fragment of Stained Glass" stands as a testament to Lawrence's unparalleled ability to capture the intricacies of the human heart, leaving readers mesmerized by its haunting beauty long after the final page is turned.

There are no characters called Frederick Peel or Anna Lascelles in this short story.

ChatGPT is full of it!
Dizzy is offline   Reply With Quote
Old 11-05-2024, 08:31 AM   #5
enuddleyarbl
Guru
enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.
 
enuddleyarbl's Avatar
 
Posts: 776
Karma: 1538394
Join Date: Sep 2013
Device: Kobo Forma
That's the problem with this "AI" craze. There's no intelligence at all behind these things. It's merely the stringing of most-likely words one after the other. ChatGPT and its ilk are nothing but glorified, modern versions of the old Eliza program (1960s psychology program). Technically, it's an amazing bit of pseudo-speech. But, there's nothing capable of recognizing actual meaning. And, there probably won't be for decades (if ever).

Last edited by enuddleyarbl; 11-05-2024 at 08:42 AM.
enuddleyarbl is offline   Reply With Quote
Advert
Old 11-05-2024, 01:08 PM   #6
un_pogaz
Chalut o/
un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.
 
un_pogaz's Avatar
 
Posts: 439
Karma: 145424
Join Date: Dec 2017
Device: Kobo
Personally, I use the term "Advanced Procedural Text Generator", which is a good technical description of them. A very, very powerful generator, but still pseudo-random bassed on to a seed named "prompt".
The best thing they're capable of is to be glorified Lorem Ipsum generator, no more.

And it's not going to get any better in the next decades. AIs have fundamental technical issue, hallucinations are systemic and insolvable no matter how much data is provided. The only way to prevent an AI from talking nonsense is to manually set thousands of IFs and conditions to correct it.
It's the new techo hype and speculative bubble of Silicone Valley's, and it will explode violently.
un_pogaz is online now   Reply With Quote
Old 11-05-2024, 07:52 PM   #7
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 10,971
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Quote:
Originally Posted by un_pogaz View Post
It's the new techo hype and speculative bubble of Silicone Valley's, and it will explode violently.
I'll be glad when it does. I do not appreciate the planet getting burned up just to tell me to put glue on pizza.
ownedbycats is online now   Reply With Quote
Old 03-16-2025, 03:32 PM   #8
rbrahmson
Junior Member
rbrahmson began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Mar 2025
Device: ipad
Actually the book summary idea is excellent especially if paired with Google's NotebookLM.

Here is what I did (manually, of course):
1. Used Calibre to convert a sample of books to PDF format
2. Used NotebookLM to upload the PDF (one book at a time and separately because NotebookLM is able to take multiple PDFs and answer questions on the "collecion")
3. Tried different questions to see what works best:
3.1 You can ask it to "Summarize the content"
3.2 Ask it to describe the main points
3.3 Ask it to list the main points and counterpoints

I actually found that all of these produced very valuable results. If someone can create a plugin I'd suggest that different summary types would be possible to create and save concurrently.

IMHO this would make Calibre very useful for different study projects.
rbrahmson is offline   Reply With Quote
Old 03-16-2025, 03:49 PM   #9
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,747
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by rbrahmson View Post
Actually the book summary idea is excellent especially if paired with Google's NotebookLM.

Here is what I did (manually, of course):
1. Used Calibre to convert a sample of books to PDF format
2. Used NotebookLM to upload the PDF (one book at a time and separately because NotebookLM is able to take multiple PDFs and answer questions on the "collecion")
3. Tried different questions to see what works best:
3.1 You can ask it to "Summarize the content"
3.2 Ask it to describe the main points
3.3 Ask it to list the main points and counterpoints

I actually found that all of these produced very valuable results. If someone can create a plugin I'd suggest that different summary types would be possible to create and save concurrently.

IMHO this would make Calibre very useful for different study projects.
I can easily see others using this to have the AI write a book report for them. So it would be good (IMHO) not to have a plugin to make it easer to cheat.
JSWolf is online now   Reply With Quote
Old 03-16-2025, 10:25 PM   #10
rbrahmson
Junior Member
rbrahmson began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Mar 2025
Device: ipad
Quote:
Originally Posted by JSWolf View Post
I can easily see others using this to have the AI write a book report for them. So it would be good (IMHO) not to have a plugin to make it easer to cheat.
As I wrote, the ability is already there in NotebookLM and other AI tools. Keeping it outside of Calibre does not change that fact, merely limits Calibre's capability.
rbrahmson is offline   Reply With Quote
Old 03-17-2025, 05:13 AM   #11
Quoth
Still reading
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 14,023
Karma: 105092227
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
Waste of time, often plagiarism, dubious quality and environmentally damaging.

AI is zero value for study as unless you are already expert you have no idea if the results are junk or totally misleading. Even ones that cite do it badly.
Quoth is offline   Reply With Quote
Old 03-17-2025, 05:42 AM   #12
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 10,971
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Quote:
Originally Posted by Quoth View Post
AI is zero value for study as unless you are already expert you have no idea if the results are junk or totally misleading. Even ones that cite do it badly.
I posted in Technology Vent & Rant last night:

Quote:
Originally Posted by ownedbycats View Post
AI Overview tells me that the treatment of a certain medical condition varies based on its cause and severity.

I don't know what I would've done without this illuminating answer.
ownedbycats is online now   Reply With Quote
Old 03-17-2025, 10:14 AM   #13
rbrahmson
Junior Member
rbrahmson began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Mar 2025
Device: ipad
Quote:
Originally Posted by Quoth View Post
Waste of time, often plagiarism, dubious quality and environmentally damaging.

AI is zero value for study as unless you are already expert you have no idea if the results are junk or totally misleading. Even ones that cite do it badly.
Nothing personal, I randomly chose your feedback from a long list of negative skeptics of any AI tool. I understand the resistance. There are areas I wouldn't bet my life on -- like medical advice. But I do think that these tools are useful especially if the results are reviewed by professionals.

As I mentioned earlier suggesting a plugin that incorporates AI analysis for books, I tried the process (manually, obviously) on several books and was impressed. Since I am not a plugin developer I decided to do another experiment - uploaded the entire Calibre manual to NotebookLM and asked it "How do you write a new plugin?". It created an impressive overview which I think gives a useful overview (but just an overview - one still needs to read the chapter to actually learn how to create a plugin). Here it is:

To write a new plugin for calibre, you can follow these general steps based on the information in the sources:
Spoiler:

**1. Understand the Basics of Calibre Plugins:**
- Calibre has a modular design where almost all functionality comes in the form of plugins.
- Plugins can be used for various purposes, such as conversion, downloading news (recipes), user interface components, device connections, and file processing.
- Calibre plugins are essentially ZIP files containing Python code and other necessary resources like images.

**2. Create the Basic Plugin Structure:**
- A basic plugin requires at least one Python file named `__init__.py`, which acts as the main file for your plugin.
- For more complex plugins with multiple files, you need to include an empty text file named `plugin-import-name-some_name.txt` in the ZIP file. This enables importing code from other `.py` files within the ZIP using the prefix `calibre_plugins.some_name`. The `some_name` part comes from the filename of this empty text file.

**3. Define Your Plugin Class:**
- In your `__init__.py` file, you need to define a class that inherits from one of the base plugin classes provided by calibre, depending on the type of plugin you want to create. Some common base classes include:
- **`FileTypePlugin`**: For plugins that operate on specific file types, such as modifying e-books after conversion. The "Hello World" plugin example demonstrates this, setting the publisher metadata for EPUB and MOBI files after conversion.
- **`InterfaceActionBase` and `InterfaceAction`**: For plugins that add components to the calibre user interface. The "Interface Plugin Demo" illustrates how to create a user interface plugin with menus, actions, and configuration options. Such plugins often involve separate files like `ui.py` for the interface and `main.py` for the logic.
- **`EditBookToolPlugin`**: For plugins that add tools to the calibre book editor. The "Edit Book plugin demo" shows how to create a tool that modifies font sizes. These tools are defined in `main.py` and inherit from `calibre.gui2.tweak_book.plugin.Tool`.
- **`Plugin`**: The base class for all plugins. Other plugin types like `MetadataReaderPlugin`, `MetadataWriterPlugin`, `CatalogPlugin`, `Metadata download plugins`, `Conversion plugins`, `Device drivers`, and `PreferencesPlugin` also inherit from this.

**4. Implement Required Methods and Attributes:**
- Each plugin class has specific attributes you need to define (like `name`, `description`, `supported_platforms`, `author`, `version`, `minimum_calibre_version`, `file_types` for `FileTypePlugin`).
- You also need to implement methods that define the plugin's functionality. For example:
- `FileTypePlugin` requires a `run(self, path_to_ebook)` method which is called for the specified file types.
- `InterfaceAction` plugins often have a `genesis(self)` method for initial setup and may define an `action_spec` to create a menu or toolbar action.
- `EditBookToolPlugin` requires a `create_action(self, for_toolbar=True)` method to create the toolbar or menu item and often an action method that performs the desired operation.

**5. Enable User Configuration (Optional but Recommended for UI Plugins):**
- To allow users to customize your plugin through Preferences -> Plugins, you need to:
- Make the base plugin class return `True` for the `is_customizable(self)` method.
- Implement the `config_widget(self)` method to return a `QWidget` for the configuration dialog. This widget's code can be in a separate file like `config.py`.
- Implement the `save_settings(self, config_widget)` method to save the user's settings.
- The recommended way to store configuration data is using the `JSONConfig` class.

**6. Access Resources from the Plugin ZIP File:**
- Calibre provides built-in functions to access files within your plugin's ZIP archive:
- `get_resources(name_or_list_of_names)`: Returns the contents of the specified files as bytes.

**7. Add Translations (Optional):**
- To make your plugin's user interface translatable, you need to:
- Mark all user-visible strings as translatable by surrounding them with `_()`.
- Generate `.po` files for each language you want to support.
- Compile the `.po` files into `.mo` files.
- Place the `.mo` files in a `translations` folder within your plugin.
- Call the `load_translations()` function at the top of your plugin's `.py` files that contain translatable strings (typically in `ui.py` for UI plugins).

**8. Debug Your Plugin:**
- Run calibre in debug mode using `calibre-debug -g` from the command line or by right-clicking the Preferences button (or Ctrl+Shift+R) within calibre.
- Insert `print` statements in your plugin code to track execution and identify issues.
- You can quickly test changes using `calibre-debug -s; calibre-customize -b /path/to/your/plugin/folder; calibre`.

**9. Package Your Plugin:**
- Once you have your plugin files, you need to package them into a ZIP file. The `__init__.py` file (and the `plugin-import-name-some_name.txt` file for multi-file plugins) should be at the root of the ZIP archive.

**10. Add Your Plugin to Calibre:**
- In calibre, go to Preferences -> Plugins -> Get new plugins (or Load plugin from file if you have the ZIP file).

**11. Share Your Plugin (Optional):**
- If you want to share your plugin with others, you can post it in the calibre plugins forum on Mobileread.

By following these steps and referring to the more detailed examples and API documentation mentioned in the sources, you can create your own plugins to extend the functionality of calibre. Remember to choose the appropriate base class for your plugin type and implement the necessary methods and attributes.

Last edited by pdurrant; 03-17-2025 at 12:04 PM.
rbrahmson is offline   Reply With Quote
Old 03-17-2025, 12:05 PM   #14
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 73,941
Karma: 315160596
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Oasis
I'm not sure the AI "summary" of how to write a plugin really helps. But it certainly doesn't help to have it all visible by default. I've wrapped it in Spoiler tags.
pdurrant is offline   Reply With Quote
Old 03-17-2025, 12:35 PM   #15
rbrahmson
Junior Member
rbrahmson began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Mar 2025
Device: ipad
Quote:
Originally Posted by pdurrant View Post
I'm not sure the AI "summary" of how to write a plugin really helps. But it certainly doesn't help to have it all visible by default. I've wrapped it in Spoiler tags.
Thanks, good idea, clearly I'm new to this forum
rbrahmson is offline   Reply With Quote
Reply

Tags
artificial intelligence, calibre


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cover Art - Calibre to Kindle assur191 Devices 11 07-17-2025 11:42 PM
Cover Art not Showing in Calibre Trester99 Library Management 11 06-16-2024 12:32 AM
[Kindle] Calibre cover art issue... Joey77 Devices 3 05-18-2020 01:28 PM
Touch Cover art trouble on my Nook (but ok on Calibre) Miguelo Barnes & Noble NOOK 1 04-22-2013 01:47 PM
Cover Art issues in Calibre 0.6.52 auriel Calibre 2 05-11-2010 04:05 PM


All times are GMT -4. The time now is 03:22 PM.


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