Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 11-20-2020, 02:01 PM   #1
capink
Groupie
capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.
 
Posts: 155
Karma: 46940
Join Date: Aug 2015
Device: Kindle
[GUI Plugin] Action Chains

This plugin is built on top of the Open With plugin. Using it you can define action chains that can be run from menu entries or an assigned keyboard shortcut. A chain can contain one or more action(s) that are run sequentially.

Warnings:
  • This plugin is currently in development and is not suitable for use on your everyday calibre library. Use it only in a test library until all problems are discovered and solved. There are some actions there that modify books, so be careful and always have a backup.

Available Actions:
The plugin defines some builtin actions you can use, it also provides a module editor where you can write your own actions using python.
  • Open With: Similar to the open with plugin, but with some modifications. Used in this plugin it allows you to chain it to other actions. e.g. update timestamps
  • Single Field Edit: Allows you to edit the value of a single field for selected books. You can choose the value at run-time, or use a predefined value, or define a template.
  • Search and replace: This action is based on calibre's search and replace and have the same interface, only difference is that it allows you define the values ahead of time in your chain. At run-time, it gets the predefined search/replace values and executes them, giving you the ability to chain it to multiple other actions (other search/replace or other actions).
  • Calibre Actions: This action allows you to choose an action from calibre interface actions, for the purpose of chaining it to other actions.

    For a variety of reasons, this is not the ideal way to use actions, The main use for me is to timestamp certain calibre actions. For more on this, read the limitation section below.
  • Selection Modifier: This action is useful when chaining actions together as it allows you to change the selections in calibre before an action. There are multiple criteria for modifying the selections. More on this below.
  • Copy to Clipboard: copy book metadata for selected books to clipboard. You choose the data copied by defining a template.

Limitations:
  • All the actions are run one after another in the same order they were defined. Currently there is no way to change the control flow.
  • Calibre Actions does expose most of calibre interface actions, but not all of them are suitable for use with this plugin. The reason is that some of these actions have their own progress bar, so they run the code on a different thread. So whenever you use an of these actions, the next action in the chain will start before they finish because they are on a different thread.

    Some other actions, like convert books, run one or more jobs, so the same problem is happening here. There is no way to run these action sequentially with other actions. They can only be used as the last action in a chain.

    Some other actions pop up dialogs so they might not be suitable for use mid-chain. This is why I added the search and replace action to avoid this happening.

    I have removed some of these actions like add books, remove books, convert books. But I cannot hunt down every possible action that might cause such problems, so you always have to test before using them.

    The best way for someone wanting to use one of these removed calibre action, is to write a custom action using the module editor.
  • The chain runs in the main gui thread because some actions cannot happen in a thread other than that of the main gui. As a result, the abort button for the progress bar (which is displayed in the status bar) is non responsive, so I removed it. There is currently no way to stop the chain midway.

How to use the plugin:

To make a new chain follow these steps:
  • From the drop-down menu choose the customize plugin entry to open the config dialog.
  • In the config dialog press the add button to add a new empty chain.
  • Double click on the name field to give the new chain a name, and optionally choose a sub-menu and an icon.
  • To start adding actions to the chain, press the settings button in the chain row, which will open the add actions dialog.
  • In the add actions dialog, press on the add action button. After this choose and action you want from the actions combo-box. Press the action settings button configure the action.
  • Repeat for all actions you want to add, and then press OK.

Suggested Use Cases:

