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 05-15-2026, 02:34 PM   #1576
Wiggo
Leftutti
Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.
 
Wiggo's Avatar
 
Posts: 625
Karma: 3671119
Join Date: Feb 2019
Location: Bavaria
Device: iPad Pro, Kobo Libra 2
Quote:
Originally Posted by bluefish2020 View Post
If no existing chains exist I'd probably make a new module like this one:

Spoiler:
Code:
from calibre_plugins.action_chains.actions.base import ChainAction
from calibre.utils.titlecase import titlecase

class MyAction(ChainAction):

    # replace with the name of your action
    name = 'Title Case'
    support_scopes = True

    def run(self, gui, settings, chain):
        api = gui.current_db.new_api

        selected_books = chain.scope().get_book_ids()
        old_titles = api.all_field_for("title", selected_books, None)
        new_titles = {k: titlecase(v) for k, v in old_titles.items()}
        updates = {k: v for k, v in new_titles.items() if v != old_titles[k]}
        changed_ids = api.set_field(f"title", updates)
        # updating marks and view might be useful too?
        #marks = {id: "Changed title" for id in changed_ids}
        #gui.current_db.set_marked_ids(marks)
        #gui.library_view.model().refresh_ids(changed_ids)
Thank you so much, bluefish2020, I only had to change it to my customn column.

Code:
from calibre_plugins.action_chains.actions.base import ChainAction
from calibre.utils.titlecase import titlecase

class MyAction(ChainAction):

    # replace with the name of your action
    name = 'Title Case Original Title'
    support_scopes = True

    def run(self, gui, settings, chain):
        api = gui.current_db.new_api

        selected_books = chain.scope().get_book_ids()
        old_titles = api.all_field_for("#original_title", selected_books, None)
        new_titles = {k: titlecase(v) for k, v in old_titles.items()}
        updates = {k: v for k, v in new_titles.items() if v != old_titles[k]}
        changed_ids = api.set_field(f"#original_title", updates)
        # updating marks and view might be useful too?
        #marks = {id: "Changed title" for id in changed_ids}
        #gui.current_db.set_marked_ids(marks)
        #gui.library_view.model().refresh_ids(changed_ids)
I also made the following additional changes with Claude.AI

Code:
from calibre_plugins.action_chains.actions.base import ChainAction
from calibre.utils.titlecase import titlecase

class MyAction(ChainAction):

    name = 'Mark Non-Titlecase Original Titles'
    support_scopes = False

    def run(self, gui, settings, chain):
        api = gui.current_db.new_api
        db = gui.current_db

        all_books = list(api.all_book_ids())
        titles = api.all_field_for("#original_title", all_books, None)
        
        marks = {book_id: "caps_title" for book_id, title in titles.items() if title and title != titlecase(title)}
        
        db.set_marked_ids(marks)
        gui.library_view.model().refresh_ids(list(marks.keys()))
Selection Modifier — "New search": marked:caps_title, "Select all books in current library view"
Wiggo is offline   Reply With Quote
Old 05-24-2026, 08:13 PM   #1577
rumplestiltskin
Zealot
rumplestiltskin ought to be getting tired of karma fortunes by now.rumplestiltskin ought to be getting tired of karma fortunes by now.rumplestiltskin ought to be getting tired of karma fortunes by now.rumplestiltskin ought to be getting tired of karma fortunes by now.rumplestiltskin ought to be getting tired of karma fortunes by now.rumplestiltskin ought to be getting tired of karma fortunes by now.rumplestiltskin ought to be getting tired of karma fortunes by now.rumplestiltskin ought to be getting tired of karma fortunes by now.rumplestiltskin ought to be getting tired of karma fortunes by now.rumplestiltskin ought to be getting tired of karma fortunes by now.rumplestiltskin ought to be getting tired of karma fortunes by now.
 
Posts: 107
Karma: 1835990
Join Date: Nov 2010
Location: West of the Pecos
Device: FireHD8, iPad
Wondering if Actions Chains would do the following:

I routinely eMail ePubs to my Amazon Kindle account from within Calibre. This normally works perfectly as long as I verify that the ePub isn't too large (in MB). Usually I lossy compress the images to 40% or so and this takes care of any MB issue.

So I eMail the ePub from within Calibre. I then check the "Jobs" to verify success. Finally, if successful, I have a custom column I've named "Sent" which I click upon and set the value to Yes which yields a green checkmark. A book I haven't yet sent displays a red "X".

