10-01-2015, 07:22 PM | #76 | |
Member
Posts: 11
Karma: 10
Join Date: Dec 2013
Device: none
|
Quote:
I was able to add the plug-in; however I received an "Error Parsing Result XML: Premature end of document" with the following info: F atal Python error: Py_Initialize: unable to load the file system codec ImportError: No module named 'encodings' I tried this on 5 different files and got the same error message. |
|
10-01-2015, 08:30 PM | #77 |
Ex-Helpdesk Junkie
Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
That appears to be a problem with Python, not the plugin.
Do you have the PYTHONPATH environment variable set to a python2 installation? |
Advert | |
|
10-02-2015, 02:14 AM | #78 |
Grand Sorcerer
Posts: 5,635
Karma: 23191067
Join Date: Dec 2010
Device: Kindle PW2
|
One would think so, but there definitely is a problem with the plugin. I don't get martyger's error message, but the plugin appears to be stuck in an endless loop. The only thing that works is the resize image option.
Last edited by Doitsu; 10-02-2015 at 04:14 AM. |
10-02-2015, 02:48 AM | #79 |
Connoisseur
Posts: 81
Karma: 10
Join Date: Nov 2013
Device: Kobo Aura HD
|
Works fine for me. You must point to a text file for word list or it stuck in an endless loop
|
10-02-2015, 04:41 AM | #80 | |
Grand Sorcerer
Posts: 5,635
Karma: 23191067
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
Besides, a plugin shouldn't rely on the existence of a file it doesn't create itself. |
|
Advert | |
|
10-02-2015, 04:49 AM | #81 |
Connoisseur
Posts: 81
Karma: 10
Join Date: Nov 2013
Device: Kobo Aura HD
|
Doitsu create and a words.txt and set it from Use word list from the choices when you run the plugin. It's for the new feature that automatically changes words.
|
10-02-2015, 04:57 AM | #82 | |
Grand Sorcerer
Posts: 5,635
Karma: 23191067
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
If it requires this file, it should create a dummy file when it's first run. |
|
10-02-2015, 12:09 PM | #83 |
Addict
Posts: 202
Karma: 62362
Join Date: Jul 2015
Device: Sony
|
My plugin did include a check for whether or not the file exists instead of creating a dummy file. However, I found a bug that was linked to the json file that stores user preferences. I resolved this problem and I have posted an update in the first thread of this post.
|
10-05-2015, 02:30 AM | #84 |
Connoisseur
Posts: 81
Karma: 10
Join Date: Nov 2013
Device: Kobo Aura HD
|
@CalibUser
I added the "ακούσε|άκουσε" replacement in word list. But it changes and the "ακούσει" word that is correct with "άκουσε(return)ι". How can we change the code to find the whole word? Or the whole word followed by punctuation? Thanks |
10-05-2015, 06:51 AM | #85 |
Addict
Posts: 202
Karma: 62362
Join Date: Jul 2015
Device: Sony
|
I have amended the plugin so it should remove the erroneous return when "ακούσε|άκουσε" is put in word list.
|
10-05-2015, 08:58 AM | #86 | |
Connoisseur
Posts: 81
Karma: 10
Join Date: Nov 2013
Device: Kobo Aura HD
|
Quote:
Edit: CalibUser i notice that in some greek words it doesnt find the whole word. Like the one in my last post "ακούσει, ακούσεις" that are correct words it changes them to "άκουσε(space)ι, άκουσε(space)ις" that are mispelled. I also notice that it doesnt fix all the words. I play with the encoding of the words file to fix this. In what enconding we must have the words file; it fixes the words when i have it in windows-greek. In utf-8 i have problem with the Ά it changed to ' Last edited by gipsy; 10-05-2015 at 12:39 PM. |
|
10-05-2015, 01:27 PM | #87 |
Connoisseur
Posts: 81
Karma: 10
Join Date: Nov 2013
Device: Kobo Aura HD
|
I finally get the FixP code to work with!
Code:
def IsFixP(m): """ This function examines a hyphenated word to see whether the hyphen is required. It is called by a regular expression function (re.sub) in FixCommonErrors() It returns the original expression if the non-hyphenated word is not in the dictionary, otherwise it returns the word without the hyphen """ FixP="Π"+m.group(2) FixP2=m.group(1)+m.group(2) if spell(FixP2): return(m.group(0)) elif spell(FixP): print("FixP removed from: ", FixP) return ('Π'+m.group(2)) else: return(m.group(0)) Code:
#Fixes Π in words that are misspelled if dictExists == True: CorrectText("Π fixes",r"(1\ Ι|ΓΙ|Γΐ|ΙΙ|II|Ι\ Ι|ΓΤ|ΙΊ|Ιί)[ ]?(\w+)(?![^<>]*>)(?!.*<body[^>]*>)", IsFixP) I think that i have some error in the CorrectText regex. In the FixP sample that i had in a previously post... It doesn't correct the "Ι Ιήρε" And i have it in the CorrectText as "Ι\ Ι" . Any thoughts??? EDIT: Found that it doesn't fix if the second part of the word (m.group(2)) is lowercase Last edited by gipsy; 10-05-2015 at 01:46 PM. |
10-06-2015, 02:28 PM | #88 | |
Addict
Posts: 202
Karma: 62362
Join Date: Jul 2015
Device: Sony
|
Quote:
Sigil uses the UTF-8 format so please ensure that your Greek word file is in this format (although this does not seem to matter for English words). |
|
10-06-2015, 04:17 PM | #89 |
Connoisseur
Posts: 81
Karma: 10
Join Date: Nov 2013
Device: Kobo Aura HD
|
@CalibUser Works fine with the words that I had problems!!!
ps. I have the IncorrectWords.txt saved as UTF-8 at Windows Notepad. |
10-07-2015, 02:41 PM | #90 |
Addict
Posts: 202
Karma: 62362
Join Date: Jul 2015
Device: Sony
|
Thanks for testing my update. I am adding another update to the plugin so that apostrophes in the word list will be replaced by a straight or single quote depending on the type of quote that is used in the ePub. When I have managed to get this feature working I will post an update in the first thread.
|
|
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 |