Here are some tips to help get you started:
  • Chaining multiple search/replace actions to together.
  • Adding a chain to edit the rating value and applying a custom last_rated_date timestamps afterwards. For this chain, you need two actions:
    • for the first action select Single Field Action and configure it by choosing the rating field and ticking the option to ask for value at run-time.
    • Add a second Single Field Action to apply the timestamps to your custom last rated date field. This time set it to a predefined value, then check the option "set to current time".
    Whenever you run this action through the menu or a keyboard shortcut, a rating dialog editor will pop up, choose the rating you want and it will apply to all selected books together with the timestamps.
  • You can take the above idea one step further, by defining 5 chains and assigning each one to a different keyboard shortcut. In each of those chain, instead of letting the chain ask you for a value at run-time, specify a predefined value for each chain, starting with value of ★ for the first chain and repeating for the others until you reach ★★★★★ for the last chain. Each chain can contain an extra action for timestamps as in the previous example. Now you can rate your books with configured shortcuts. To make this easier, there is a copy button that allows you to copy chains.
  • You can use the edit metadata form Calibre Actions, together with a Single Field Action to modify a custom last_modified column afterwards. Note, however, that you need to add a Selection Modifier Action in-between and set it to select books modified by last action. More on this in the note about the Selection modifier below.

    You can use this action exclusively for editing book metadata, and it will update you custom last modified date column, which unlike calibre's last modified column, will not be subject to change by other actions like adding custom columns or changes in the tag editor.

    This will not cover other situations like bulk metadata download action for instance as this action starts a background job and is not suitable for use in chains.

    Note: you need to insert the selection modifier even if you are using a single metadata edit dialog, as this dialog can change selections through the next and previous buttons, and by applying the selection modifier, it will select all books whose metadata have been updated.
  • You can use the template feature in the Single Field Action to setup persistent composite columns. Note however that while it might improve performance for huge libraries, you lose the convenience of composite columns being updated automatically, so you will have to run the chain periodically to update them.
  • A chain does not have to contain multiple actions, you can have a chain with only one action. For example you can have multiple chains for different copy to clipboard templates. As an example, if you want to copy a format (e.g. epub) path to clipboard, create a chain containing a single copy to clipboard action with the following template:
    Code:
    program: select(formats_paths(),'EPUB')

Note on the Selection Modifier Action:
  • Since all the actions are selection dependent, the Modifier Selection Action gives you the option to change the current selection ahead of any action. You can choose only books modified by previous action, or you can specify search criteria to further narrow down you selections
  • If you choose a search to narrow down you selection, this will only change the current view of calibre to results of this search, so you need tick option "select all books in current view" together with the search.
  • Some actions may affect only some of the selected books. For example if you use the bulk metadata editor to remove certain tags, this action will only affect books that have that tags. If you want your next action to apply only to modified books (e.g. you want to add timestamp to only modified books), add a Selection Modifier to change the selections to "books modified by last action"

Note on Module Editor:
  • For information on how to write your own actions, see the comments in calibre_plugins.action_chains.actions.base
  • Instead of making a plugin for every small task you want, you can use the module to add a custom action and add it to its own chain, which will get its own menu entry.
  • For examples on how to write a simple custom action, see here. Another example that illustrate how to add a settings dialog to a custom action can be found here.

Credits:
  • The icon dialog and the dynamic menus for chains are based on code from the Open With plugin by kiwidude.
  • The Calibre Actions is based on code from the Favourites Menu plugin by kiwidude.
  • The module editor is based on calibre editor function editor by Kovid Goyal.
  • The Search and Replace Action is based on calibre's search and replace. (chaley and Kovid Goyal)

Installation Notes:
Special Notes:
  • Requires Calibre 5.0.0 or later.

Version History:
Spoiler:

Version 0.1.0 - 16 November 2020 - made by capink
Initial Release.

Version 0.1.1 - 20 November 2020 - made by capink
Fix: Problem with pre-defined dates set to today.

Version 0.1.2 - 27 November 2020 - made by capink
Update: Add marked column to single field edit action.
Fix: Error when changing action because settings of the old action linger and cause validation error with the new action.
Fix: Turn off the wait cursor temporarily while single edit field dialog are on.
Fix: Refresh gui after running chain.
Fix: Error with caliber's show marked books.

Attached Thumbnails
Click image for larger version

Name:	1.png
Views:	3
Size:	48.8 KB
ID:	183718   Click image for larger version

Name:	2.png
Views:	2
Size:	62.0 KB
ID:	183719   Click image for larger version

Name:	3.png
Views:	4
Size:	36.3 KB
ID:	183720   Click image for larger version

Name:	4.png
Views:	3
Size:	84.0 KB
ID:	183721   Click image for larger version

Name:	5.png
Views:	4
Size:	49.9 KB
ID:	183722   Click image for larger version

Name:	6.png
Views:	2
Size:	32.4 KB
ID:	183723   Click image for larger version

Name:	7.png
Views:	2
Size:	44.7 KB
ID:	183724   Click image for larger version