So can I craft some sort of Action Chain that does this:
1. eMail the book.
2. Verify the Job completed successfully. (If not, show a modal "failure" dialog.)
3. if the Job completed successfully, set the "Sent" column to "Yes".

I seem to recall I asked a similar question some years ago and process #2 couldn't be done so process #3, therefore, wasn't done regardless of the success or failure of #2.

I hope I've been clear enough. Thanks in advance for any assistance.

Barry
rumplestiltskin is offline   Reply With Quote
Old 05-31-2026, 07:47 AM   #1578
nqk
Guru
nqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beauty
 
Posts: 605
Karma: 32228
Join Date: Feb 2012
Device: Onyx Boox Leaf
Hi,

Can I do "recount pages" using the built-in page count of Calibre?
nqk is offline   Reply With Quote
Old 05-31-2026, 09:37 AM   #1579
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: 83,762
Karma: 153649587
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 nqk View Post
Hi,

Can I do "recount pages" using the built-in page count of Calibre?
Preferences > Look & feel > Bookshelf view > Recount pages
JSWolf is offline   Reply With Quote
Old 06-01-2026, 01:54 AM   #1580
nqk
Guru
nqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beauty
 
Posts: 605
Karma: 32228
Join Date: Feb 2012
Device: Onyx Boox Leaf
Quote:
Originally Posted by JSWolf View Post
Preferences > Look & feel > Bookshelf view > Recount pages
Thank you for your response. I'd like the chain link that trigger Calibre to count the current / selected book. I can manually do it by.... right clicking the detail page, and select Recount this book
nqk is offline   Reply With Quote
Old 06-04-2026, 11:55 AM   #1581
VapidRapidReader
Member
VapidRapidReader can spell AND pronounce 'liseuse.'VapidRapidReader can spell AND pronounce 'liseuse.'VapidRapidReader can spell AND pronounce 'liseuse.'VapidRapidReader can spell AND pronounce 'liseuse.'VapidRapidReader can spell AND pronounce 'liseuse.'VapidRapidReader can spell AND pronounce 'liseuse.'VapidRapidReader can spell AND pronounce 'liseuse.'VapidRapidReader can spell AND pronounce 'liseuse.'VapidRapidReader can spell AND pronounce 'liseuse.'VapidRapidReader can spell AND pronounce 'liseuse.'VapidRapidReader can spell AND pronounce 'liseuse.'
 
Posts: 15
Karma: 39964
Join Date: Mar 2010
Device: Boox Leaf
Quote:
Originally Posted by nqk View Post
Thank you for your response. I'd like the chain link that trigger Calibre to count the current / selected book. I can manually do it by.... right clicking the detail page, and select Recount this book
According to bookshelf_view.py the button runs

Code:
            db = self.gui.current_db.new_api
            db.mark_for_pages_recount()
            db.queue_pages_scan(force=force)
            self.gui.library_view.model().zero_page_cache.clear()

Last edited by VapidRapidReader; 06-04-2026 at 12:17 PM.
VapidRapidReader is offline   Reply With Quote
Old 06-06-2026, 03:27 AM   #1582
Ma'am-I-Am
Preferred pronouns: We/Us
Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.
 
Ma'am-I-Am's Avatar
 
Posts: 256
Karma: 533346
Join Date: Jun 2014
Location: <--- Over There, USA
Device: Kindle PW 2
I'm sorry to be so stupid, but this stuff is almost beyond me!

I need to copy the info in the series column to the front of the title, plus one space.

Finished example title: [The Corps 01] Semper Fi

It seems the only way to reliably get a book onto The Spouse's Kindle is via Send to Kindle and this is how he wants it to display. There are a number of books to do, so clicking a button would really be helpful!

Will this plug in do that?
Ma'am-I-Am is offline   Reply With Quote
Old 06-06-2026, 12:28 PM   #1583
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,817
Karma: 64144480
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by Ma'am-I-Am View Post
I'm sorry to be so stupid, but this stuff is almost beyond me!

I need to copy the info in the series column to the front of the title, plus one space.

Finished example title: [The Corps 01] Semper Fi

It seems the only way to reliably get a book onto The Spouse's Kindle is via Send to Kindle and this is how he wants it to display. There are a number of books to do, so clicking a button would really be helpful!

