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 01-24-2017, 11:17 PM   #106
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,615
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by jackie_w View Post
Just FYI. Editor plugin items can show a submenu for both a Tool button and a Plugin menu item. A few of my own have a Config option which shows up in both places.
Thanks. I just saw that and added an edit to my previous post about it. I can do it, but it will be the same submenu checkbox from the Toolbar dropdown that many seem to find so vile and sneaky.

Last edited by DiapDealer; 01-24-2017 at 11:19 PM.
DiapDealer is offline   Reply With Quote
Old 01-24-2017, 11:19 PM   #107
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,685
Karma: 26966376
Join Date: Mar 2012
Location: Sydney Australia
Device: none
@DiapDealer - Re Tag Mechanic, I asked because after looking and not finding any drop downs I wondered if I might be missing out on something there too

Curious - why didn't you use same model - i.e. 'select the files' then 'apply the tool' - in the calibre PI.

I may have read the "This plugin operates ... before launching the plugin" instruction before using Tag Mechanic. But because my default mode is to select the data and then select the program I want to use on it, I may have just done it that way intuitively. I don't pick up a hammer and then look for a nail either

Added : there's little point in me reordering the tool bar icons, given I don't want to use tool bars.

BR

Last edited by BetterRed; 01-24-2017 at 11:23 PM.
BetterRed is offline   Reply With Quote
Old 01-24-2017, 11:33 PM   #108
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,615
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by BetterRed View Post
Curious - why didn't you use same model - i.e. 'select the files' then 'apply the tool' - in the calibre PI.
The plugin framework is just entirely different, is all. Calibre IS Python. Sigil runs Python as an entirely separate process for its plugins.

That... and this plugin was just written before Sigil even had a viable plugin framework. And I've gotten away from my calibre plugins a bit since I started helping with maintaining and improving Sigil. To be honest ... I have absolutely no idea if calibre's editor Tool has a "which html files are currently selected" function (though I'd be surprised if it didn't).

I'd have done this plugin differently if I had it to do over, but I just don't have the time or inclination to completely overhaul a working plugin. So I tweak what I can do quickly/easily and punt on anything that involves much refactoring. *shrug*

Quote:
Originally Posted by BetterRed View Post
Added : there's little point in me reordering the tool bar icons, given I don't want to use tool bars.
I was sort of wondering about that.

Last edited by DiapDealer; 01-24-2017 at 11:36 PM.
DiapDealer is offline   Reply With Quote
Old 01-24-2017, 11:35 PM   #109
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,685
Karma: 26966376
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by DiapDealer View Post
Thanks. I just saw that and added an edit to my previous post about it. I can do it, but it will be the same submenu checkbox from the Toolbar dropdown that many seem to find so vile and sneaky.
saw that

My main issue has been to have equivalent functionality via the traditional menu facility as is provided in the iconic toolbars. Whether that functionality is good, bad or indifferent is secondary/open to debate/moot...

BR
BetterRed is offline   Reply With Quote
Old 01-25-2017, 12:04 AM   #110
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,288
Karma: 11806357
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Quote:
Originally Posted by DiapDealer View Post
Patches welcome.
I have a question. I've modified the plugin for it to take care of the header tag in the same way that the section tag, as it appears more at the books. Would you mind to include those changes in a future release, if there is one? And if so, how can I send you the modified changes? If github is the way, I'll try to do it.
Terisa de morgan is online now   Reply With Quote
Old 01-25-2017, 07:13 AM   #111
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,615
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by Terisa de morgan View Post
I have a question. I've modified the plugin for it to take care of the header tag in the same way that the section tag, as it appears more at the books. Would you mind to include those changes in a future release, if there is one? And if so, how can I send you the modified changes? If github is the way, I'll try to do it.
Github pull requests are just the easiest way for ME to incorporate contributory changes. But adding a new tag isn't that time consuming. You don't have to set up a github account just for that. I'll take care of it.

