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 07-28-2022, 07:34 AM   #901
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,090
Karma: 1948136
Join Date: Aug 2015
Device: Kindle
Quote:
Originally Posted by tamaracks View Post
Another question: Is there a way to disable an Action Chains menu item if no book is selected? I thought maybe I could test a basic template tag like title for a value, but it seems like the template functions are hanging on to the most recently selected book, even if nothing is selected in the current view. For instance, I have an chain that calls up the metadata view for a book via Calibre Actions. Sometimes I do something beforehand that unselects the books in the view, but I forget and when I run this chain, I get an error about nothing being selected. Just hoping to avoid that.
You can set the following condition on the chain:

Code:
template = program: selection_count()
datatype = number
comparison = ">"
condition value = 0
Note, however, that this can lead to a lag when clicking the Action Chains menu while having a lot of items selected (hundreds of books), because the condition will take some time to be processed.

Quote:
Originally Posted by tamaracks View Post
Makes sense. Is there a way for me to pull a copy of the icons from Calibre to load as custom?
Try the chain attached. It should extract the icons to a folder called calibre-default-icons inside your home directory.

To import the zip file, open the chains dialog > right click > import chain > select zip file.
Attached Files
File Type: zip extract_default_icons.zip (637 Bytes, 80 views)

Last edited by capink; 07-28-2022 at 07:38 AM.
capink is offline   Reply With Quote
Old 08-02-2022, 11:04 PM   #902
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
Dear you guys,

I'm totally new to this plugin. I would like to do a regex search and replace in the book content whenever it is modified. Is it possible?