Name:	8.png
Views:	2
Size:	19.9 KB
ID:	183725   Click image for larger version

Name:	9.png
Views:	2
Size:	38.2 KB
ID:	183726  
Attached Files
File Type: zip Action Chains_0.1.2.zip (88.0 KB, 40 views)

Last edited by capink; Yesterday at 01:24 PM. Reason: version 0.1.2
capink is online now   Reply With Quote
Old 11-20-2020, 05:18 PM   #2
capink
Groupie
capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.
 
Posts: 155
Karma: 46940
Join Date: Aug 2015
Device: Kindle
New test version.
Attached Files
File Type: zip Action Chains_0.2.1.zip (99.2 KB, 24 views)

Last edited by capink; 11-30-2020 at 08:20 PM.
capink is online now   Reply With Quote
Old 11-20-2020, 11:39 PM   #3
ownedbycats
Wizard
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.
 
Posts: 1,179
Karma: 345192
Join Date: Oct 2018
Device: Kobo Aura HD
This sounds almost like an exact solution to my post here. Definitely giving it a try.

Early feedback: One small feature that seems to be missing is the ability to add a descriptor/label to actions.

Works pretty well otherwise though. I'm experimenting with the selection modifier so I don't have separate actions for AO3 and FFNet fics.

Also, I found it's helpful to add a Calibre Action to toggle mark on all the books before starting a chain, and then at the very end setting a search to marked:true.

A small suggestion: It might be a good idea to have a custom action to prompt for confirmation for more...destructive action chains, and pressing "no" would halt the entire thing. I guess this could be made with a module though I'm not sure how.

Last edited by ownedbycats; 11-21-2020 at 02:46 AM.
ownedbycats is offline   Reply With Quote
Old 11-21-2020, 08:52 AM   #4
capink
Groupie
capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.
 
Posts: 155
Karma: 46940
Join Date: Aug 2015
Device: Kindle
Quote:
Originally Posted by ownedbycats View Post
Early feedback: One small feature that seems to be missing is the ability to add a descriptor/label to actions.
Yes. I realized this after I've done it. First I needed to change the order of some actions, so I added drag and drop, but it is not perfect because it does not have visual indication of what is being dragged. So I thought adding identifiers might help.

I am thinking about rewriting it as a table to add identifiers and make changing order easier.

Quote:
Originally Posted by ownedbycats View Post
Also, I found it's helpful to add a Calibre Action to toggle mark on all the books before starting a chain, and then at the very end setting a search to marked:true.
Nice. At least some extra use for Calibre Actions

Quote:
Originally Posted by ownedbycats View Post
A small suggestion: It might be a good idea to have a custom action to prompt for confirmation for more...destructive action chains, and pressing "no" would halt the entire thing. I guess this could be made with a module though I'm not sure how.
As I pointed out in first post, I have not yet settled on how to deal with the control flow. But your request is simple enough to be used as demonstration of how to write custom actions, so here it is:

Code:
from PyQt5.Qt import QWidget, QVBoxLayout, QGroupBox, QTextEdit

from calibre.gui2 import question_dialog
from calibre_plugins.action_chains.actions.base import ChainAction

class ConfirmConfigWidget(QWidget):
    def __init__(self, plugin_action):
        QWidget.__init__(self)
        self._init_controls()

    def _init_controls(self):

        l = QVBoxLayout()
        self.setLayout(l)

        gb = QGroupBox('Confirm message')
        gb_l = QVBoxLayout()
        gb.setLayout(gb_l)

        self.tb = QTextEdit()
        self.tb.insertPlainText('Are you sure you want to proceed?')

        gb_l.addWidget(self.tb)
        l.addWidget(gb)

    def load_settings(self, settings):
        if settings:
            self.tb.setText(settings['message'])

    def save_settings(self):
        settings = {}
        settings['message'] = self.tb.toPlainText()
        return settings

class ConfirmAction(ChainAction):

    name = 'Confirm'

    def config_widget(self):
        return ConfirmConfigWidget

    def run(self, gui, settings, chain_loop):
        message = settings.get('message', 'Are you sure you want to proceed?')
        if not question_dialog(gui, _('Are you sure?'), message, show_copy_button=False):
            raise chain_loop.UserInterrupt

