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-28-2023, 12:01 PM   #46
capink
Wizard
capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.
 
Posts: 1,139
Karma: 1954142
Join Date: Aug 2015
Device: Kindle
Quote:
Originally Posted by ownedbycats View Post

Removing ,'composite' shows them. But is there a technical reason to avoid this?
This was copied from older code I developed for a custom Find Duplicate version I have. I don't remember the details, but the code in the Find Duplicate gave the user the option to sort (the duplicate groups not calibre library view) using a template he directly enters in the template dialog. So, the composite was probably removed because it was redundant. Not sure, so try and see for yourself.
capink is offline   Reply With Quote
Old 11-11-2023, 11:41 AM   #47
hillcountryfare
Member
hillcountryfare began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Jul 2023
Device: KPW, Fire Tablet 8
Quote:
Originally Posted by capink View Post
Code:
#!/usr/bin/env python
# ~*~ coding: utf-8 ~*~

__license__ = 'GPL v3'
__copyright__ = '2022, Ahmed Zaki <azaki00.dev@gmail.com>'
__docformat__ = 'restructuredtext en'

{snip}
I'm having an issue with this event where the next step in the action chain fires before the "applying metadata" dialog box / process finishes. If any of my subsequent actions involve metadata, it results in a Calibre dialog box that the metadata has changed. My current workaround is to add a lengthy pause after updating the metadata, but the amount of time the pause varies on the metadata and number of books selected.

To confirm this, I placed a dialog box in the step immediately after updating metadata, and you can see it appears on top of the "applying metadata" box.

I have a copy of the calibre temp folder that was generated during the action chain, and can provide that privately. I also have a video screen recording.
Attached Thumbnails
Click image for larger version

Name:	Applying Changed.png
Views:	236
Size:	62.8 KB
ID:	204661  
hillcountryfare is offline   Reply With Quote
Advert
Old 11-12-2023, 04:45 AM   #48
capink
Wizard
capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.
 
Posts: 1,139
Karma: 1954142
Join Date: Aug 2015
Device: Kindle
Quote:
Originally Posted by hillcountryfare View Post
I'm having an issue with this event where the next step in the action chain fires before the "applying metadata" dialog box / process finishes. If any of my subsequent actions involve metadata, it results in a Calibre dialog box that the metadata has changed. My current workaround is to add a lengthy pause after updating the metadata, but the amount of time the pause varies on the metadata and number of books selected.

To confirm this, I placed a dialog box in the step immediately after updating metadata, and you can see it appears on top of the "applying metadata" box.

I have a copy of the calibre temp folder that was generated during the action chain, and can provide that privately. I also have a video screen recording.
In the action settings, make sure to tick the box "Wait for the metadata download jobs to finish"
capink is offline   Reply With Quote
Old 11-13-2023, 12:02 PM   #49
hillcountryfare
Member
hillcountryfare began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Jul 2023
Device: KPW, Fire Tablet 8
Quote:
Originally Posted by capink View Post
In the action settings, make sure to tick the box "Wait for the metadata download jobs to finish"
I have that checked.
hillcountryfare is offline   Reply With Quote
Old 11-13-2023, 01:57 PM   #50
capink
Wizard
capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.
 
Posts: 1,139
Karma: 1954142
Join Date: Aug 2015
Device: Kindle
I just tested and was not able to replicate you problem with the option checked. I've never actually used this action myself. Maybe some of the users who use it can chime in.
capink is offline   Reply With Quote
Advert
Old 11-16-2023, 10:47 PM   #51
capink
Wizard
capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.
 
Posts: 1,139
Karma: 1954142
Join Date: Aug 2015
Device: Kindle
Count chapters by counting headers

This chains are for counting chapters in an epub book and saving the number into a custom column. For this chain to work you will need to have the Editor Chains plugin installed as well.

Editor Chains has an action called "Tag Actions" which allow the user to use criteria to locate tags. So for example, a user can use to search for all h1,h2,h3 tags with a class called "toc", and then count these tags, after which "Action Chains" can update a custom column with the count. Attached below is the chain that implement this solution (I left out specifying a class name and only specified tag names, you can add yourself with whatever criteria you wish).

Using this chain, the user has the opportunity to exclude or include tags based on their text (regex), so can only add tag the have the names chapter of part, or the tag that end or start with digit, and so on.

Note that you will have to configure the chain to choose the right column name you want to update.
Attached Files
File Type: zip Count_headers.zip (860 Bytes, 439 views)

Last edited by capink; 11-24-2023 at 05:08 AM.
capink is offline   Reply With Quote
Old 11-16-2023, 10:47 PM   #52
capink
Wizard
capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.
 
Posts: 1,139
Karma: 1954142
Join Date: Aug 2015
Device: Kindle
Counting chapters by counting ToC entries

This chain is for counting chapters in an epub book and saving the number into a custom column. This chain counts the entries in the Toc. This is not as reliable as the method in the above post that counts headers based on criteria specified by the user as there might be non chapter ToC entries. But it is simpler and does not need much configuration—besides choosing the custom column—on the part of the user.
Attached Files
File Type: zip solution 2_action_chains_count_toc.zip (573 Bytes, 177 views)

Last edited by capink; 11-17-2023 at 10:37 AM.
capink is offline   Reply With Quote
Old 11-17-2023, 03:53 PM   #53
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: 9,574
Karma: 64960983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
This Action Chain will copy the current cover to the data folder. Note that opening the template editor will also activate the copy.

