11-19-2014, 05:14 PM | #1 |
Grand Sorcerer
Posts: 28,040
Karma: 199464182
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
[Editor Plugin] Diap's Editing Toolbag
Various tools for use in calibre's Edit Book Tool.
Main Features of Diaps Editing Toolbag: (and yes, I realize there should be an apostrophe in "Diaps" but I can't bring myself to do it! ) 1) Span Div Editor: conveniently remove, change the attributes of (and/or convert to different html elements) those pesky, nestable spans and divs (as well as a few others). 2) Smarten Punctuation (the sequel): gives slightly more granular control over the the smartening process. It preserves pre-existing entities and lets you choose what you want to smarten. So if you prefer three periods to the ellipse character/entity, you can keep them if you like. Also lets you supply a text file that defines apostrophe exception words like 'cept and 'tis in order to get the apostrophe right (instead of an opening single quote). I'm attaching a sample file for that, but basically it's one word per line WITHOUT any apostrophe characters. You can also choose to go with SmartyPants' default of using numeric entities instead of unicode characters if you like. 3) Convert CM to EM: this one was one I did for roger64. It simply parses CSS files looking for attributes that have cm dimensions and converts them to em (based on a preset factor). Please scour the differences and make judicious use of the checkpoint system before trusting these tools on your babies!! Special Notes:
Github Repository for the plugin code/releases Version History: Spoiler:
Last edited by DiapDealer; 10-10-2024 at 10:47 AM. |
11-19-2014, 05:16 PM | #2 |
Grand Sorcerer
Posts: 28,040
Karma: 199464182
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Reserving post for future use and additional downloads.
I'm attaching a sample apostrophe exception file for use with the Smarten Punctuation tool in Diap's Editing Toolbag. |
11-19-2014, 06:05 PM | #3 |
Ex-Helpdesk Junkie
Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Good to see your plugin finally find a home.
|
11-20-2014, 03:04 PM | #4 |
Dead account. Bye
Posts: 587
Karma: 668244
Join Date: Mar 2011
Device: none
|
|
11-20-2014, 03:14 PM | #5 |
Well trained by Cats
Posts: 30,443
Karma: 58055868
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
|
11-20-2014, 04:59 PM | #6 |
Grand Sorcerer
Posts: 28,040
Karma: 199464182
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
What? You guys don't have toobags where you come from?
|
11-21-2014, 04:32 AM | #7 |
Grand Sorcerer
Posts: 12,029
Karma: 7257323
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
|
11-21-2014, 03:41 PM | #8 |
Dead account. Bye
Posts: 587
Karma: 668244
Join Date: Mar 2011
Device: none
|
I prefer just enoughbags... Because of my own limitations, these tools are usually toobags indeed...
|
11-21-2014, 05:29 PM | #9 |
Well trained by Cats
Posts: 30,443
Karma: 58055868
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
I prefer strongbags as I have had toomanybags let me down at the worst possible time.
|
11-21-2014, 09:08 PM | #10 |
null operator (he/him)
Posts: 20,997
Karma: 27620706
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
I keep all my bags in my tooshed, tooboxes too - touché
Last edited by BetterRed; 11-21-2014 at 09:11 PM. |
11-21-2014, 09:53 PM | #11 |
Grand Sorcerer
Posts: 28,040
Karma: 199464182
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
That's toopid.
|
12-10-2014, 05:58 AM | #12 |
Wizard
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
Hi
About the cm2em feature. 1. - Can we run it on both (or all) stylesheets? EDIT. Installed the toolbar, found the arrow, unchecked the box... If we have some style properties within the xhtml files which are using metrics, could it be made later to convert them too? 2. - There should probably be a warning for the first-time user. Once the conversion has been done, it's advisable to check your EPUB (at least your stylesheet). The conversion process is just arithmetic. It goes from a plain value to another. The em, however, is a relative unit, and for big values (sometime as many as some centimeters...), it may look distorted and be much bigger than before. This happens about the way as you get a loooong shadow from a setting (or rising) sun (you did not really expect that one? ). This is not a mistake. You have to know it. 3. - I am available to translate it in French. Last edited by roger64; 12-10-2014 at 07:03 AM. Reason: EDIT and French |
12-18-2014, 09:31 PM | #13 |
Wizard
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
A suggestion
If I may, I would like to suggest you to extend your plugin capabilities by adding to it another tick box enabling this very interesting open-source function: https://github.com/michelf/php-smartypants https://michelf.ca/projects/php-smar...s/typographer/ The documentation for it is clear and available online. It really would be very useful not only for French language users. Regards roger64 |
12-18-2014, 10:29 PM | #14 |
Wizard
Posts: 1,760
Karma: 9918418
Join Date: Feb 2013
Location: Here on the perimeter, there are no stars
Device: Kobo H2O, iPad mini 3, Kindle Touch
|
|
12-18-2014, 10:44 PM | #15 | |
Ex-Helpdesk Junkie
Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
The point roger64 was making is the expanded French application of this specific smartening implementation.
Quote:
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Sample Plugin for the Editor | DiapDealer | Editor | 77 | 12-10-2014 08:16 AM |
Diaps Editing Toolbag.zip Index Error | phossler | Editor | 2 | 10-01-2014 09:05 PM |
Editor plugin question | DiapDealer | Development | 2 | 07-28-2014 11:23 PM |
japi - a text editor capable of editing ePub directly | hekkel | ePub | 5 | 02-20-2009 09:46 AM |