Will this plug in do that?
IMHO just use the metadata plugboard. (preferences: Metadata plubboards
Set for a Kindle2
Code:
{series || }{title} > {title}
Note a series column in the list is really 2 columns (see how done in the MDE ) with the {series_index} being a separate field
I used collections for the series name (not available after K4) and only added a series index
this code formatted the index consistently to ##.##
Code:
{series_index:0>5.2f|| - }{title}
theducks is online now   Reply With Quote
Old 06-06-2026, 06:13 PM   #1584
Ma'am-I-Am
Preferred pronouns: We/Us
Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.
 
Ma'am-I-Am's Avatar
 
Posts: 256
Karma: 533346
Join Date: Jun 2014
Location: <--- Over There, USA
Device: Kindle PW 2
Thank you, theducks! You're always ready to jump in with help and I really do appreciate it!

EDIT: Since I never use Save to Disk, I edited the preference in Import/Export to do what I wanted.

Last edited by Ma'am-I-Am; 06-06-2026 at 07:37 PM. Reason: Solved, sort of
Ma'am-I-Am is offline   Reply With Quote
Old 06-06-2026, 06:49 PM   #1585
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,817
Karma: 64144480
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by Ma'am-I-Am View Post
I use the metadata plugboard for my main library, but it only adds the series to the beginning of the title *when sideloading* - it doesn't actually change the title within Calibre but that's what I need to do in order for it to display as The Spouse wants it when using Send to Kindle.

I still want to know if Action Chains can do this, but I'll also take a look at the metadata plugin posts and continue my questions there.

Thank you, theducks! You're always ready to jump in with help and I really do appreciate it!
Make a custom calculated column
Code:
 {series} {title}
Calculated, because it self maintains.
theducks is online now   Reply With Quote
Old 06-07-2026, 03:15 AM   #1586
Ma'am-I-Am
Preferred pronouns: We/Us
Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.
 
Ma'am-I-Am's Avatar
 
Posts: 256
Karma: 533346
Join Date: Jun 2014
Location: <--- Over There, USA
Device: Kindle PW 2
Quote:
Originally Posted by theducks View Post
Make a custom calculated column
Code:
 {series} {title}
Calculated, because it self maintains.
I don't think that will actually change the title within Calibre, which means using Send to Kindle still just sends the title and author as Calibre stores it.

The way I do it is to open my main library, copy the books wanted to his db, open his db, click Save to Disk. Open S2K in my browser, click and drag those newly renamed files in that folder. Once they're uploaded, delete the books from his db and the renamed files (to save space). Really, it only takes a few minutes.

If you want to discuss this further (not a problem), PM me. Otherwise, we'll go off topic here. I consider my question solved.
Ma'am-I-Am is offline   Reply With Quote
Old 06-07-2026, 08:03 AM   #1587
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,817
Karma: 64144480
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by Ma'am-I-Am View Post
I don't think that will actually change the title within Calibre, which means using Send to Kindle still just sends the title and author as Calibre stores it.

The way I do it is to open my main library, copy the books wanted to his db, open his db, click Save to Disk. Open S2K in my browser, click and drag those newly renamed files in that folder. Once they're uploaded, delete the books from his db and the renamed files (to save space). Really, it only takes a few minutes.

If you want to discuss this further (not a problem), PM me. Otherwise, we'll go off topic here. I consider my question solved.
You need a plugboard for E-MAILED files, that is different than a connected device
theducks is online now   Reply With Quote
Old 06-07-2026, 06:09 PM   #1588
Ma'am-I-Am
Preferred pronouns: We/Us
Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.
 
Ma'am-I-Am's Avatar
 
Posts: 256
Karma: 533346
Join Date: Jun 2014
Location: <--- Over There, USA
Device: Kindle PW 2
Quote:
Originally Posted by theducks View Post
You need a plugboard for E-MAILED files, that is different than a connected device
Yes, as I pretty much said in my original post. I assumed anyone reading it would understand Send to Kindle as a service (as opposed to send to device). My bad. What I'm doing now works. On a similar note, I never did figure out how to send by email directly from Calibre. That's a project for another day, though.

Last edited by Ma'am-I-Am; 06-07-2026 at 06:12 PM.
Ma'am-I-Am is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Action Chains Resources capink Plugins 83 05-07-2026 02:16 AM
[Editor Plugin] Editor Chains capink Plugins 131 04-26-2026 05:33 AM
[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


All times are GMT -4. The time now is 10:31 AM.


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