Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 09-29-2025, 02:46 PM   #151
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: 29,152
Karma: 211348980
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
OK. I'm going to post a new version of the plugin to test. It has been completely rewritten using Qt for Python rather than tk/tkinter.

Functionally, this test version should work exactly like the old version. I'm just looking to verify that everything works like it always did. New stuff will have to wait.

There's a lot of extra debug output that could come in handy if anyone runs into complications.

As always, make good backups and create lots of checkpoints with Sigil to help make sure nothing is happening that shouldn't be.

I don't expect trouble, but be smart about testing.

EDIT: in case it wasn't obvious, this new version is not going to work with anything less than Sigil 2.0 (and nothing less than Python 3.6 if you're using an external Python interpreter for plugins).
Attached Files
File Type: zip PunctuationSmarten_v0.5.990.zip (22.5 KB, 121 views)

Last edited by DiapDealer; 09-29-2025 at 05:27 PM.
DiapDealer is online now   Reply With Quote
Old 10-02-2025, 11:08 AM   #152
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: 29,152
Karma: 211348980
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Can anyone who has downloaded the test version at least verify that it's working as expected?
DiapDealer is online now   Reply With Quote
Old 10-02-2025, 03:07 PM   #153
retiredbiker
Evangelist
retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.
 
retiredbiker's Avatar
 
Posts: 473
Karma: 3972002
Join Date: May 2013
Location: Ontario, Canada
Device: Pop_Os!, Kobo Forma
I just grabbed a sf novel from Faded Page and made sure it had typewriter punctuation, then downloaded your new version and gave it a go. It seems to have done everything correctly, with a fairly quick look-through.
retiredbiker is offline   Reply With Quote
Old 10-02-2025, 03:40 PM   #154
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: 29,152
Karma: 211348980
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Thanks! It wasn't perfect to start with, but I'm hoping this updated version didn't introduce any new issues.
DiapDealer is online now   Reply With Quote
Old 10-02-2025, 07:05 PM   #155
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: 50,721
Karma: 178402706
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
I grabbed a couple of ePubs from Gutenberg and ran them through with the old plugin. I savef the output files with _old appended to the filename. Updated the plugin and ran the same files through. I did a quick eyeball check and there seems to be no difference between the two versions. I also ran the two _old versions through the new plugin and both reported no changes made.
DNSB is offline   Reply With Quote
Old 11-22-2025, 01:03 PM   #156
carmenchu
Addict
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: 204
Karma: 266070
Join Date: Dec 2010
Location: Spain
Device: Win10,Win11,Ubuntu,PockbookLux44
Quote:
Originally Posted by DiapDealer View Post
Can anyone who has downloaded the test version at least verify that it's working as expected?
Thanks a lot! Just downloaded and made a very quick try from the appimage: now files were selected and processes as expected.
My apologies for not checking the forum much earlier--I find switching from Windows to a Linux distro both possible and rewarding, but in no way hassle-free, if one wants to preserve most of thirty-years-long working habits...
again.
carmenchu is offline   Reply With Quote
Old 11-22-2025, 05:24 PM   #157
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: 29,152
Karma: 211348980
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
No need to apologize. I should have switched to Qt for Python long ago. Glad to hear it's working for you! I was hoping you would be able to try it out.
DiapDealer is online now   Reply With Quote
Old 02-24-2026, 12:47 PM   #158
jd1004
Junior Member
jd1004 began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Nov 2025
Device: none
Comparison test between v0.3.3 and v0.5.990

I ran a comparison test of the PunctuationSmarten plugin between versions 0.3.3 and 0.5.990.

I used seven ebooks in English with smart quotes and with lots of 'cause and 'em and 'til and the originally posted apos_exceptions file plus the additional entries Cause, course, Course, kay, nough, Nough, til, tween.

For each epub:

- export the epub to text using Epub2Text v0.1.4
- change all quotes [“”] to " and all quotes [‘’`´] to ' and save the epub
- run v0.3.3 and export the epub to text
- close the epub without saving, thereby keeping the straight quotes
- run v0.5.990 and export the epub to text

Result:

- Versions 0.3.3 and 0.5.990 produce the same output for all seven ebooks.

- (I need to add Gainst/gainst, Twere/twere, Twill/twill, Twixt/twixt, and Twould/twould to my apos_exceptions file.)

- V0.5.990 starts the log output with "Close event accepted". Is that relevant? What does it mean?

- All in all, the plugin works pretty well. Both versions fail for the HTML below, though. Don't know if anything can be done about that.

Incorrect smart quotes:

Code:
- The HTML
      <div>
         '<i>Father!</i>'
      </div>
  produces
         ‘Father!‘
- The HTML
      <div>
         But she had already begun to read. '"—And when ... and—"'
      </div>
  produces
         But she had already begun to read. ’”—And when ... and—”’
- The HTML
      <p>'Bla bla in '37.'</p>
  produces
         ‘Bla bla in ‘37.’
- The HTML
      <p>'They're speaking "twin" ', she explained.</p>
  produces
         ‘They’re speaking “twin” ‘, she explained.
  Likewise, the HTML
      <p>' "Met"? How do you ...?'</p>
  produces
         ’ “Met”? How do you ...?’
Could you update your original post with the new version and an updated history of changes?

Thanks for all your good work! It is very much appreciated.
jd1004 is offline   Reply With Quote
Old 02-24-2026, 02:34 PM   #159
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: 29,152
Karma: 211348980
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
0.5.990 is a test version. The new version will be 6.0.0 when I get around to it. You're welcome to keep using the test version in the meantime.

