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 11-22-2020, 04:02 PM   #16
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,759
Karma: 68326525
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
A very minor visual glitch: "Ask at Runtime" metadata changes cause the cursor to appear like this. Thankfully things are still clickable.

Click image for larger version

Name:	2020-11-22 15_56_14-calibre.png
Views:	1521
Size:	5.2 KB
ID:	183526

Also, would it be possible to add "Re-apply current sort" as a Calibre action somehow? There's a slight glitch in Calibre where column icons don't immediately update if changed by a plugin.

Last edited by ownedbycats; 11-22-2020 at 04:11 PM.
ownedbycats is offline   Reply With Quote
Old 11-22-2020, 04:27 PM   #17
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: 21,111
Karma: 27620706
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by capink View Post
Another thing I am not sure about, is whether it makes sense to make the chains library specific, or keep them as they are now. If people have any input about this, I would be interested in hearing it. It might break existing settings though.
Firstly, I haven't used the plugin

Definitely - I do sequences that are library specific, e.g. in Books I frequently do the following -- DOCX->EPUB conversion, Count Pages (words), and Modify EPUB. I would never use that in my Media or Movies libraries.

BR
BetterRed is offline   Reply With Quote
Advert
Old 11-22-2020, 04:36 PM   #18
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,759
Karma: 68326525
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Note that the OP states that some tasks (conversion, background tasks) don't work properly.

Last edited by ownedbycats; 11-22-2020 at 04:43 PM.
ownedbycats is offline   Reply With Quote
Old 11-22-2020, 04:38 PM   #19
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
A very minor visual glitch: "Ask at Runtime" metadata changes cause the cursor to appear like this. Thankfully things are still clickable.
The plugin starts a busy cursor that remains active from the start of the chain until it ends. I will modify it to temporarily turn it off during the popups of single field dialogs. The same cannot be done however for dialogs from Calibre Actions (e.g. Edit metadata dialog) because I have to track every possible action and see whether it pops up a dialog or not.

Quote:
Originally Posted by ownedbycats View Post
Also, would it be possible to add "Re-apply current sort" as a Calibre action somehow? There's a slight glitch in Calibre where column icons don't immediately update if changed by a plugin.
I need a clarification of the problem because it is not clear to me. Also if it helps, if you have view manager plugin installed, you can access whatever view you want (which might help with any sort preference).

Last edited by capink; 11-22-2020 at 04:50 PM. Reason: add to the note about calibre actions dialogs
capink is offline   Reply With Quote
Old 11-22-2020, 04:46 PM   #20
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 BetterRed View Post
Firstly, I haven't used the plugin

Definitely - I do sequences that are library specific, e.g. in Books I frequently do the following -- DOCX->EPUB conversion, Count Pages (words), and Modify EPUB. I would never use that in my Media or Movies libraries.

BR
Noted. It is not currently so because it was based on open with plugin which is not library specific. But sine chains can be exported/imported, I guess it should not be problematic for those who want cross-library chains

Also, as noted by ownedbythecats, some actions like conversion don't work for reasons outlined in the opening post.
capink is offline   Reply With Quote
Advert
Old 11-22-2020, 04:49 PM   #21
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,759
Karma: 68326525
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Example:

1. I have a column icon rule set to display an icon if the Languages field is empty.
2. If I use Action Chains to set the Language field, the icon doesn't immediately disappear. This is a common glitch when plugins change the metadata.
3. So I use "Re-apply current sort" (a default Calibre action, in the Keyboard Shortcuts) and the icons will refresh.
ownedbycats is offline   Reply With Quote
Old 11-22-2020, 04:52 PM   #22
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: 21,111
Karma: 27620706
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by ownedbycats View Post
There's a slight glitch in Calibre where column icons don't immediately update if changed by a plugin.
FWIW - the Miscellaneous->Focus the book list shortcut will refresh current row - default is Shift+Esc.

And, there are situations where icons aren't refreshed that don't involve plugins - one that comes to mind is when an icon's presence is based on the existence of a specific format, after adding said format the icon doesn't appear without the 'refresh', but if it's removed it disappears immediately

BR
BetterRed is offline   Reply With Quote
Old 11-22-2020, 04:56 PM   #23
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,759
Karma: 68326525
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
I also occasionally get the glitch when editing from the book list too - I have an icon rule based on a psuedobool composite column, but changing one of the columns that the composite pulls from doesn't always update the icon right away.
ownedbycats is offline   Reply With Quote
Old 11-22-2020, 05:13 PM   #24
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: 21,111
Karma: 27620706
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by capink View Post
Noted. It is not currently so because it was based on open with plugin which is not library specific. But sine chains can be exported/imported, I guess it should not be problematic for those who want cross-library chains

Also, as noted by ownedbythecats, some actions like conversion don't work for reasons outlined in the opening post.
as well as not installing it, I also hadn't read the fine-print

