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 Yesterday, 04:16 AM   #1
Lukusaukko
Connoisseur
Lukusaukko ought to be getting tired of karma fortunes by now.Lukusaukko ought to be getting tired of karma fortunes by now.Lukusaukko ought to be getting tired of karma fortunes by now.Lukusaukko ought to be getting tired of karma fortunes by now.Lukusaukko ought to be getting tired of karma fortunes by now.Lukusaukko ought to be getting tired of karma fortunes by now.Lukusaukko ought to be getting tired of karma fortunes by now.Lukusaukko ought to be getting tired of karma fortunes by now.Lukusaukko ought to be getting tired of karma fortunes by now.Lukusaukko ought to be getting tired of karma fortunes by now.Lukusaukko ought to be getting tired of karma fortunes by now.
 
Posts: 66
Karma: 392326
Join Date: Feb 2023
Device: Kobo Libra 2
[Editor Plugin] Otter's Editing Toolbag

This started out as a personal fork of Diaps Editing Toolbag, and is now in a state where I feel others might benefit from it as well - so after checking in with DiapDealer and asking his opinion, this is now released to the public.

Disclosure: AI was used in the making of this plugin. The design decisions, iteration and testing is by humans.

The plugin has four tools: expanded Span/Div tool; expanded Smarten Punctuation that has customizable apostrophe mapping and some tweaks to the underlying Smartypants engine; Cleanup tool that can clean up bad apostrophes, normalize ellipses with the ellipse character with several style options and optional wrapping of plain text inside <p> tags (useful for PG ebooks); and CSS Cleanup that cleans up some of my pet peeves in CSS, like stripping named font families, Adobe/vendor-prefixed properties, or explicit colors (for my grayscale e-ink device, most color choices are bad or mess up the night mode).

Apostrophe mapping is something that has been on my mental wishlist for a long time, since smartening tools usually cannot do this properly - like render omitted letter contractions such as 'em with a closing single quote/apostrophe. They practically always render it with starting single quote. So this plugin has a feature where you can make specific rules about how to handle it: for example "@em -> ’em" converts all cases of em preceded by apostrophe-like character to closing single quote type apostrophe. You can also have different custom exception files so if you are working with something like Engiish Romantic poems you can define exceptions just for that and avoid accidentally changing words that could appear in normal text.

It also has tweaks for things like class of '79, '68 Mustang, and '90s (Smartypants has a special rule for decades, but it's broken). It can also handle DOM-boundary cases like <i>John</i>'s where most smartening engines fail because they cannot connect the apostrope after the closing tag to the preceding word.

So what else is different from Diaps Editing Toolbag:

