Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 08-31-2019, 11:50 AM   #76
snarkophilus
Wannabe Connoisseur
snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.
 
Posts: 425
Karma: 2516674
Join Date: Apr 2011
Location: Geelong, Australia
Device: Kobo Libra 2, Kobo Aura 2, Sony PRS-T1, Sony PRS-350, Palm TX
Looks like I've found a case where a single quote that should be converted to a closed single quote gets converted to an open single quote instead.

Code:
<p>"Hiranyagarbha means 'The Golden Embryo.'& #160;"</p>
gets converted to

Code:
<p>“Hiranyagarbha means ‘The Golden Embryo.‘& #160;”</p>
[[ remove the space between the & and the # in the code block above - I couldn't figure out how to get that to display right in this post ]]

Using a normal space instead of the non-breaking space gets the correct results.
snarkophilus is offline   Reply With Quote
Old 08-31-2019, 01:05 PM   #77
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 35,401
Karma: 145435140
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by snarkophilus View Post
Code:
<p>“Hiranyagarbha means ‘The Golden Embryo.‘& #160;”</p>
Using a normal space instead of the non-breaking space gets the correct results.
Why would you want to have a space (breaking, non-breaking, whatever) at the end of a paragraph? One of my saved searches sole purpose is to remove them.
DNSB is offline   Reply With Quote
Old 08-31-2019, 02:26 PM   #78
lumpynose
Wizard
lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.
 
Posts: 1,086
Karma: 6719822
Join Date: Jul 2012
Device: Palm Pilot M105
Quote:
Originally Posted by DNSB View Post
Why would you want to have a space (breaking, non-breaking, whatever) at the end of a paragraph? One of my saved searches sole purpose is to remove them.
I think he wants a bit of space between the closing single quote and the closing double quote. I like that as well, but then I discovered that some devices are using fonts that don't have the small space and showed a "missing char" block.
lumpynose is offline   Reply With Quote
Old 08-31-2019, 03:36 PM   #79
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,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
There's lots of little things like that that can break the SmartyPants algorithm. I've given up chasing them down. There is no one-size-fits-all turnkey solution that will handle every scenario with one pass. I'm to the point where every tweak to accommodate one scenario will often expose another.

It is what it is. Have a few regular expressions saved in your arsenal to handle the edge cases like this after you've run the plugin.
DiapDealer is offline   Reply With Quote
Old 08-31-2019, 10:46 PM   #80
snarkophilus
Wannabe Connoisseur
snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.
 
Posts: 425
Karma: 2516674
Join Date: Apr 2011
Location: Geelong, Australia
Device: Kobo Libra 2, Kobo Aura 2, Sony PRS-T1, Sony PRS-350, Palm TX
Quote:
Originally Posted by DiapDealer View Post
It is what it is. Have a few regular expressions saved in your arsenal to handle the edge cases like this after you've run the plugin.
Cool, happy with that . I found it with a regex, wasn't sure if it'd be easy to fix or not. You've answered that!

lumpynose, DNSB - exactly. At least on my Kobo the sequence "single close quote, double close quote" just looks like "triple close quote" to me. And without the nbsp there, sometimes I've seen them split across lines with just annoys me a little. I did try a narrow non-breaking space but as lumpynose said not all fonts seem to have all the fancy spaces.
snarkophilus is offline   Reply With Quote
Old 09-01-2019, 12:43 AM   #81
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 35,401
Karma: 145435140
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by snarkophilus View Post
lumpynose, DNSB - exactly. At least on my Kobo the sequence "single close quote, double close quote" just looks like "triple close quote" to me. And without the nbsp there, sometimes I've seen them split across lines with just annoys me a little. I did try a narrow non-breaking space but as lumpynose said not all fonts seem to have all the fancy spaces.
Whereas for me, any more than a thin space between the two quotation marks is annoying. As you mention, too often any space glyph other than a regular or non-breaking space gives you a dummy character so I've given up on adding any space.
DNSB is offline   Reply With Quote
Old 03-27-2020, 07:50 PM   #82
carmenchu
Groupie
carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.
 
Posts: 183
Karma: 266070
Join Date: Dec 2010
Device: Win7,Win10,Lubuntu,smartphone
Issue with Smarten Punctuation + <code> tags

Smartening punctuation in page containing
Code:
'<code>...</code>',
gave me the wrong quote (opening insted of closing) after the comma.
I suspect that some 'break' to avoid quotes inside code might be to blame...
Thanks.
carmenchu is offline   Reply With Quote
Old 03-28-2020, 10:02 AM   #83
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,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Moving this to the correct plugin's existing thread. Please don't create new threads for issues with plugins that already have their own threads. Look them up in the Plugin Index sticky post
DiapDealer is offline   Reply With Quote
Old 03-28-2020, 10:10 AM   #84
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,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by carmenchu View Post
Smartening punctuation in page containing
Code:
'<code>...</code>',
gave me the wrong quote (opening insted of closing) after the comma.
I suspect that some 'break' to avoid quotes inside code might be to blame...
Thanks.
I'll take a look, but I'm not much interested in tweaking this SmartyPants Algorithm any more than I already have. There are always going to be edge cases that slip through the cracks and each fix tends to introduce more edge cases.
DiapDealer is offline   Reply With Quote
Old 04-01-2020, 12:41 AM   #85
Thomas_AR
Zealot
Thomas_AR began at the beginning.
 
Thomas_AR's Avatar
 
Posts: 131
Karma: 10
Join Date: Jan 2015
Location: Buenos Aires
Device: Android
Just tried that plugin. I am still using Sigil 9.14 as i am still on my Windows 7.
Getting following error message:

Code:
Status: failed

Traceback (most recent call last):
  File "C:\Program Files\Sigil\plugin_launchers\python\launcher.py", line 135, in launch
    self.exitcode = target_script.run(container)
  File "C:\Users\Thomas\AppData\Local\sigil-ebook\sigil\plugins\PunctuationSmarten\plugin.py", line 392, in run
    guiMain(root, bk).pack(fill=tkinter_constants.BOTH, expand=True)
  File "C:\Users\Thomas\AppData\Local\sigil-ebook\sigil\plugins\PunctuationSmarten\plugin.py", line 133, in __init__
    self.initUI()
  File "C:\Users\Thomas\AppData\Local\sigil-ebook\sigil\plugins\PunctuationSmarten\plugin.py", line 179, in initUI
    self.dashBox.current(self.gui_prefs['dashes'])
  File "tkinter\ttk.py", line 719, in current
_tkinter.TclError: Index -1 out of range
Error: Index -1 out of range
Also ran the Sigil test plugin getting one error:
Code:
Status: success

 
Verify sys.path settings manually
  C:\Program Files\Sigil\plugin_launchers\python
  C:\Program Files\Sigil\DLLs
  C:\Program Files\Sigil\lib
  C:\Program Files\Sigil
  C:\Program Files\Sigil\lib\site-packages
  C:\Users\Thomas\AppData\Local\sigil-ebook\sigil\plugins\testplugin
 
Verifying proper Python packages are available
  Checking GUI modules
    Python Package: PyQt5 (C:\Program Files\Sigil\lib\site-packages\PyQt5\QtWidgets.pyd) Found
    Python Package: tkinter (C:\Program Files\Sigil\lib\tkinter\__init__.pyc) Found
  Python Package: PIL (C:\Program Files\Sigil\lib\site-packages\PIL\__init__.pyc) Found
  Python Package: cssselect (C:\Program Files\Sigil\lib\site-packages\cssselect\__init__.pyc) Found
  Python Package: cssutils (C:\Program Files\Sigil\lib\site-packages\cssutils\__init__.pyc) Found
  Python Package: html5lib (C:\Program Files\Sigil\lib\site-packages\html5lib\__init__.pyc) Found
  Python Package: lxml (C:\Program Files\Sigil\lib\site-packages\lxml\__init__.pyc) Found
  Python Package: regex (C:\Program Files\Sigil\lib\site-packages\regex\__init__.pyc) Found
  Python Package: chardet (C:\Program Files\Sigil\lib\site-packages\chardet\__init__.pyc) Found
  Python Package: six (C:\Program Files\Sigil\lib\site-packages\six.pyc) Found
 
Verifying Sigil Python Libraries can be found/loaded
  Sigil Python library: epub_utils Found
  Sigil Python library: quickparser Found
  Sigil Python library: hrefutils Missing
  Sigil Python library: compatibility_utils Found
  Sigil Python library: sigil_bs4 Found
 
Verifying Hunspell Spell Checking
  Hunspell en_US affix file and dictionary Found
  Hunspell shared library Found
  Hunspell spellchecking works True
  
Verifying Sigil Gumbo Library operation
  Sigil Gumbo BS4 Adapter library Found
  Sigil BS4/Gumbo Parser works True
 
Verifying selected basic plugin interface elements
  bk.text_iter() works True
  Listing manifested files...
    Text/Section0001.xhtml
    toc.ncx
  bk.manifest_iter() works True
  bk.spine_iter() works True
  bk.other_iter() works True
  reading a non-manifest book file works True
  reading a specific OPF manifest id works True
  writing to a specific OPF manifest id works True
  Launcher Version 20190610
  ePub Version 2.0
  adding your own file to the manifest works True
  basename to id mapping works True
  deleting our added file works True
 
 
Failure -  1  Tests of Plugin Operations Failed
What can i do?
Thanks
Thomas
Thomas_AR is offline   Reply With Quote
Old 04-01-2020, 08:34 AM   #86
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,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Has to be a bad or corrupted Sigil installation. Can you verify that C:\Program Files\Sigil\python3lib\hrefutils.py exists? What version of the test plugin are you using?

Also, support for Windows 7 has not been dropped by Sigil in the most recent versions. I test and use Sigil 1.2.0 in Windows 7 virtual machines all the time. The only thing the latest versions of Sigil (Qt5 actually) might have trouble with is aging videocards and/or drivers. Easy enough to test. You can always go back to 0.9.14 if there's problems.
DiapDealer is offline   Reply With Quote
Old 04-01-2020, 08:43 AM   #87
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,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Sorry. That should have been C:\Program Files\Sigil\plugin_launchers\python\hrefutils.py.

And I already know it won't be there. You're using too new of a version of the test plugin for your older version of Sigil. Your problem with the plugin is likely unrelated.
DiapDealer is offline   Reply With Quote
Old 04-01-2020, 08:47 AM   #88
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
He reported he is still on Sigil-0.9.14 so I do not think hrefutils.py existed for that version. Perhaps our we should check the wrapper version when running the latest testplugin when testing for hrefutils?

I tried to protect all of the new feature tests but perhaps I just missed that one.
KevinH is online now   Reply With Quote
Old 04-01-2020, 09:14 AM   #89
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,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by KevinH View Post
He reported he is still on Sigil-0.9.14 so I do not think hrefutils.py existed for that version.
I caught that at the last second. I think the missing hrefutils is a red herring in this case anyway. The plugin is bombing while trying to pre-set a combobox's current selection. The value of "-1" being reported by the traceback should be impossible. It should be the saved user preference (0-4) or the default value of 1.

If there are any, I would recommend deleting the PunctuationSmarten plugin's user preferences and trying again.
  • Plugins->Manage Plugins
  • Click the "Open Preferences Location" button at the bottom of the dialog
  • Open the "plugin_prefs" folder
  • Delete the PunctuationSmarten folder (should only have a single .json file in it)

Last edited by DiapDealer; 04-01-2020 at 09:22 AM.
DiapDealer is offline   Reply With Quote
Old 04-01-2020, 09:48 AM   #90
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
And fwiw a new testplugin_v018.zip has now been posted that protects hrefutils.py test by launcher version as it first appeared in Sigil-0.9.991. I have removed the buggy testplugin_v017.zip since it adds no value over the latest testplugin_v018.zip.
KevinH is online now   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
epubcheck plugin for Sigil Doitsu Plugins 502 02-20-2024 06:58 AM
[Plugin] ePub3-itizer - epub3 output plugin for Sigil KevinH Plugins 435 01-19-2023 09:46 PM
[Plugin] KindleImport Sigil plugin DiapDealer Plugins 187 07-04-2022 10:11 AM
icarus Sigil plugin AlPe Plugins 26 12-05-2017 10:03 AM
smoothRemove_v010 plugin for Sigil kbanelas Plugins 15 01-27-2017 05:51 PM


All times are GMT -4. The time now is 01:56 PM.


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