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 11-19-2014, 05:14 PM   #1
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: 9,539
Karma: 44002482
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:
  • Requires calibre v1.46 or higher.

Version History:
Spoiler:
  • Version 0.3.0 - 19 Nov 2014.
Attached Files
File Type: zip diaps_toolbag_v0.3.0_plugin.zip (73.0 KB, 1605 views)

Last edited by DiapDealer; 11-20-2014 at 08:20 PM.
DiapDealer is offline   Reply With Quote
Old 11-19-2014, 05:16 PM   #2
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: 9,539
Karma: 44002482
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.
Attached Files
File Type: txt apos_exceptions.txt (147 Bytes, 40 views)
DiapDealer is offline   Reply With Quote
Old 11-19-2014, 06:05 PM   #3
eschwartz
Irrational Optimist
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 8,353
Karma: 14774587
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.
eschwartz is offline   Reply With Quote
Old 11-20-2014, 03:04 PM   #4
arspr
None
arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.
 
Posts: 492
Karma: 599350
Join Date: Mar 2011
Location: Madrid, Spain
Device: Sony PRS-650 >>> Kobo Aura HD (self-destructed) >>> Kobo Aura H2O
Quote:
Originally Posted by DiapDealer View Post
Main Features of Diaps Editing Toobag:
(and yes, I realize there should be an apostrophe in "Diaps" but I can't bring myself to do it! )
You've missed an apostrophe... and a letter l...
arspr is offline   Reply With Quote
Old 11-20-2014, 03:14 PM   #5
theducks
Grand Sorcerer
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 15,268
Karma: 6020309
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by arspr View Post
You've missed an apostrophe... and a letter l...
Satisfied now?
theducks is offline   Reply With Quote
Old 11-20-2014, 04:59 PM   #6
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: 9,539
Karma: 44002482
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
What? You guys don't have toobags where you come from?
DiapDealer is offline   Reply With Quote
Old 11-21-2014, 04:32 AM   #7
chaley
"chaley", not "charley"
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 5,907
Karma: 1217216
Join Date: Jan 2010
Location: France
Device: Many android devices
Quote:
Originally Posted by DiapDealer View Post
What? You guys don't have toobags where you come from?
Nope. We have aswellbags. They hold more than toobags.
chaley is offline   Reply With Quote
Old 11-21-2014, 03:41 PM   #8
arspr
None
arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.
 
Posts: 492
Karma: 599350
Join Date: Mar 2011
Location: Madrid, Spain
Device: Sony PRS-650 >>> Kobo Aura HD (self-destructed) >>> Kobo Aura H2O
I prefer just enoughbags... Because of my own limitations, these tools are usually toobags indeed...
arspr is offline   Reply With Quote
Old 11-21-2014, 05:29 PM   #9
theducks
Grand Sorcerer
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 15,268
Karma: 6020309
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
I prefer strongbags as I have had toomanybags let me down at the worst possible time.
theducks is offline   Reply With Quote
Old 11-21-2014, 09:08 PM   #10
BetterRed
null operator
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: 3,981
Karma: 2925589
Join Date: Mar 2012
Location: NSW 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.
BetterRed is offline   Reply With Quote
Old 11-21-2014, 09:53 PM   #11
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: 9,539
Karma: 44002482
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
That's toopid.
DiapDealer is offline   Reply With Quote
Old 12-10-2014, 05:58 AM   #12
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 1,496
Karma: 846401
Join Date: Jan 2009
Device: KoboGlo
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
roger64 is offline   Reply With Quote
Old 12-18-2014, 09:31 PM   #13
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 1,496
Karma: 846401
Join Date: Jan 2009
Device: KoboGlo
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
roger64 is offline   Reply With Quote
Old 12-18-2014, 10:29 PM   #14
Rev. Bob
Guru
Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.
 
Rev. Bob's Avatar
 
Posts: 939
Karma: 4214170
Join Date: Feb 2013
Device: Kobo Glo, Kindle Touch
Quote:
Originally Posted by roger64 View Post
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:
Calibre's editor already has a "Smarten Punctuation" function.
Rev. Bob is offline   Reply With Quote
Old 12-18-2014, 10:44 PM   #15
eschwartz
Irrational Optimist
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 8,353
Karma: 14774587
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Quote:
Originally Posted by Rev. Bob View Post
Calibre's editor already has a "Smarten Punctuation" function.
The point roger64 was making is the expanded French application of this specific smartening implementation.

Quote:
SmartyPants Typographer can perform those additional transformations:
  • French guillements done using (<< and >>) into true « guillemets » HTML entities.
  • Replace existing spaces with non-break spaces around punctuation marks where appropriate, can also add or remove them if configured to.
  • Replace existing spaces with non-break spaces for spaces used as a thousand separator and between a number and the unit symbol that follows it (for most common units).
eschwartz 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 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


All times are GMT -4. The time now is 02:23 AM.


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