Thanks to @chaley for the python code.
Attached Files
File Type: zip CopyCover.zip (2.4 KB, 179 views)
ownedbycats is online now   Reply With Quote
Old 11-18-2023, 02:03 AM   #54
capink
Wizard
capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.
 
Posts: 1,139
Karma: 1954142
Join Date: Aug 2015
Device: Kindle
Quote:
Originally Posted by ownedbycats View Post
This Action Chain will copy the current cover to the data folder. Note that opening the template editor will also activate the copy.

Thanks to @chaley for the python code.
Thanks. I updated this to a version that does not use templates to avoid invoking the copying when opening the template editor.
Attached Files
File Type: zip CopyCover_NoTemplates.zip (772 Bytes, 362 views)
capink is offline   Reply With Quote
Old 01-30-2024, 12:24 AM   #55
nqk
Fanatic
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: 526
Karma: 32158
Join Date: Feb 2012
Device: Onyx Boox Leaf
Thank you for the module "Book Added" for Event Manager.

Since I'm no developer, I would like to request for module that detects if a book has certain tag (run search when database is modified???)

Edit: I'm testing with Timer now...

Last edited by nqk; 01-30-2024 at 12:35 AM.
nqk is offline   Reply With Quote
Old 04-28-2024, 05:14 PM   #56
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,281
Karma: 6433040
Join Date: Sep 2020
Device: Calibre E-book viewer
Is it possible to have an action toggle some Calibre preferences?

For example, to change the option to read metadata from contents/filenames: https://www.mobileread.com/forums/sh...d.php?t=360814
Comfy.n is online now   Reply With Quote
Old 04-28-2024, 05:20 PM   #57
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: 9,574
Karma: 64960983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Set percent-read from page number

Posted in the Reading Goal thread, thought I should repost it here:

Quote:
Originally Posted by ownedbycats View Post
For those who read and track physical books in Calibre, here's an Action Chain that can set a #percentread column based on the current page number. It's useful alongside Reading Goal.
Uses columns #lastread (datetime) a #pagecount (int) and #percentread (int).
Attached Files
File Type: zip SetPercentRead.zip (3.7 KB, 124 views)

Last edited by ownedbycats; 05-18-2024 at 08:44 PM.
ownedbycats is online now   Reply With Quote
Old 05-01-2024, 12:46 PM   #58
slantybard
my parent's oops...
slantybard ought to be getting tired of karma fortunes by now.slantybard ought to be getting tired of karma fortunes by now.slantybard ought to be getting tired of karma fortunes by now.slantybard ought to be getting tired of karma fortunes by now.slantybard ought to be getting tired of karma fortunes by now.slantybard ought to be getting tired of karma fortunes by now.slantybard ought to be getting tired of karma fortunes by now.slantybard ought to be getting tired of karma fortunes by now.slantybard ought to be getting tired of karma fortunes by now.slantybard ought to be getting tired of karma fortunes by now.slantybard ought to be getting tired of karma fortunes by now.
 
Posts: 485
Karma: 1477572
Join Date: Feb 2009
Device: Vx->Handera->Clie-> Axim->505->650->KPW/Aura ->L2->iOS/CBW
Remove all formats except epub

I have built a simple chain that converts books into epub and then removes all formats except....

It works great thanks so much (and was easy to build), however, I would like to have the chain automatically remove all formats except epub. Is there any way to have it automatically have epub selected instead of me having to choose this option in the pop up dialog every time the chain is run?

I am sorry if I missed a post somewhere with an obvious answer to this sort of chain design.
slantybard is offline   Reply With Quote
Old 05-02-2024, 04:48 AM   #59
capink
Wizard
capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.
 
Posts: 1,139
Karma: 1954142
Join Date: Aug 2015
Device: Kindle
Single Field Edit > choose formats > predefined option should not prompt you at all.
capink is offline   Reply With Quote
Old 05-02-2024, 06:17 PM   #60
slantybard
my parent's oops...
slantybard ought to be getting tired of karma fortunes by now.slantybard ought to be getting tired of karma fortunes by now.slantybard ought to be getting tired of karma fortunes by now.slantybard ought to be getting tired of karma fortunes by now.slantybard ought to be getting tired of karma fortunes by now.slantybard ought to be getting tired of karma fortunes by now.slantybard ought to be getting tired of karma fortunes by now.slantybard ought to be getting tired of karma fortunes by now.slantybard ought to be getting tired of karma fortunes by now.slantybard ought to be getting tired of karma fortunes by now.slantybard ought to be getting tired of karma fortunes by now.
 
Posts: 485
Karma: 1477572
Join Date: Feb 2009
Device: Vx->Handera->Clie-> Axim->505->650->KPW/Aura ->L2->iOS/CBW
Quote:
Originally Posted by capink View Post
Single Field Edit > choose formats > predefined option should not prompt you at all.
Thank you so much, I had accidentally chosen calibre actions instead of single field!
slantybard is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] Action Chains capink Plugins 1410 Today 01:49 AM
Book Scanning tool chains tomsem Workshop 17 12-03-2023 10:19 AM
Mystery and Crime Thorne, Guy: Chance in Chains (1914); v1 Pulpmeister Kindle Books 0 11-25-2018 10:09 PM
Mystery and Crime Thorne, Guy: Chance in Chains (1914); v1 Pulpmeister ePub Books 0 11-25-2018 10:08 PM
Could this be the last year for the big chains? Connallmac News 66 01-07-2011 05:11 PM


All times are GMT -4. The time now is 04:39 PM.


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