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, 11:01 AM   #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,091
Karma: 1948136
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, 10: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:	52
Size:	62.8 KB
ID:	204661  
hillcountryfare is offline   Reply With Quote
Old 11-12-2023, 03: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,091
Karma: 1948136
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, 11:02 AM   #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, 12: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,091
Karma: 1948136
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
Old 11-16-2023, 09: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,091
Karma: 1948136
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, 149 views)

Last edited by capink; 11-24-2023 at 04:08 AM.
capink is offline   Reply With Quote
Old 11-16-2023, 09: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,091
Karma: 1948136
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, 42 views)

Last edited by capink; 11-17-2023 at 09:37 AM.
capink is offline   Reply With Quote
Old 11-17-2023, 02: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: 8,639
Karma: 61234567
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, 61 views)
ownedbycats is offline   Reply With Quote
Old 11-18-2023, 01: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,091
Karma: 1948136
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, 161 views)
capink is offline   Reply With Quote
Old 01-29-2024, 11:24 PM   #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: 516
Karma: 32106
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-29-2024 at 11:35 PM.
nqk is offline   Reply With Quote
Reply


Forum Jump

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


All times are GMT -4. The time now is 06:16 AM.


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