Last edited by capink; 11-21-2020 at 08:23 PM. Reason: typos
capink is online now   Reply With Quote
Old 11-21-2020, 03:41 PM   #5
ownedbycats
Wizard
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.
 
Posts: 1,179
Karma: 345192
Join Date: Oct 2018
Device: Kobo Aura HD
Here's a small glitch I found:

Single Field Edit > Predefined Value > Today on a timestamp column seems to have trouble with timezones.

I'm -4:00 GMT, and running an action at 3:30 pm produces a timestamp of 7:30 pm. Not sure what would happen if I ran it when the timezones are on different dates.

EDIT: Actually, it seems to produce timestamps of the time that the action was created....not the time it was run. Odd.
Attached Thumbnails
Click image for larger version

Name:	2020-11-21 15_35_12-Single Field Edit.png
Views:	20
Size:	11.2 KB
ID:	183508  

Last edited by ownedbycats; 11-21-2020 at 03:51 PM.
ownedbycats is offline   Reply With Quote
Old 11-21-2020, 04:09 PM   #6
capink
Groupie
capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.
 
Posts: 155
Karma: 46940
Join Date: Aug 2015
Device: Kindle
Quote:
Originally Posted by ownedbycats View Post
Here's a small glitch I found:

Single Field Edit > Predefined Value > Today on a timestamp column seems to have trouble with timezones.

I'm -4:00 GMT, and running an action at 3:30 pm produces a timestamp of 7:30 pm. Not sure what would happen if I ran it when the timezones are on different dates.

EDIT: Actually, it seems to produce timestamps of the time that the action was created....not the time it was run. Odd.
Sorry. I made a last minute change before posting that altered it. Can you try this one attached here and report back on it.

Edit: You will have to remove the action and add it again.

Last edited by capink; 11-21-2020 at 04:32 PM. Reason: attached version moved to first post
capink is online now   Reply With Quote
Old 11-21-2020, 04:18 PM   #7
ownedbycats
Wizard
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.
 
Posts: 1,179
Karma: 345192
Join Date: Oct 2018
Device: Kobo Aura HD
Trying to run/edit an existing action changing a datetime column failed with an error, but creating a new one worked with the proper timestamp. Here's the error in case you need it anyways:

Code:
calibre, version 5.5.0
ERROR: Unhandled exception: <b>TypeError</b>:cannot unpack non-iterable datetime.datetime object

calibre 5.5 [64bit]  embedded-python: True is64bit: True
Windows-10-10.0.19041 Windows ('64bit', 'WindowsPE')
('Windows', '10', '10.0.19041')
Python 3.8.5
Windows: ('10', '10.0.19041', '', 'Multiprocessor Free')
Interface language: None
Successfully initialized third party plugins: Action Chains (0, 1, 0) && Barnes & Noble (1, 2, 16) && Calibre Power Search Plugin (1, 7, 0) && CalibreSpy (1, 0, 83) && Comments Cleaner (1, 3, 0) && Count Pages (1, 11, 0) && Drop Search Results (1, 0, 10) && Embed Comic Metadata (1, 5, 2) && EpubCheck (0, 2, 3) && EpubMerge (2, 11, 0) && Extract ISBN (1, 5, 0) && FanFicFare (3, 25, 8) && Fantastic Fiction (1, 4, 0) && Favourites Menu (1, 0, 5) && Find Duplicates (1, 8, 3) && Generate Cover (2, 0, 0) && GetFileName (0, 1, 1) && Goodreads (1, 5, 1) && Import List (1, 5, 1) && Job Spy (1, 0, 188) && Kindle hi-res covers (0, 5, 0) && Kobo Books (1, 8, 0) && Kobo Utilities (2, 11, 8) && KoboTouchExtended (3, 4, 1) && Library Codes (1, 0, 47) && Manage Series (1, 2, 11) && Modify ePub (1, 6, 1) && MultiColumnSearch (1, 0, 85) && Open With (1, 5, 13) && Quality Check (1, 10, 1) && Reading List (1, 7, 1) && Save To Format (0, 0, 6) && SmartEject (2, 3, 0) && Sum Column (0, 3, 1) && View Manager (1, 6, 0)
Traceback (most recent call last):
  File "calibre_plugins.action_chains.action", line 209, in run_chain
  File "calibre_plugins.action_chains.chain_tools", line 96, in run_loop
  File "calibre_plugins.action_chains.chain_tools", line 79, in run_loop
  File "calibre_plugins.action_chains.actions.single_field", line 378, in run
  File "calibre_plugins.action_chains.dialogs.single_field_widgets", line 1009, in setter