Please be kind and help me if it is. (I'm no python dev to be familiar with the code)
nqk is offline   Reply With Quote
Old 08-05-2022, 11:06 AM   #903
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,090
Karma: 1948136
Join Date: Aug 2015
Device: Kindle
Quote:
Originally Posted by nqk View Post
Dear you guys,

I'm totally new to this plugin. I would like to do a regex search and replace in the book content whenever it is modified. Is it possible?

Please be kind and help me if it is. (I'm no python dev to be familiar with the code)
I don't understand exactly what you want to do. But I have two things to point out:
  • While Action Chains has an event manager that makes it possible to launch chains in reaction to certain events, it does not currently have an event that is triggrered by modifying book(s). I decided no to include such an event because it is not uncommon for a lot of books to modified successively very rapidly (some examples of this are the check quality and modify epubs plugins). Having chains launched in response to event that can be fired multiple times per second can wreak havoc.

    One solution for this would be caching the events and and firing one event for all books when calibre is idle. However, this is in the future for now.

  • What you can do is include the modifying actions as a part of chain, and adding your search/replace action at the end of same chain. You can use the Editor Chains plugin to search/replace supported formats from Action Chains. It has an action that can use saved searches from the calibre editor for this.
capink is offline   Reply With Quote
Old 08-06-2022, 05:02 AM   #904
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
Quote:
Originally Posted by capink View Post
I don't understand exactly what you want to do. But I have two things to point out:


  • While Action Chains has an event manager that makes it possible to launch chains in reaction to certain events, it does not currently have an event that is triggrered by modifying book(s). I decided no to include such an event because it is not uncommon for a lot of books to modified successively very rapidly (some examples of this are the check quality and modify epubs plugins). Having chains launched in response to event that can be fired multiple times per second can wreak havoc.



    One solution for this would be caching the events and and firing one event for all books when calibre is idle. However, this is in the future for now.




  • What you can do is include the modifying actions as a part of chain, and adding your search/replace action at the end of same chain. You can use the Editor Chains plugin to search/replace supported formats from Action Chains. It has an action that can use saved searches from the calibre editor for this.


Thank you.

I will explore the Editor Chains. Didn't know it exist.

Sent from my GM1910 using Tapatalk
nqk is offline   Reply With Quote
Old 08-06-2022, 08:33 PM   #905
tamaracks
Connoisseur
tamaracks began at the beginning.
 
tamaracks's Avatar
 
Posts: 53
Karma: 10
Join Date: Jun 2021
Device: Onyx Boox Nova3
Smile

Quote:
Originally Posted by capink View Post
Try the chain attached. It should extract the icons to a folder called calibre-default-icons inside your home directory.

To import the zip file, open the chains dialog > right click > import chain > select zip file.
I didn't have a chance to try it out right away, but this worked great, thanks!

selection_count was helpful too.
tamaracks is offline   Reply With Quote
Old 08-08-2022, 07:17 AM   #906
Robert9
Junior Member
Robert9 began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Mar 2018
Device: Kindle
Change title/author with Action Chains?

I really ould like to change title and author in list-view. But i cant find the action in Action Chains. Is it possible to add this function to a key? This would save me a lot of time.
Robert9 is offline   Reply With Quote
Old 08-08-2022, 05:22 PM   #907
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: 73,972
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Ask in the Action Chains thread and clearly explain what it is you want to do.

https://www.mobileread.com/forums/sh...d.php?t=334974
JSWolf is online now   Reply With Quote
Old 08-08-2022, 06:23 PM   #908
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: 20,568
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Moderator Notice

@Robert9 - please post plugin specific issues in the relevant thread. There's a sticky Plugins Index, with clickable links, at the top of this sub-forum.

BR
BetterRed is offline   Reply With Quote
Old 08-10-2022, 03:04 AM   #909
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,090
Karma: 1948136
Join Date: Aug 2015
Device: Kindle
Quote:
Originally Posted by Robert9 View Post
I really ould like to change title and author in list-view. But i cant find the action in Action Chains. Is it possible to add this function to a key? This would save me a lot of time.
List view already has a shortcut for editing, you press f2 while on the cell you want to edit.

If that is not working for you, you can try making a chain with one or multiple Single Field Edit actions, where you choose the field(s) you want to edit, and set it to ask at runtime. After that you can bind the chain to whatever keyboard shortcut you want.
capink is offline   Reply With Quote
Old 08-10-2022, 03:21 AM   #910
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,090
Karma: 1948136
Join Date: Aug 2015
Device: Kindle
Version 1.17.5

Version 1.17.5
  • Update: update to calibre6 icon themes. Code borrowed from @JimmXinu.
capink is offline   Reply With Quote
Old 09-15-2022, 05:06 AM   #911
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: 997
Karma: 6417070
Join Date: Sep 2020
Device: Calibre E-book viewer
Goal is to have Calibre download only metadata with a single key press.

I was able to create an action to bring the MD download dialogue up with one key press (setting a custom shortcut key), but it seems I need extra code for pressing 'm' as the next (and last) chain action.

Is there some python code I can use in that case? (please, please..)
Attached Thumbnails
Click image for larger version

Name:	MWSnap0661 2022-09-15, 05_56_22.png
Views:	55
Size:	9.2 KB
ID:	196533  

Last edited by Comfy.n; 09-15-2022 at 07:06 AM.
Comfy.n is offline   Reply With Quote
Old 09-15-2022, 01:33 PM   #912
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,090
Karma: 1948136
Join Date: Aug 2015
Device: Kindle
Quote:
Originally Posted by Comfy.n View Post
Goal is to have Calibre download only metadata with a single key press.
Download metadata action
capink is offline   Reply With Quote
Old 09-15-2022, 03:17 PM   #913
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,233
Karma: 11768331
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Quote:
Originally Posted by capink View Post
Thank you very much! I'm going to check it, because I would like to use it mainly for covers....
Terisa de morgan is offline   Reply With Quote
Old 09-15-2022, 06:16 PM   #914
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,090
Karma: 1948136
Join Date: Aug 2015
Device: Kindle
Quote:
Originally Posted by Terisa de morgan View Post
Thank you very much! I'm going to check it, because I would like to use it mainly for covers....
There was a problem with the module that interfered with calibre's normal metadata download. I posted a new version. Please restart calibre and copy the new code instead.
capink is offline   Reply With Quote
Old 09-15-2022, 09:07 PM   #915
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: 997
Karma: 6417070
Join Date: Sep 2020
Device: Calibre E-book viewer
Quote:
Originally Posted by capink View Post
Thanks sooooooooooo much!

Attached screens show, in no particular order, the steps needed to implement this.

:
Attached Thumbnails
Click image for larger version

Name:	MWSnap0674 2022-09-15, 21_57_49.png
Views:	81
Size:	95.1 KB
ID:	196566   Click image for larger version

Name:	MWSnap0673 2022-09-15, 21_57_11.png
Views:	86
Size:	21.0 KB
ID:	196567   Click image for larger version

Name:	MWSnap0672 2022-09-15, 21_27_23.png
Views:	83
Size:	129.1 KB
ID:	196568   Click image for larger version

Name:	MWSnap0675 2022-09-15, 22_04_01.png
Views:	77
Size:	8.2 KB
ID:	196569  
Comfy.n is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Editor Plugin] Editor Chains capink Plugins 82 04-02-2024 10:56 AM
Action Chains Resources capink Plugins 54 01-29-2024 11:24 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 05:47 AM.


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