The only thing I worry about is that the config dialog is already too tall to fit on the screen at lower resolutions (can't get to the OK/Cancel buttons). I may have to change how that data is presented for customization.
DiapDealer is offline   Reply With Quote
Old 01-25-2017, 07:16 AM   #112
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,288
Karma: 11806357
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Thank you very much, and you're right the dialog is long but, as I'm used... I get I'm not too picky about user interface.
Terisa de morgan is online now   Reply With Quote
Old 01-25-2017, 10:00 AM   #113
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,615
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
@Terisa: please checkout the attached beta version and see if it does what you asked for (I went ahead and added a few more common html5 tags as well). You may need to shrink the config widget a little the first use. I made it a two column layout to save space.

@BetterRed: the plugin's menu entry should now have the same functionality as the Toolbar entry. Users shouldn't have to use the Toolbar entry to configure the plugin any more. Please make sure that is the case.

@others: only the Span-Div editor tool has functional changes. Everything else is the same.

EDIT: Beta attachment removed

Last edited by DiapDealer; 01-29-2017 at 11:35 AM.
DiapDealer is offline   Reply With Quote
Old 01-25-2017, 10:11 AM   #114
dwig
Wizard
dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.
 
dwig's Avatar
 
Posts: 1,613
Karma: 6718541
Join Date: Dec 2004
Location: Paradise (Key West, FL)
Device: Current:Surface Go & Kindle 3 - Retired: DellV8p, Clie UX50, ...
Quote:
Originally Posted by DiapDealer View Post
... That everything that's not immediately intuitable (by all sentient creatures) by merely glancing at a UI is deemed an interface failure in this day and age, ...
This has always been the standard for GUI interface design. It is not new. It was old hat 30 years ago.
dwig is offline   Reply With Quote
Old 01-25-2017, 10:31 AM   #115
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,288
Karma: 11806357
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Quote:
Originally Posted by DiapDealer View Post
@Terisa: please checkout the attached beta version and see if it does what you asked for (I went ahead and added a few more common html5 tags as well). You may need to shrink the config widget a little the first use. I made it a two column layout to save space.
I'll try it this afternoon and I'll be back to you.
Terisa de morgan is online now   Reply With Quote
Old 01-25-2017, 10:34 AM   #116
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,615
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by dwig View Post
This has always been the standard for GUI interface design. It is not new. It was old hat 30 years ago.
Must've been in an alternate time-line then. In my universe, expecting every single feature, tool, and config option to be immediately apparent to a brand new user at first glance is a fairly new paradigm shift. That's why software came with books/documentation on how to unlock all its secrets. Only the simplest, least powerful tools have no learning curve, imo. If my plugin is "too hard" to use, no one will use it and it will eventually wither and die (as is natural and proper). In the meantime, I'm just not all that interested in making it completely "effortless" for anyone. It's still a tool I created primarily for my own use, after all.

Last edited by DiapDealer; 01-25-2017 at 10:48 AM.
DiapDealer is offline   Reply With Quote
Old 01-25-2017, 11:10 AM   #117
phossler
Wizard
phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.
 
Posts: 1,079
Karma: 412718
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
0.3.4 works OK here

How do I add another tag to the ones that are there already, e.g. <img>?

I assume that I have to edit (VERY carefully) a file?

Thanks
phossler is offline   Reply With Quote
Old 01-25-2017, 12:01 PM   #118
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,615
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by phossler View Post
0.3.4 works OK here

How do I add another tag to the ones that are there already, e.g. <img>?

I assume that I have to edit (VERY carefully) a file?

Thanks
It's not a straightforward process, actually. There are about four different locations within the code that need touched to add a tag.

Can I ask what you do with img tags that can't be accomplished fairly quickly with a normal search and replace? It's not that I'm opposed to adding it. I'm just trying to understand the usefulness. The tool was initially created to help modify/delete nestable tags that couldn't be easily achieved without parsing the html. Something that got extremely hairy even with regex, in other words.

If you're just trying to consolidate your favorite ebook tools into one "shed," that's understandable.
DiapDealer is offline   Reply With Quote
Old 01-25-2017, 12:30 PM   #119
phossler
Wizard
phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.
 
Posts: 1,079
Karma: 412718
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
Not worth it then. Terisa added <section> and it sounded easy, like editing a file

I experimented with adding a <section> block to a copy of diaps_editing_toolbag_SpanDivEdit_settings.json by copying another structure but it didn't work

I was cleaning a epub that had

Code:
<img alt...... file ...... class="something">
and thought that your PI is smart and could delete the class="something" only inside <img> tags

So as example from the screenshot, I thought I could edit the file to add "img" (instead of span) and add "" for a replace

A F&R would work but I was looking for an easy way to limit it to <img> without a complicated (= over my head) RegEx
Attached Thumbnails
Click image for larger version

Name:	Capture.JPG
Views:	237
Size:	49.5 KB
ID:	154480  

Last edited by phossler; 01-25-2017 at 12:37 PM.
phossler is offline   Reply With Quote
Old 01-25-2017, 01:15 PM   #120
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,288
Karma: 11806357
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Quote:
Originally Posted by phossler View Post
Not worth it then. Terisa added <section> and it sounded easy, like editing a file

I experimented with adding a <section> block to a copy of diaps_editing_toolbag_SpanDivEdit_settings.json by copying another structure but it didn't work

I was cleaning a epub that had

Code:
<img alt...... file ...... class="something">
and thought that your PI is smart and could delete the class="something" only inside <img> tags

So as example from the screenshot, I thought I could edit the file to add "img" (instead of span) and add "" for a replace

A F&R would work but I was looking for an easy way to limit it to <img> without a complicated (= over my head) RegEx
Yes, it's quite easy.. If you're a bit familiar with plugins and python. You have to modify the code, not the configuration file.
Terisa de morgan is online now   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sample Plugin for the Editor DiapDealer Editor 77 12-10-2014 07:16 AM
Diaps Editing Toolbag.zip Index Error phossler Editor 2 10-01-2014 08:05 PM
Editor plugin question DiapDealer Development 2 07-28-2014 10:23 PM
japi - a text editor capable of editing ePub directly hekkel ePub 5 02-20-2009 08:46 AM


All times are GMT -4. The time now is 04:27 AM.


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