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 01-25-2017, 01:25 PM   #121
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,535
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by phossler
and thought that your PI is smart and could delete the class="something" only inside <img> tags
It wouldn't work for that case even if the img tag was added. You can delete a tag (and its closing tag), you can change a tag to a different tag, and you can change all attributes of a tag to something else ... but the plugin doesn't currenty have the sophisication to alter/delete one particular attribute of a tag.

When it comes to attributes, you can either wipe them completely, copy the existing ones to a new tag, or you can replace all the attributes with something else (static), but you can't modify/delete one attribute while retaining the rest. I'm not "capturing" the attributes of each tag processed for reuse in a replace function.

In other words: if you wanted to delete the class attribute of all img tags of the class "blahblahblah", you'd have to delete ALL the attibutes of img tags of the class "blahblahblah". Probably not very handy.

Last edited by DiapDealer; 01-25-2017 at 01:30 PM.
DiapDealer is offline   Reply With Quote
Old 01-25-2017, 02:06 PM   #122
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,071
Karma: 412718
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
@Terisa - thanks, I'm 0% familiar with python and PI's

@DiapDealer -- gotcha - I'll just do it the regular way

I mostly use your PI to remove empty <span> and <div> tags and it works wonderfully for the basic things I do
phossler is offline   Reply With Quote
Old 01-25-2017, 02:29 PM   #123
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,227
Karma: 11768331
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
@Terisa - thanks, I'm 0% familiar with python and PI's
I wasn't at the beginning, but writing software was my job (now, only papers ) and one of my hobbies
Terisa de morgan is offline   Reply With Quote
Old 01-25-2017, 03:48 PM   #124
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,227
Karma: 11768331
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
I've checked, it works OK for me... and my config windows was already resized, so I think I've open it at some moment.

Thank you, it saves me to have to modify the plugin each time you publish a new plugin (not hard work in this case, more in other ones...)

And thank you for the plugin, I use it every time I clean a book in calibre (every book which goes to my reader).
Terisa de morgan is offline   Reply With Quote
Old 01-25-2017, 04:58 PM   #125
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,532
Karma: 26944418
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by DiapDealer View Post
@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.


Still think the Convert..., Edit..., and Smarten options should be in a Diap's Toolbag flyout - but that's presumably a PI framework issue, I can't think of another multipurpose calibre plugin.*

If I were to use this PI, rather than Tag Mechanic, I'd probably be Robinson Crusoe in wanting to use it from the menu rather than a toolbar So no need to do anything further for me.

* apart from Job Spy

BR
BetterRed is offline   Reply With Quote
Old 01-26-2017, 09:08 AM   #126
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,535
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by BetterRed View Post
Still think the Convert..., Edit..., and Smarten options should be in a Diap's Toolbag flyout - but that's presumably a PI framework issue, I can't think of another multipurpose calibre plugin*
That's entirely on me. The shiny, new Editor Plugin framework advertised the ability to create multiple Tools within one plugin, and I had to make sure it worked as advertised.

They really should be split into three separate plugins (and the Span Div Editor renamed to match the Sigil version), but that's a lot of work/time for something that would look and behave exactly as it did before from a user perspective. Maybe someday, though. *shrug*
DiapDealer is offline   Reply With Quote
Old 01-26-2017, 05:02 PM   #127
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,532
Karma: 26944418
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by DiapDealer View Post
That's entirely on me. The shiny, new Editor Plugin framework advertised the ability to create multiple Tools within one plugin, and I had to make sure it worked as advertised.

They really should be split into three separate plugins (and the Span Div Editor renamed to match the Sigil version), but that's a lot of work/time for something that would look and behave exactly as it did before from a user perspective. Maybe someday, though. *shrug*


Never liked Swiss army knives. Whenever I needed to pick a stone from Dobbin's offside front hoof, the wife was invariably using the bodkin to skin a rabbit for the evening stew - or filing her nails

BR
BetterRed is offline   Reply With Quote
Old 01-29-2017, 11:41 AM   #128
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,535
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Another beta version for testing.

Changes to all three tools:
The configuration dialog is available via the plugin menu as well as the Toolbar menus.


Changes to the Span/Div Editor tool:

1) the consolidation of tons redundant code--all of which makes it easier to maintain and dead-simple to add new tags.

2) made the tag/attribute customization dialog dynamically multi-column so it still fits on lower-resolution screens.

3) fixed a bug that would butcher html comments under certain conditions.

If someone could please verify that I didn't inadvertently break something else with my changes before I update the first post with the new version, I'd appreciate it.

EDIT: Removed beta attachment and published new version to first post.

Last edited by DiapDealer; 01-30-2017 at 03:49 PM.
DiapDealer is offline   Reply With Quote
Old 02-04-2017, 03:14 PM   #129
pmorris
Member
pmorris began at the beginning.
 