"sine chain" - a block-chain catching a wave

BR
BetterRed is offline   Reply With Quote
Old 11-22-2020, 05:42 PM   #25
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
Example:

1. I have a column icon rule set to display an icon if the Languages field is empty.
2. If I use Action Chains to set the Language field, the icon doesn't immediately disappear. This is a common glitch when plugins change the metadata.
3. So I use "Re-apply current sort" (a default Calibre action, in the Keyboard Shortcuts) and the icons will refresh.
Ahh, I got it. The plugin should probably refresh the gui after running the chain. I will add this to next release, and see if it solves your problems.

Was not aware of the re-apply sort trick. If you want an action that does that, try this custom action. (Manage modules > create module > copy paste in the module editor, and give the module a name)

Code:
from calibre_plugins.action_chains.actions.base import ChainAction

class ResortAction(ChainAction):

    name = 'Re-sort'

    def run(self, gui, settings, chain):
        gui.current_view().resort()

Last edited by capink; 03-23-2021 at 02:27 PM.
capink is offline   Reply With Quote
Old 11-23-2020, 08:09 AM   #26
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,404
Karma: 12408443
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
I'm giving this plugin a try for some common actions I do, usually to change a couple of metadata values (that I have now in one of my plugins, but I can clean them, perhaps). I'm using calibre portable 5.5 on Windows 10 and I have a couple of problems:
  1. Shorcuts for chains are not working for me (they don't appear in the menu till I restart calibre and, when they appear, they don't work)

Edit: Second point removed, there was a problem in my column definition.

Last edited by Terisa de morgan; 11-23-2020 at 09:21 AM.
Terisa de morgan is offline   Reply With Quote
Old 11-23-2020, 09:30 AM   #27
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 Terisa de morgan View Post
Shorcuts for chains are not working for me (they don't appear in the menu till I restart calibre and, when they appear, they don't work)
Strange. It is working for me with calibre 5.4. I will update later to 5.5 and see if it makes a difference.

Quote:
Originally Posted by Terisa de morgan View Post
Date template (format_date (today, "dd/MM/yyyy")) is not giving the right month.
When applying templates to date columns the formatting depends on the formatting value of the date column itself. So, make the template "program: today()" and modify the formatting in your column (preferences > add you own columns > double click on column > format for dates).

If you are applying the template to a text column, I tried your example and it returns the month correctly. (see screens)

If you want a pre-defined value that evaluates to current time, there is a checkbox for that, you can use templates but you don't need to. But make sure you have the latest version, because there was a glitch earlier. (see screenshot).

Also whenever you hardcode a date value into a date column (does not matter for text columns) using a template, it is better to use a format that will not confuse parse_date (because sometimes it confuses months with days). So use 12-nov-2011 instead of 12-11-2011. (and the formatting will follow your column value as explained above)
Attached Thumbnails
Click image for larger version

Name:	1.png
Views:	1509
Size:	49.0 KB
ID:	183535   Click image for larger version

Name:	3.png
Views:	1486
Size:	30.3 KB
ID:	183537  
Attached Images
 
capink is offline   Reply With Quote
Old 11-23-2020, 09:42 AM   #28
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,404
Karma: 12408443
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Yes, sorry, as you can see I've removed that point because it was my mistake when defined the date column.
Terisa de morgan is offline   Reply With Quote
Old 11-23-2020, 10:38 AM   #29
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,096
Karma: 7908993
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by capink View Post
When applying templates to date columns the formatting depends on the formatting value of the date column itself. So, make the template "program: today()" and modify the formatting in your column (preferences > add you own columns > double click on column > format for dates).
I am not sure if this is relevant, but if you use raw_field() instead of field() the format in the column definition is ignored. You get the date in 'iso' format.
chaley is offline   Reply With Quote
Old 11-23-2020, 11:20 AM   #30
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 chaley View Post
I am not sure if this is relevant, but if you use raw_field() instead of field() the format in the column definition is ignored. You get the date in 'iso' format.
In this case we are actually trying to write a template output into a date column. The result of the template is parsed by parse_date before it is written into the date column. Your tip about raw_field certainly applies, but only if we are getting the date value from another date column — which is not always the case — but if it is the case, your way would be the most straightforward way of doing it.
capink is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Action Chains Resources capink Plugins 66 11-10-2024 08:13 PM
[Editor Plugin] Editor Chains capink Plugins 94 07-03-2024 08:26 PM
[GUI Plugin] Noosfere_util, a companion plugin to noosfere DB lrpirlet Plugins 2 08-18-2022 04:15 PM
[GUI Plugin] Save Virtual Libraries To Column (GUI) chaley Plugins 14 04-04-2021 06:25 AM


All times are GMT -4. The time now is 08:00 AM.


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