TypeError: cannot unpack non-iterable datetime.datetime object
ownedbycats is offline   Reply With Quote
Old 11-21-2020, 04:26 PM   #8
capink
Groupie
capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.
 
Posts: 155
Karma: 46940
Join Date: Aug 2015
Device: Kindle
Quote:
Originally Posted by ownedbycats View Post
Trying to run/edit an existing action changing a datetime column failed with an error, but creating a new one worked with the proper timestamp. Here's the error in case you need it anyways:

Code:
calibre, version 5.5.0
ERROR: Unhandled exception: <b>TypeError</b>:cannot unpack non-iterable datetime.datetime object

calibre 5.5 [64bit]  embedded-python: True is64bit: True
Windows-10-10.0.19041 Windows ('64bit', 'WindowsPE')
('Windows', '10', '10.0.19041')
Python 3.8.5
Windows: ('10', '10.0.19041', '', 'Multiprocessor Free')
Interface language: None
Successfully initialized third party plugins: Action Chains (0, 1, 0) && Barnes & Noble (1, 2, 16) && Calibre Power Search Plugin (1, 7, 0) && CalibreSpy (1, 0, 83) && Comments Cleaner (1, 3, 0) && Count Pages (1, 11, 0) && Drop Search Results (1, 0, 10) && Embed Comic Metadata (1, 5, 2) && EpubCheck (0, 2, 3) && EpubMerge (2, 11, 0) && Extract ISBN (1, 5, 0) && FanFicFare (3, 25, 8) && Fantastic Fiction (1, 4, 0) && Favourites Menu (1, 0, 5) && Find Duplicates (1, 8, 3) && Generate Cover (2, 0, 0) && GetFileName (0, 1, 1) && Goodreads (1, 5, 1) && Import List (1, 5, 1) && Job Spy (1, 0, 188) && Kindle hi-res covers (0, 5, 0) && Kobo Books (1, 8, 0) && Kobo Utilities (2, 11, 8) && KoboTouchExtended (3, 4, 1) && Library Codes (1, 0, 47) && Manage Series (1, 2, 11) && Modify ePub (1, 6, 1) && MultiColumnSearch (1, 0, 85) && Open With (1, 5, 13) && Quality Check (1, 10, 1) && Reading List (1, 7, 1) && Save To Format (0, 0, 6) && SmartEject (2, 3, 0) && Sum Column (0, 3, 1) && View Manager (1, 6, 0)
Traceback (most recent call last):
  File "calibre_plugins.action_chains.action", line 209, in run_chain
  File "calibre_plugins.action_chains.chain_tools", line 96, in run_loop
  File "calibre_plugins.action_chains.chain_tools", line 79, in run_loop
  File "calibre_plugins.action_chains.actions.single_field", line 378, in run
  File "calibre_plugins.action_chains.dialogs.single_field_widgets", line 1009, in setter
TypeError: cannot unpack non-iterable datetime.datetime object
I put the bulk edit widget erroneously in place of the config widget. So any single field action containing timestamps will need to be deleted and re-added again.

Edit: I updated the first post to include the fixed version. Please note that any single field action with date columns will have to be removed and re-added again.

Last edited by capink; 11-21-2020 at 04:29 PM.
capink is online now   Reply With Quote
Old 11-21-2020, 04:30 PM   #9
ownedbycats
Wizard
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.
 
Posts: 1,179
Karma: 345192
Join Date: Oct 2018
Device: Kobo Aura HD
Thankfully I only have the one. "Mark as Read" sets #read to yes, #percentread to 100, #lastread to the current time, and pops up a rating dialog.
ownedbycats is offline   Reply With Quote
Old 11-22-2020, 06:17 AM   #10
jbacelar
Interested in the matter
jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.
 
