11-21-2020, 09:28 AM | #226 |
Addict
Posts: 201
Karma: 62362
Join Date: Jul 2015
Device: Sony
|
@thosp: Thank you for letting me know about this bug. This has been fixed and the updated plugin has been put in the first post of this thread.
|
05-24-2021, 08:44 AM | #227 |
Member
Posts: 11
Karma: 10
Join Date: Dec 2014
Device: laptop & tablet
|
Incorrect Character Change
Greetings,
I ran the plugin against a file containing, "Texta / Textb" and it changed it to, "Texta I Textb". That is incorrect, isn't it? |
05-25-2021, 05:25 AM | #228 | |
Addict
Posts: 201
Karma: 62362
Join Date: Jul 2015
Device: Sony
|
Quote:
The plugin assumes that a "/" separated by two spaces should be the letter "I" as this was one of the frequent errors in ePub files that were converted from pdf files. It will not change a "/" if it is not surrounded by spaces. So although the plugin is amending "Texta / Textb" incorrectly, it is making the change that it was programmed to do. If I amend the code to ignore " / " then it will not detect any " / "s that should be an "I". It is not possible to amend the plugin so that it can work out whether a " / " should be changed to "I" or not. On balance, I will leave the plugin to change " / " to "I" as "I" in the pdf is commonly converted to "/" in the ePub. |
|
05-25-2021, 10:27 AM | #229 |
Sigil Developer
Posts: 7,781
Karma: 5446592
Join Date: Nov 2009
Device: many
|
One idea is to do what Doitsu does in many of his plugins which is to use the plugins Prefs to store user-editable preferences so that the user can enable that change or not.
|
05-26-2021, 05:55 AM | #230 | |
Addict
Posts: 201
Karma: 62362
Join Date: Jul 2015
Device: Sony
|
Quote:
Code:
if cDetermineQuotes.OpenQ == "‘": CorrectText("Corrected apostrophes in wrong direction", r'[ ]?‘(ad|ave|bout|eard|em|er|cause|cept|im|is|old|ome|ow|specially|Taint|til|tis|twas)(\W?)', r' ’\1\2') else: CorrectText("Corrected apostrophes in wrong direction", r'[ ]?‘(?i)(\d\d|ad[n]{0,1}|app[yines]{0,5}|appen[eds]{0,2}|ard[er]{0,2}|arf|alf|ang|as|at|av[ein]{0,3}|bout|bye|cause|cept[ing]{0,3}|copter[s]{0,1}|cos|cross|cuz|couse|e[emr]{0,1}|ell|elp[edling]{0,5}|ere[abouts]{0,5}|eard|f|fraid|fore|id|igh[er]{0,2}|ighness|im|is|isself|gainst|kay|less|mongst| n|nd|neath|nough|nother|nuff|o[o]{0,1}|ood|ome|ow|op[eding]{0,3}|oney|orse[flesh]{0,5}|ouse[ds]{0,1}|pon|puter[edrs]{0,2}|round|scuse[ds]{0,1}|spect[sed]{0,2}|scaped|sides|tween|special[ly]{0,2}|stead|t|taint|til|tis|twas|twere|twould|twil l|ud|un|urt|vise)(\W?)', r' ’\1\2') |
|
05-28-2021, 08:56 PM | #231 |
Evangelist
Posts: 425
Karma: 77256
Join Date: Sep 2011
Device: none
|
I understand such would require a fair amount of work. As I believe I suggested something like such before, someday yes, yes I say yes.
|
02-24-2022, 05:10 PM | #232 |
Member
Posts: 11
Karma: 10
Join Date: Dec 2014
Device: laptop & tablet
|
Error Message
I ran the plugin, and got the following and am buffaloed. I have previously used this plugin with very few problems. Now I've deleted, got new one fresh from here, installed - TWICE - and no help. Any ideas, please!
Status: failed Python Laucher Version: 20220101 Checking for updates... Published version 3.0.1.4 Installed version 3.0.1.4 You have the latest version of this plugin You have the latest version of this plugin Will check for updates/remind update is available at: 2022-02-25 15:59:40.670795 Traceback (most recent call last): File "C:\Program Files\Sigil\plugin_launchers\python\launcher.py", line 142, in launch self.exitcode = target_script.run(container) File "C:\Users\thosp\AppData\Local\sigil-ebook\sigil\plugins\ePubTidyTool\plugin.py", line 375, in run ShowMainWindow(root, bk, prefs) #show the main window File "C:\Users\thosp\AppData\Local\sigil-ebook\sigil\plugins\ePubTidyTool\plugin.py", line 230, in ShowMainWindow mainframe = ttk.Frame(root, padding="15 15 12 12") NameError: name 'ttk' is not defined Error: name 'ttk' is not defined |
02-25-2022, 12:08 AM | #233 | |
Grand Sorcerer
Posts: 5,615
Karma: 23187563
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
Select Edit > Open Preferences Location > plugins > ePubTidyTool. Open plugin.py with a text editor and change line 12 from: Code:
import tkinter.ttk as tkinter_ttk #Essential for ttk. commands
Code:
import tkinter.ttk as ttk #Essential for ttk. commands
|
|
02-25-2022, 03:54 AM | #234 |
Addict
Posts: 201
Karma: 62362
Join Date: Jul 2015
Device: Sony
|
Thanks, Doitsu.
I have updated the first post in this thread with your correction. |
04-17-2022, 01:57 AM | #235 |
Hedge Wizard
Posts: 802
Karma: 19999999
Join Date: May 2011
Location: UK/Philippines
Device: Kobo Touch, Nook Simple
|
Hi
I am having problems with the plugin and would appreciate any heelp. I have used the plugin for years as I find it very useful although I could never get the resize image funtion to work. This was not an issue as I used other ways to do this. Just recently I had my PC in for repairs and when I got it back had to reinstall Sigil, Calibre and the plugins I use for both. Since then I cannot get the "process spans" feature in epubtidy to work. I have deleted the plugin and its preferences several times but get the same result, A box that contains the following text appears Python Laucher Version: 20220310 Will check for updates/remind update is available at: 2022-04-18 12:27:16.739346 folowed by the appearance of a small blank box labelled Epubtidy which has a feather icon in the top left corner. I have left these boxes on screen for over 30 minutes and nothing appears to happen. I liked the process spans feature and would like to get it working again. Thanks the a Last edited by Thasaidon; 04-17-2022 at 01:59 AM. Reason: grammar |
04-17-2022, 07:41 AM | #236 | |
Grand Sorcerer
Posts: 5,615
Karma: 23187563
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
Open SpanTagProcessor.py with a text editor and change line 9 from: Code:
import tkinter.ttk as tkinter_ttk #Essential for ttk. commands Code:
import tkinter.ttk as ttk #Essential for ttk. commands
|
|
04-17-2022, 09:38 PM | #237 | |
Hedge Wizard
Posts: 802
Karma: 19999999
Join Date: May 2011
Location: UK/Philippines
Device: Kobo Touch, Nook Simple
|
Quote:
I must have done this in the past but had forgotten all about doing it. I looked through the other py files abd spotted why the Resize Image function never worked. Apparently it needs the Pillow graphics library to be installed. Something I had not noticed before. |
|
04-18-2022, 05:55 AM | #238 |
Addict
Posts: 201
Karma: 62362
Join Date: Jul 2015
Device: Sony
|
Update
Thanks for pointing out this bug and how it should be corrected.
I have updated the plugin in the first post of this thread so that Code:
import tkinter.ttk as tkinter_ttk Code:
import tkinter.ttk as ttk |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Tidying Up My Kindle | selectortone | Calibre | 2 | 07-17-2013 10:35 AM |
developping a Plugin for Presentation files | abdlink | Plugins | 4 | 04-15-2013 11:27 AM |
Plugin to fix fb2 files | oviksna | Plugins | 3 | 01-28-2013 08:53 AM |
Tidying Up My Library | JayLaFunk | Library Management | 2 | 09-20-2011 09:12 AM |
Calibre 0.7.50 can't see plugin files | mb_webguy | Calibre | 5 | 04-29-2011 03:41 AM |