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 08-29-2021, 02:07 PM   #661
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,199
Karma: 1995558
Join Date: Aug 2015
Device: Kindle
Quote:
Originally Posted by chillybang View Post
After Calibre library is changed on any way (event "Library changed")
Quote:
Originally Posted by chillybang View Post
1.1 What I'm doing wrong with the event "Library changed"? Why the action doesn't start after it?
Library changed event does not mean library changed in any way as you put it. This event is activated when you switch (change) from one library to another, using the switch library button.

Quote:
Originally Posted by chillybang View Post
2.1 How can I setup an export folder in the action setup, so the action "knows" it always and doesn't force me to select the folder?
The plugin calls the actions as defined by calibre. So if an action is interactive (pops a dialog asking the user for input), it has no capability of changing it.

The solution for this would be for someone to write a custom non-interactive save-to-disk action.
capink is offline   Reply With Quote
Old 08-29-2021, 02:27 PM   #662
chillybang
Member
chillybang began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Aug 2021
Device: samsung s8
Quote:
Originally Posted by capink View Post
Library changed event does not mean library changed in any way as you put it. This event is activated when you switch (change) from one library to another, using the switch library button.
Funny real case of "lost in translation"

Quote:
Originally Posted by capink View Post
to write a custom non-interactive save-to-disk action.
Would you give me some entry points for this? I'm not a big Python guru, but would like to try.
chillybang is offline   Reply With Quote
Old 08-29-2021, 02:30 PM   #663
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: 11,044
Karma: 75555555
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Also, a lot of things change the Calibre library. So I suspect it might trigger at unexpected times.
ownedbycats is offline   Reply With Quote
Old 08-29-2021, 03:14 PM   #664
chillybang
Member
chillybang began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Aug 2021
Device: samsung s8
Quote:
Originally Posted by ownedbycats View Post
Also, a lot of things change the Calibre library. So I suspect it might trigger at unexpected times.
But not that changes I was meaning - really pity I thought about just actions on books: adding deleting, editing.
chillybang is offline   Reply With Quote
Old 08-29-2021, 08:17 PM   #665
McStubb
Connoisseur
McStubb began at the beginning.
 
Posts: 52
Karma: 10
Join Date: May 2014
Device: None
Is there a way to say select next X number of books?
McStubb is offline   Reply With Quote
Old 08-30-2021, 04:46 AM   #666
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,199
Karma: 1995558
Join Date: Aug 2015
Device: Kindle
Quote:
Originally Posted by McStubb View Post
Is there a way to say select next X number of books?
No. You will have to write a custom action for that.
capink is offline   Reply With Quote
Old 08-30-2021, 05:12 AM   #667
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,199
Karma: 1995558
Join Date: Aug 2015
Device: Kindle
Quote:
Originally Posted by chillybang View Post
Funny real case of "lost in translation"



Would you give me some entry points for this? I'm not a big Python guru, but would like to try.
Action posted here.
capink is offline   Reply With Quote
Old 08-30-2021, 06:39 PM   #668
dunhill
Guru
dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.
 
dunhill's Avatar
 
Posts: 897
Karma: 810834
Join Date: Sep 2017
Location: Buenos Aires, Argentina
Device: moon+ reader, kindle paperwhite
Thanks for the Action Chain Scripts thread.
Do not comment there so as not to interfere with the loading of examples, great work
dunhill is online now   Reply With Quote
Old 08-31-2021, 04:57 AM   #669
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,199
Karma: 1995558
Join Date: Aug 2015
Device: Kindle
Quote:
Originally Posted by dunhill View Post
Thanks for the Action Chain Scripts thread.
Do not comment there so as not to interfere with the loading of examples, great work
You are welcome.
capink is offline   Reply With Quote
Old 09-01-2021, 06:01 AM   #670
yanekyan
Junior Member
yanekyan began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Dec 2013
Device: pocketbook 623
Hello,
How can I build a non-interactive save-to-disk action (predefined format, folder, etc), but with different save template. For example:
1. {author_sort:.1}/{author_sort:shorten(30,(..),0)}/{series:||/}{series_index:0>4.1f|| - }{title}
2. {series}{series_index:0>4.1f|| - }{title}
3. {tags}/{author_sort}-{title}
etc.
yanekyan is offline   Reply With Quote
Old 09-01-2021, 08:41 AM   #671
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,199
Karma: 1995558
Join Date: Aug 2015
Device: Kindle
Quote:
Originally Posted by yanekyan View Post
Hello,
How can I build a non-interactive save-to-disk action (predefined format, folder, etc), but with different save template. For example:
1. {author_sort:.1}/{author_sort:shorten(30,(..),0)}/{series:||/}{series_index:0>4.1f|| - }{title}
2. {series}{series_index:0>4.1f|| - }{title}
3. {tags}/{author_sort}-{title}
etc.
The previous version of the action followed the template defined in calibre > preferences > save-to-disk > template. It now has been updated to support defining the template in the action settings, in case the user wants to have multiple save-to actions with different templates.

Last edited by capink; 09-02-2021 at 05:12 AM.
capink is offline   Reply With Quote
Old 09-02-2021, 03:06 AM   #672
yanekyan
Junior Member
yanekyan began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Dec 2013
Device: pocketbook 623
You are great. Thanks.
yanekyan is offline   Reply With Quote
Old 09-11-2021, 01:54 AM   #673
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: 11,044
Karma: 75555555
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Question: I have several cleanup chains that modify multiple columns in a row. Unfortunately Last Modified seems to trigger for all of them which causes a slight pause between each action; running the chain with my column turned off sped things up considerably.

Is there a way to alleviate this, such as making it trigger only on the last change?
ownedbycats is offline   Reply With Quote
Old 09-11-2021, 06:42 AM   #674
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,199
Karma: 1995558
Join Date: Aug 2015
Device: Kindle
Quote:
Originally Posted by ownedbycats View Post
Question: I have several cleanup chains that modify multiple columns in a row. Unfortunately Last Modified seems to trigger for all of them which causes a slight pause between each action; running the chain with my column turned off sped things up considerably.

Is there a way to alleviate this, such as making it trigger only on the last change?
No, that will not be possible. But maybe I can add an option to Chain Dialog to de-activate the Last Modified plugin altogether whenever the chain is running. But you will have to update the date columns yourself by adding single field edit actions to the end of the chain.

Edit: As an alternative, I can make a custom action that toggles the Last Modified Plugin on and off. But this will also need a small modification to the Last Modified Plugin.

Last edited by capink; 09-11-2021 at 08:43 AM.
capink is offline   Reply With Quote
Old 09-11-2021, 07:04 AM   #675
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,453
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
@capink: a thought: you could solve this problem and probably increase performance by adding an action that scans the book variables and assigns values to metadata. It would look for variables that match metadata field names. If such a variable exists then set the field in the book to the value.

The advantage: you could set all the fields for a book in one operation (one set_field()), so in one database transaction. I don't know how this would affect triggering the last_modified events. My hope would be that they are triggered at most once per book.
chaley is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Action Chains Resources capink Plugins 78 08-05-2025 04:01 AM
[Editor Plugin] Editor Chains capink Plugins 106 06-17-2025 05:36 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


All times are GMT -4. The time now is 06:56 PM.


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