![]() |
#61 | ||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,133
Karma: 1954142
Join Date: Aug 2015
Device: Kindle
|
Quote:
Quote:
I will see what I can do about this. |
||
![]() |
![]() |
![]() |
#62 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,177
Karma: 62872491
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
By the way, I switched back to "Show Marked Books" and did a few tests. It seems to be behaving for the most part.
![]() |
![]() |
![]() |
Advert | |
|
![]() |
#63 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,133
Karma: 1954142
Join Date: Aug 2015
Device: Kindle
|
Quote:
![]() Code:
marked:true Code:
marked:mytext |
|
![]() |
![]() |
![]() |
#64 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,133
Karma: 1954142
Join Date: Aug 2015
Device: Kindle
|
Making columns movable turned out to be straightforward. I just set a property and qt takes care of the rest. So, it will be in the next release.
Last edited by capink; 11-30-2020 at 06:22 PM. |
![]() |
![]() |
![]() |
#65 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,133
Karma: 1954142
Join Date: Aug 2015
Device: Kindle
|
Custom action to trim covers from selected books
Code:
from functools import partial from PyQt5.Qt import (QApplication, Qt) from calibre.gui2 import error_dialog from calibre_plugins.action_chains.common_utils import DoubleProgressDialog from calibre_plugins.action_chains.actions.base import ChainAction class TrimCover(ChainAction): name = 'Trim Cover' support_scopes = True def trim_covers(self, db, book_ids, pbar): from calibre.utils.img import ( image_from_data, image_to_data, remove_borders_from_image ) pbar.update_overall(len(book_ids)) for book_id in book_ids: cdata = db.new_api.cover(book_id) if cdata: img = image_from_data(cdata) nimg = remove_borders_from_image(img) if nimg is not img: cdata = image_to_data(nimg) db.new_api.set_cover({book_id:cdata}) msg = _('Trimming cover for book_id: {}'.format(book_id)) pbar.update_progress(1, msg) def run(self, gui, settings, chain): db = gui.current_db book_ids = chain.scope().get_book_ids() callback = partial(self.trim_covers, db, book_ids) pd = DoubleProgressDialog(1, callback, gui, window_title=_('Trimming ...')) gui.tags_view.blockSignals(True) QApplication.setOverrideCursor(Qt.ArrowCursor) try: pd.exec_() pd.thread = None if pd.error is not None: return error_dialog(gui, _('Failed'), pd.error[0], det_msg=pd.error[1], show=True) finally: QApplication.restoreOverrideCursor() gui.tags_view.recount() Last edited by capink; 07-26-2021 at 02:46 PM. |
![]() |
![]() |
Advert | |
|
![]() |
#66 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,177
Karma: 62872491
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
Thank you!
What is the extra (default rightmost) column on the Customize Action Chains window for? |
![]() |
![]() |
![]() |
#67 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,133
Karma: 1954142
Join Date: Aug 2015
Device: Kindle
|
Quote:
Can be used in the future for some features I have in mind if necessary (filtering by tags and library availability). Edit: The customize actions dialog also supports swapping columns, it also saves the last state but only if you press OK, if you press cancel, it does not remember the column state. Last edited by capink; 11-30-2020 at 09:24 PM. |
|
![]() |
![]() |
![]() |
#68 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,177
Karma: 62872491
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
I know that JimmXinu had some problems with View Manager and keyboard shortcuts disappearing when switching between libraries, but he put in a pull request to fix that. You should look into that if it's something you plan to implement.
|
![]() |
![]() |
![]() |
#69 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,133
Karma: 1954142
Join Date: Aug 2015
Device: Kindle
|
I am aware of that, although I have not looked at the code yet. I am not sure if the way to go is to store the config in the library and use Jim's code, or it leave it in the json file as it is now, with and option to control library availability (default is available for all, with an option to turn on/off availability from within every library)
|
![]() |
![]() |
![]() |
#70 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 930
Karma: 418804
Join Date: Jun 2015
Device: Rocketbook, kobo aura h2o, kobo forma, kobo libra color
|
Presumably you haven't found any library destroying bugs. Would you feel comfortable publishing this plugin in the index yet?
|
![]() |
![]() |
![]() |
#71 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,133
Karma: 1954142
Join Date: Aug 2015
Device: Kindle
|
Yes. The plan is to ultimately publish this when I feel it has been tested enough without major issues.
Our of curiosity, since you frequent these forums, does it make a difference whether you get it from the thread or the updater? |
![]() |
![]() |
![]() |
#72 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 930
Karma: 418804
Join Date: Jun 2015
Device: Rocketbook, kobo aura h2o, kobo forma, kobo libra color
|
|
![]() |
![]() |
![]() |
#73 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,177
Karma: 62872491
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
The updater is fewer steps.
|
![]() |
![]() |
![]() |
#74 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,322
Karma: 12117215
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
|
I only want to say thank you for the plugin. I've changed a "small" detail and it's working in calibre 4. It has allowed to simplify a lot of repetitive simple edition, so it has been very useful for me.
|
![]() |
![]() |
![]() |
#75 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,133
Karma: 1954142
Join Date: Aug 2015
Device: Kindle
|
Quote:
![]() Open with action would not work with non-ascii paths, this together with my reluctance to test every change on both calibre 4 and 5 lead to it being released under calibre 5 only. I will try to code in way that keeps it compatible with python2 whenever possible. |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Editor Plugin] Editor Chains | capink | Plugins | 94 | 07-03-2024 07:26 PM |
Action Chains Resources | capink | Plugins | 65 | 07-01-2024 03:12 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 |