01-25-2017, 01:25 PM | #121 | |
Grand Sorcerer
Posts: 27,547
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
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. |
|
01-25-2017, 02:06 PM | #122 |
Wizard
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 |
Advert | |
|
01-25-2017, 02:29 PM | #123 |
Grand Sorcerer
Posts: 6,233
Karma: 11768331
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
|
|
01-25-2017, 03:48 PM | #124 |
Grand Sorcerer
Posts: 6,233
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). |
01-25-2017, 04:58 PM | #125 | |
null operator (he/him)
Posts: 20,565
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
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 |
|
Advert | |
|
01-26-2017, 09:08 AM | #126 | |
Grand Sorcerer
Posts: 27,547
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
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* |
|
01-26-2017, 05:02 PM | #127 | |
null operator (he/him)
Posts: 20,565
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
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 |
|
01-29-2017, 11:41 AM | #128 |
Grand Sorcerer
Posts: 27,547
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. |
02-04-2017, 03:14 PM | #129 |
Member
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! |
02-04-2017, 03:27 PM | #130 | |
Grand Sorcerer
Posts: 27,547
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
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. |
|
02-05-2017, 12:18 PM | #131 |
Member
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!
|
05-20-2017, 07:30 AM | #132 |
Groupie
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. |
05-20-2017, 09:06 AM | #133 | |
Grand Sorcerer
Posts: 27,547
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
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? |
|
05-20-2017, 12:43 PM | #134 |
Grand Sorcerer
Posts: 6,233
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 |
05-20-2017, 01:00 PM | #135 | |
Grand Sorcerer
Posts: 27,547
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
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. |
|
|
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 |