jbacelar's Avatar
 
Posts: 351
Karma: 426094
Join Date: Dec 2011
Location: Spain, south coast
Device: Pocketbook Touch HD
I've tried it with a fairly long searchs and replaces chain, and it works like a charm (ugh! what a break).

Quote:
Originally Posted by capink View Post
I am thinking about rewriting it as a table to add identifiers and make changing order easier.
That will be very useful.

Congratulations! and thank you very much for this magnificent work.
jbacelar is offline   Reply With Quote
Old 11-22-2020, 09:25 AM   #11
capink
Groupie
capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.
 
Posts: 155
Karma: 46940
Join Date: Aug 2015
Device: Kindle
Quote:
Originally Posted by jbacelar View Post
I've tried it with a fairly long searchs and replaces chain, and it works like a charm (ugh! what a break).
Glad it is of help to you.

Quote:
Originally Posted by jbacelar View Post
That will be very useful.
I will see about this. The current view has the advantage of integrating better with error messages. I am still trying to figure the best way to do this.

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.
capink is online now   Reply With Quote
Old 11-22-2020, 09:32 AM   #12
capink
Groupie
capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.
 
Posts: 155
Karma: 46940
Join Date: Aug 2015
Device: Kindle
Quote:
Originally Posted by ownedbycats View Post
Thankfully I only have the one. "Mark as Read" sets #read to yes, #percentread to 100, #lastread to the current time, and pops up a rating dialog.
After you are done exploring you should come back and write your own use cases .

One suggestion though, put the rating dialog action first and put a selection modifier with the option "select books modified by last action" right below it, and after that put all the other actions. This way if you press the cancel button on the rating dialog for whatever reason, the rest of actions are not carried out since there are no selection.
capink is online now   Reply With Quote
Old 11-22-2020, 11:29 AM   #13
compurandom
Guru
compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.
 
Posts: 613
Karma: 294342
Join Date: Jun 2015
Device: kobo aura h2o, kobo forma
Haven't tried this plugin yet, but it looks really useful!

Quote:
Originally Posted by capink View Post
"select books modified by last action"
How about in addition to select books, you mark books with tag and take a user supplied tag.

This would let you search for marked:usertag after the chain ran to select subsets from different actions within the chain or maybe even reuse previous results within the chain.
compurandom is offline   Reply With Quote
Old 11-22-2020, 12:14 PM   #14
capink
Groupie
capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.
 
Posts: 155
Karma: 46940
Join Date: Aug 2015
Device: Kindle
Quote:
Originally Posted by compurandom View Post
Haven't tried this plugin yet, but it looks really useful!



How about in addition to select books, you mark books with tag and take a user supplied tag.

This would let you search for marked:usertag after the chain ran to select subsets from different actions within the chain or maybe even reuse previous results within the chain.
Nice idea. I was actually thinking about how to revert to selections from previous actions. My initial thought was to store the selections somewhere. But your idea also works. If calibre mark tool allowed for marking with text, it would have been easy to use it from the "Calibre Action" action.
capink is online now   Reply With Quote
Old 11-22-2020, 12:50 PM   #15
compurandom
Guru
compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.
 
Posts: 613
Karma: 294342
Join Date: Jun 2015
Device: kobo aura h2o, kobo forma
Quote:
Originally Posted by capink View Post
If calibre mark tool allowed for marking with text, it would have been easy to use it from the "Calibre Action" action.
I also wish I could see the list of text marks and select them from a menu.
I've thought about writing a plugin to do that, but haven't gotten around to it.
compurandom is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] KindleUnpack - The Plugin DiapDealer Plugins 456 10-23-2020 01:52 PM
[GUI Plugin] Save Virtual Libraries To Column (GUI) chaley Plugins 9 04-11-2020 08:14 AM
[GUI Plugin] Manga plugin mastertea Plugins 0 10-20-2019 03:45 PM
[GUI Plugin] Wordpress frescogamba Plugins 11 04-06-2015 10:09 PM
[GUI Plugin] Plugin Updater **Deprecated** kiwidude Plugins 159 06-19-2011 01:27 PM


All times are GMT -4. The time now is 01:15 PM.


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