There are always going to be situations where the original PunctuationSmarten Python script falls down. I'm afraid that I've given up chasing those edge cases along time ago. This latest was simply an update to using Qt for Python as the GUI instead of TKinter. Nothing more

The "Close event accepted" message in the log is just some debug output that hasn't been cleaned up (hence the testing version). It just means that the close event (user hitting the OK button or the X in the title bar) has happened. You'll note that the message is "Close event rejected" when you click the Cancel button (or use the ESC key) to end the plugin.
DiapDealer is online now   Reply With Quote
Old 03-02-2026, 12:21 PM   #160
carmenchu
Addict
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: 204
Karma: 266070
Join Date: Dec 2010
Location: Spain
Device: Win10,Win11,Ubuntu,PockbookLux44
A new bit of trouble on appimage

Hello!
Just have tripped on an anomalous behaviour with version v0.5.990 under Sigil-2.7.0-x86_64.AppImage, on Linux Mint:
* Trying to point the pluguin to apos_exceptions.txt on the default configuration folder (/home/[user]/.local/share/sigil-ebook/sigil/) simply crashes it--freezes, and on [cancel] reports crash on loading...
* Going instead to said configuration folder, and hand-editing /home/[user]/.local/share/sigil-ebook/sigil/plugins_prefs/PunctuationSmarten/PunctuationSmarten.json to
Code:
    "useFile": true,
    "useFilePath": "/home/[user]/.local/share/sigil-ebook/sigil/apos_exceptions.txt",
worked quite well...
Can there be some issue with permissions? I tried to move apos_exceptions.txt to one of my miscellaneous folders, but the trouble persisted.
Thanks for all your work!
carmenchu is offline   Reply With Quote
Old 03-02-2026, 01:27 PM   #161
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: 29,152
Karma: 211348980
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I'll have to take a look. I can't imagine what it might be. The appimage uses the same preferences folder as the regular version of Sigil. I'm not sure I've ever tried to store the apostrophe exceptions file in the root of Sigil's preferences folder, to be honest. I think I always tested with it being located in my Documents folder.
DiapDealer is online now   Reply With Quote
Old 03-02-2026, 04:35 PM   #162
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: 29,152
Karma: 211348980
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I can't make the crash happen on my Arch Linux system. I can point to the apos_exceptions.txt file whether it's in my Documents folder or in /home/[user]/.local/share/sigil-ebook/sigil/ with no trouble (Using the 2.7.0 AppImage). I can't think why it would matter if the file location was read from the preferences .json, or if it was loaded via the gui QFileDialog.getOpenFilename. I'm using non-native dialogs so switching to, and browsing, normally hidden folders in /home/<usr>/.local shouldn't be a problem (and doesn't appear to be on Arch).

Do you happen to have a user name with diacritics in it? Perhaps I'm not handling something correctly when trying to print the path in the textbox after choosing a new file. Something that doesn't happen when reading the last used path from the preferences file. I'll keep looking.

Last edited by DiapDealer; 03-02-2026 at 04:38 PM.
DiapDealer is online now   Reply With Quote
Old Today, 08:30 AM   #163
carmenchu
Addict
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: 204
Karma: 266070
Join Date: Dec 2010
Location: Spain
Device: Win10,Win11,Ubuntu,PockbookLux44
Quote:
Originally Posted by DiapDealer View Post
I can't make the crash happen on my Arch Linux system. I can point to the apos_exceptions.txt file whether it's in my Documents folder or in /home/[user]/.local/share/sigil-ebook/sigil/ with no trouble (Using the 2.7.0 AppImage). I can't think why it would matter if the file location was read from the preferences .json, or if it was loaded via the gui QFileDialog.getOpenFilename. I'm using non-native dialogs so switching to, and browsing, normally hidden folders in /home/<usr>/.local shouldn't be a problem (and doesn't appear to be on Arch).
* The crash happened after inserting the full path to the apos_exceptions file in the dialog window--as it was impossible to browse to it by the hidden folders in the path.
Quote:
Do you happen to have a user name with diacritics in it? Perhaps I'm not handling something correctly when trying to print the path in the textbox after choosing a new file. Something that doesn't happen when reading the last used path from the preferences file. I'll keep looking.
* No: sheer vanilla text.
At need, can replicate the process and provide screenshots--if told which may be relevant.
carmenchu is offline   Reply With Quote
Old Today, 09:14 AM   #164
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: 29,152
Karma: 211348980
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by carmenchu View Post
* The crash happened after inserting the full path to the apos_exceptions file in the dialog window--as it was impossible to browse to it by the hidden folders in the path.
Ah... now I understand. You're typing (or pasting) the full path in the dialog rather than browsing to it. I'll try to figure out why that might be happening. I'm still having a heard time making it crash that way myself. Just know that in the meantime, it's not "impossible" to browse hidden folders/files with that Open File Dialog.

Just right click in the file selection browser window (where the files and folders are) and select "Show Hidden Files" and browse directly to the file's location. The non-native Open File Dialog will remember that selection the next time it opens.
DiapDealer is online now   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
epubcheck plugin for Sigil Doitsu Plugins 562 01-17-2026 05:03 PM
[Plugin] ePub3-itizer - epub3 output plugin for Sigil KevinH Plugins 457 05-28-2025 07:14 PM
[Plugin] KindleImport Sigil plugin DiapDealer Plugins 187 07-04-2022 11:11 AM
icarus Sigil plugin AlPe Plugins 26 12-05-2017 11:03 AM
smoothRemove_v010 plugin for Sigil kbanelas Plugins 15 01-27-2017 06:51 PM


All times are GMT -4. The time now is 03:45 PM.


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