|
|
#151 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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). Last edited by DiapDealer; 09-29-2025 at 05:27 PM. |
|
|
|
|
|
#152 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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?
|
|
|
|
|
|
#153 |
|
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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.
|
|
|
|
|
|
#154 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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.
|
|
|
|
|
|
#155 |
|
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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.
|
|
|
|
|
|
#156 | |
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 204
Karma: 266070
Join Date: Dec 2010
Location: Spain
Device: Win10,Win11,Ubuntu,PockbookLux44
|
Quote:
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.
|
|
|
|
|
|
|
#157 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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.
|
|
|
|
|
|
#158 |
|
Junior Member
![]() 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 ...?’
Thanks for all your good work! It is very much appreciated. |
|
|
|
|
|
#159 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
|
|
|
|
|
#160 |
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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",
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! |
|
|
|
|
|
#161 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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.
|
|
|
|
|
|
#162 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
|
|
|
|
|
#163 | ||
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 204
Karma: 266070
Join Date: Dec 2010
Location: Spain
Device: Win10,Win11,Ubuntu,PockbookLux44
|
Quote:
Quote:
At need, can replicate the process and provide screenshots--if told which may be relevant. |
||
|
|
|
|
|
#164 | |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 29,152
Karma: 211348980
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
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. |
|
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
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 |