- Modernized codebase with QT layouts to draw the GUI (this makes it possible to hide and show elements from the UI, so that even relatively complex possibilities don't clutter up the UI unnecessarily)

- Improved XHTML parsing and serialization with lxml, so even really messy documents with nasty case of deeply nested tag soup can be parsed reliably. Unless it's broken enough not to render in the first place, this should be able to deal with it.

Many of the concepts, user workflows, and portions of the codebase originated in DiapDealer's plugin, so special thanks to DiapDealer for the original project and for giving me permission for releasing my fork to the public.

More details can be found in the README included in the archive, and each tool has a comprehensive help button.

Current stable version: 0.4.2
Attached Files
File Type: zip otters-editing-toolbag.zip (75.7 KB, 8 views)

Last edited by Lukusaukko; Today at 09:48 AM.
Lukusaukko is online now   Reply With Quote
Old Yesterday, 04:16 AM   #2
Lukusaukko
Connoisseur
Lukusaukko ought to be getting tired of karma fortunes by now.Lukusaukko ought to be getting tired of karma fortunes by now.Lukusaukko ought to be getting tired of karma fortunes by now.Lukusaukko ought to be getting tired of karma fortunes by now.Lukusaukko ought to be getting tired of karma fortunes by now.Lukusaukko ought to be getting tired of karma fortunes by now.Lukusaukko ought to be getting tired of karma fortunes by now.Lukusaukko ought to be getting tired of karma fortunes by now.Lukusaukko ought to be getting tired of karma fortunes by now.Lukusaukko ought to be getting tired of karma fortunes by now.Lukusaukko ought to be getting tired of karma fortunes by now.
 
Posts: 66
Karma: 392326
Join Date: Feb 2023
Device: Kobo Libra 2
Testing versions:

0.4.3
  • adds multicolumn span/div customization interface
  • import tag settings from Diaps Editing Toolbag
Attached Files
File Type: zip otters-editing-toolbag_0.4.3.zip (77.2 KB, 0 views)

Last edited by Lukusaukko; Today at 09:38 AM.
Lukusaukko is online now   Reply With Quote
Advert
Old Yesterday, 10:33 AM   #3
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: 84,505
Karma: 153744815
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
You should (IMHO) change the UI so goes width instead of height like the original. Most screens are wider then they are high.

One other suggestion is to read the configuration from the original plugin and transfer the customizations to the new plugin.

Last edited by JSWolf; Yesterday at 10:48 AM.
JSWolf is offline   Reply With Quote
Old Today, 02:16 AM   #4
Lukusaukko
Connoisseur
Lukusaukko ought to be getting tired of karma fortunes by now.Lukusaukko ought to be getting tired of karma fortunes by now.Lukusaukko ought to be getting tired of karma fortunes by now.Lukusaukko ought to be getting tired of karma fortunes by now.Lukusaukko ought to be getting tired of karma fortunes by now.Lukusaukko ought to be getting tired of karma fortunes by now.Lukusaukko ought to be getting tired of karma fortunes by now.Lukusaukko ought to be getting tired of karma fortunes by now.Lukusaukko ought to be getting tired of karma fortunes by now.Lukusaukko ought to be getting tired of karma fortunes by now.Lukusaukko ought to be getting tired of karma fortunes by now.
 
Posts: 66
Karma: 392326
Join Date: Feb 2023
Device: Kobo Libra 2
Quote:
Originally Posted by JSWolf View Post
You should (IMHO) change the UI so goes width instead of height like the original. Most screens are wider then they are high.
One other suggestion is to read the configuration from the original plugin and transfer the customizations to the new plugin.
This is mostly an issue with the customization UI, right? Since the other dialogs are quite small and never get that all that big, but the customization UI can get long since it adds a new UI row for each tag. With the custom tag/attribute dropdown options, I ended up not using the customization interface all that much - unlike with Diap's original where you needed to add custom tags to edit them, here the role of the dialog is more like "these are the tags I use most often, and want to include them as shortcuts" and you'd use the custom options to modify rarely touched tags/attributes.
Lukusaukko is online now   Reply With Quote
Old Today, 07:37 AM   #5
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: 84,505
Karma: 153744815
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
I did customize Diap's and I had to copy over the customization from there. However, I found the UI to be clunky because it's vertical instead of horizontal.

Since those that would be using your plugin are most likey already using Diap's. So being able to read Diap's settings and apply them would make it a lot easier to setup your plugin.
JSWolf is offline   Reply With Quote
Advert
Old Today, 09:43 AM   #6
Lukusaukko
Connoisseur
Lukusaukko ought to be getting tired of karma fortunes by now.Lukusaukko ought to be getting tired of karma fortunes by now.Lukusaukko ought to be getting tired of karma fortunes by now.Lukusaukko ought to be getting tired of karma fortunes by now.Lukusaukko ought to be getting tired of karma fortunes by now.Lukusaukko ought to be getting tired of karma fortunes by now.Lukusaukko ought to be getting tired of karma fortunes by now.Lukusaukko ought to be getting tired of karma fortunes by now.Lukusaukko ought to be getting tired of karma fortunes by now.Lukusaukko ought to be getting tired of karma fortunes by now.Lukusaukko ought to be getting tired of karma fortunes by now.
 
Posts: 66
Karma: 392326
Join Date: Feb 2023
Device: Kobo Libra 2
Quote:
Originally Posted by JSWolf View Post
I did customize Diap's and I had to copy over the customization from there. However, I found the UI to be clunky because it's vertical instead of horizontal.

Since those that would be using your plugin are most likey already using Diap's. So being able to read Diap's settings and apply them would make it a lot easier to setup your plugin.
Please check the second post in this thread, where I've uploaded a new testing version.

I have now added a button to import the settings from Diaps, but you have to browse to diaps_editing_toolbag_SpanDivEdit_settings.json file manually.

The customization interface is now based on 10 rows, and once it goes past that, it will add another column, so it will expand width-wise (may add a setting for number of rows later).

If you are willing to test it, please do - as I hardly use it, my test case was quite small, but it should work with larger files as well.
Lukusaukko is online now   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Editor Plugin] Editor Chains capink Plugins 133 08-10-2026 05:22 PM
[Editor Plugin] Diap's Editing Toolbag DiapDealer Plugins 215 06-06-2026 09:26 AM
[Editor Plugin] Bulk Image Resizer Plugin eliteart Plugins 11 10-27-2024 03:47 PM
[Editor Plugin] - Enabling 'Customize plugin' dialog directly from the Editor thiago.eec Development 7 01-09-2019 08:05 PM
Diaps Editing Toolbag.zip Index Error phossler Editor 2 10-01-2014 08:05 PM


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


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