02-08-2016, 10:32 AM | #1 |
Guru
Posts: 830
Karma: 2525050
Join Date: Jun 2010
Device: K3W, PW4
|
How about a plugin to hyphenate?
Calibre has a plugin, "Hyphenate This!", that will insert soft hyphens into a document using a Libre Office foundation hyphenation dictionary. It would be very nice to have a similar capability in Sigil.
I don't know if the two plugin approaches are similar enough for this to be helpful, but in case here is the thread about the Calibre plugin: https://www.mobileread.com/forums/sho...d.php?t=208534 Dave |
02-08-2016, 11:02 AM | #2 |
Sigil Developer
Posts: 7,647
Karma: 5433388
Join Date: Nov 2009
Device: many
|
There is a pure python hyphennate.py that uses the standard tex based hyphenation dictionary (like Libre/Open Office, Sigil, etc). So yes a hyphenation dictionary would be a very easy to do and nice edit plugin for Sigil.
See this link: https://pypi.python.org/pypi/hyphenator/0.5.1 That code can be unpacked and hyphenator.py can easily be added to a plugin. It is LGPL so it is license compatible with Sigil. |
Advert | |
|
02-08-2016, 11:52 AM | #3 |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Which for the record is the same module the calibre plugin uses.
|
02-08-2016, 12:33 PM | #4 |
Guru
Posts: 830
Karma: 2525050
Join Date: Jun 2010
Device: K3W, PW4
|
Unless building a Sigil plugin is a very simple exercise I suspect someone other than me will need to do it. I am glad you agree that it would be a useful feature to add to Sigil.
Dave |
02-08-2016, 01:16 PM | #5 |
Sigil Developer
Posts: 7,647
Karma: 5433388
Join Date: Nov 2009
Device: many
|
Have you asked the calibre plugin author if they would like to modify their plugin to run with Sigil? If not, I am sure someone here could throw one together using the calibre one as a base since only the gui would be different, where-as both support html5lib, lxml, etc and of course python and parsing of xhtml is easily achieved in both. So unless it uses some special interfaces specific to calibre, most if it should be re-usable. What license does the calibre plugin use?
|
Advert | |
|
02-08-2016, 01:46 PM | #6 |
Guru
Posts: 830
Karma: 2525050
Join Date: Jun 2010
Device: K3W, PW4
|
The last Calibre plugin update was in August, 2014 leading me to wonder if the author is still active at this point. His last post here was in May, 2015 giving me further doubts about contacting him.
Given this perhaps one of the developers here could take a look at his work and the tool it is based on. Dave |
02-08-2016, 01:52 PM | #7 |
Guru
Posts: 830
Karma: 2525050
Join Date: Jun 2010
Device: K3W, PW4
|
There is another point that someone brought to my attention over in the Kindle Developer's forum. Perhaps this is not the greatest idea for an edit plugin, unless the intent is to use it immediately before a KindleGen and then discarding the changes. You can see the full post here:
https://www.mobileread.com/forums/sho...99#post3256199 Quoting his main point "Most ePub rederers (such as ADE/RMDSK) will not properly display the hyphens and if you need to make changes to the ePub, the hyphens will get in the way. Also searching breaks with the hyphens." Dave |
02-08-2016, 03:08 PM | #8 |
Grand Sorcerer
Posts: 27,552
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I would never recommend mass soft-hyphen insertion (pollution) for anything other than personal use. It doesn't make sense to use it for books you plan to disseminate to others. It should be reserved as an end-user option, rather than a creation option in my opinion.
|
02-08-2016, 03:30 PM | #9 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Perhaps as pre-plugin for the kindlegen plugin?
|
02-08-2016, 04:09 PM | #10 |
Guru
Posts: 830
Karma: 2525050
Join Date: Jun 2010
Device: K3W, PW4
|
That is kind of what I was thinking of. Perhaps there is even a way the hyphenation could be incorporated into the Kindlegen plugin as an output option. My current understanding is that this is only effective in the kf8(.azw3) format, so I don't know how that would impact the production of the .mobi file.
Of course if Amazon were to add proper hyphenation support into the Kindle this would not be a problem. They however seem uninterested in doing so. Dave |
02-08-2016, 04:37 PM | #11 |
Grand Sorcerer
Posts: 27,552
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Not everyone likes hyphenation. Why force it on them (and take away their ability to search the text as a consequence)? Just make books and allow the readers to use the apps/devices/formats whose features they're most comfortable with (or that offer the customization options they value most). Hyphenation, line-height, letter-spacing, font-sizes, font-faces: these are all things that should be left up to the reader to tweak if they're so inclined (when speaking of standard body text). If hyphenation is important enough to them, they'll already be using a device/app/format that offers them the choice of enabling it (or disabling it).
Last edited by DiapDealer; 02-08-2016 at 04:48 PM. |
02-08-2016, 05:15 PM | #12 |
Wizard
Posts: 1,544
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
|
02-08-2016, 05:21 PM | #13 | |
Wizard
Posts: 1,544
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
http://www.amazon.com/b?_encoding=UTF8&node=11516960011 And speaking by me, I like hyphens. Regards Rubén Last edited by RbnJrg; 02-09-2016 at 06:30 AM. |
|
02-08-2016, 09:17 PM | #14 | |
Guru
Posts: 830
Karma: 2525050
Join Date: Jun 2010
Device: K3W, PW4
|
Quote:
So now we have a reason to want to get the kfx format opened up. I wonder how long that will take? Dave |
|
02-09-2016, 04:16 AM | #15 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[GUI Plugin] Hyphenate This! | SauliusP. | Plugins | 512 | 04-12-2024 07:05 PM |
[GUI Plugin] Hyphenate This! | bookbinder | Plugins | 0 | 05-06-2015 01:07 PM |
Should I use *soft hyphens to hyphenate large words | rhyous | Sigil | 12 | 01-04-2014 09:28 AM |
Plugin not customizable: Plugin: HTML Output does not need customization | flyingfoxlee | Conversion | 2 | 02-24-2012 02:24 AM |