Posts: 21
Karma: 10
Join Date: Mar 2008
Location: Yucca Valley, California
Device: Kindle Keyboard (K3)
Uh, I'm probably being very shortsighted, but... how does it work now? When I click on the plugin (in Calibre), I am given a choice of checking or unchecking a box for single or (I presume) multiple files, and Customization, with a plethora of options(?). But I do not see how to identify what I specifically want to do and how to apply it. For example, suppose I want to replace in every file, any instance of <span class="calibre6"> with <i>. How is that done with the updated plugin? Or is by some chance my install screwed up? It certainly feels as if something is missing...

BTW, thanks for all the hard work and being so responsive!
pmorris is offline   Reply With Quote
Old 02-04-2017, 03:27 PM   #130
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,535
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by pmorris View Post
Uh, I'm probably being very shortsighted, but... how does it work now? When I click on the plugin (in Calibre), I am given a choice of checking or unchecking a box for single or (I presume) multiple files, and Customization, with a plethora of options(?). But I do not see how to identify what I specifically want to do and how to apply it. For example, suppose I want to replace in every file, any instance of <span class="calibre6"> with <i>. How is that done with the updated plugin? Or is by some chance my install screwed up? It certainly feels as if something is missing...

BTW, thanks for all the hard work and being so responsive!
I see what you mean when launching from the plugin menu. You can't actually launch the plugin itself! That's a pretty serious bummer.

While I figure out what went wrong there, remember that you can still launch the plugin(s) normally from the Toolbar. Which I imagine is how most people are doing it. Otherwise they'd probably be screaming at me.
DiapDealer is offline   Reply With Quote
Old 02-05-2017, 12:18 PM   #131
pmorris
Member
pmorris began at the beginning.
 
Posts: 21
Karma: 10
Join Date: Mar 2008
Location: Yucca Valley, California
Device: Kindle Keyboard (K3)
Hah! Never occurred to me to add the plugin to the toolbar. Duh. Once I figured out how to do that, I'm copacetic! Thanks for the hint!
pmorris is offline   Reply With Quote
Old 05-20-2017, 07:30 AM   #132
Nicolas F
Groupie
Nicolas F once ate a cherry pie in a record 7 seconds.Nicolas F once ate a cherry pie in a record 7 seconds.Nicolas F once ate a cherry pie in a record 7 seconds.Nicolas F once ate a cherry pie in a record 7 seconds.Nicolas F once ate a cherry pie in a record 7 seconds.Nicolas F once ate a cherry pie in a record 7 seconds.Nicolas F once ate a cherry pie in a record 7 seconds.Nicolas F once ate a cherry pie in a record 7 seconds.Nicolas F once ate a cherry pie in a record 7 seconds.Nicolas F once ate a cherry pie in a record 7 seconds.Nicolas F once ate a cherry pie in a record 7 seconds.
 
Posts: 161
Karma: 1842
Join Date: Jan 2016
Device: Kobo Glo HD
Thanks for this plugin!

I've been using your plugin and I've made a french translation.
I saw that your plugin was available on github so I went ahead and put it there. I've also added theming ability since I've been doing an icon theme for some time.
Nicolas F is offline   Reply With Quote
Old 05-20-2017, 09:06 AM   #133
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,535
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by Nicolas F View Post
Thanks for this plugin!

I've been using your plugin and I've made a french translation.
I saw that your plugin was available on github so I went ahead and put it there. I've also added theming ability since I've been doing an icon theme for some time.
Looks good to me. I'll gladly merge it. Thanks for the contribution.

I may filter the .po and .pot files from the translation folder for distributing the plugin release zips (but they'll remain in github for other translators' usage should they desire to contribute).

Thanks again!

P.S. I admit my knowledge of poedit and translation workflow in general is pretty weak. So I'm wondering what the best process would be moving forward? Before I release a new version (after this next one, of course), should I generate new .po files (or the .pot file) for translators to work with myself before notifying them that translations will need updating?
DiapDealer is offline   Reply With Quote
Old 05-20-2017, 12:43 PM   #134
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,227
Karma: 11768331
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
If you want, I can do the Spanish file myself (as I use a lot the plugin)

Enviado desde mi MI 5 mediante Tapatalk
Terisa de morgan is offline   Reply With Quote
Old 05-20-2017, 01:00 PM   #135
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,535
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by Terisa de morgan View Post
If you want, I can do the Spanish file myself (as I use a lot the plugin)

Enviado desde mi MI 5 mediante Tapatalk
That would be great! Since it's set up now, I'll wait a bit to see if any others want to contribute a translation before releasing a new version. The .pot file is available from the github repository (link in first post of this thread), that can be used to create the editable .po files.

If you can't contribute via Github, just let me know what I need to provide for you and I'll get it to you. I've no idea if people are used to creating their own .po files and compiling them to .mo file themselves, or what? I can provide .po files for the target languages and compile the completed ones if necessary. Whatever works best.

I just need to come up with a scripted workflow to update the existing .po files whenever I change things for a new release (when the changes require the translators to revisit them). Shouldn't be too difficult. That way people can submit pull requests on Github, or email me updated files and I'll script something that compiles them all to .mo files when I make a new release of the plugin.
DiapDealer 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
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 08:29 AM.


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