11-26-2012, 11:09 AM | #16 |
Member
Posts: 19
Karma: 10
Join Date: Nov 2012
Device: Bookeen Cybook Odyssey HD Frontlight
|
Hi, I am new here and received a lot of help already "offline" but unfortunately it is still not enough :-(
I sum it up: I installed Python33 and penelope did not work. We found out that V3 has a very different syntax in python and the script works with V2 only. I installed Python 27 and then it was something better, but it complains: "sqlite3.DatabaseError: database disk image is malformed" We checked that the "empty.idx" file is the correct one. We assume that the sqlite3.dll file coming with my Python 27 installation could be defect. But at sqlite.org there is only the newest DLL vile (for V3) downloadable. I am stuck now at this stage - I try to get a python26 somewhere and install that also... If anyone has an idea, thanks for it! Best regards, Nathalie EDIT: I fetched a 2.5.4 Python, and the situation is the very same. I do not understand the world any more. Same error, tried with 2 different dictionary files... Last edited by oldnat; 11-26-2012 at 11:19 AM. |
11-27-2012, 12:51 AM | #17 |
Member
Posts: 19
Karma: 10
Join Date: Nov 2012
Device: Bookeen Cybook Odyssey HD Frontlight
|
So this morning i changed the source (and named it penelop3.py to distinguish) to match the syntax of Python V3.
This time it ran much longer, it created an .idx file (empty) and crashed after about 30 seconds with [INFO] Outputting in Odyssey format to file... Traceback (most recent call last): File "penelop3.py", line 979, in <module> main() File "penelop3.py", line 954, in main write_to_Odyssey_format(config, parsed_data, debug) File "penelop3.py", line 168, in write_to_Odyssey_format output_file.write(input_file.read()) File "C:\Python33\lib\encodings\cp1252.py", line 23, in decode return codecs.charmap_decode(input,self.errors,decoding_t able)[0] UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 382: character maps to <undefined> I tried another dictionary, with logically the same result for it crashes already at reading the empty.idx file - the empty.idx file really has a char 0x81 at this position (and several others as well). I assume there can be something with the encoding of the file? But that is an sqlit3 db file, so it should be handled as binary, not text, ergo no encoding... BR Nat EDIT PS.: I am sitting on Windows 7 PS2.: I see Python33 choking on 81: http://stackoverflow.com/questions/3...2-ansi-reading so there around it shall be... Last edited by oldnat; 11-27-2012 at 05:05 AM. |
Advert | |
|
11-27-2012, 05:20 AM | #18 |
Member
Posts: 19
Karma: 10
Join Date: Nov 2012
Device: Bookeen Cybook Odyssey HD Frontlight
|
I think I have it.
I changed the file openings to binary (r to rb and w to wb) in line 165-166 and now: C:\Python33\python penelop3.py -p quick_english-hungarian -f en -t hu -d [INFO] Input dictionary has sequence type 'm'. [INFO] Debug mode is on. [INFO] Starting conversion with the following parameters: [INFO] Dictionary file: en-hu.dict [INFO] Index file: en-hu.dict.idx [INFO] Language from: en [INFO] Language to: hu [INFO] License: GNU GPL 3 [INFO] Copyright: GNU GPL 3 [INFO] Title: Dictionary en -> hu [INFO] Description: Dictionary en -> hu [INFO] Year: 2012 [INFO] Reading input dictionary... [INFO] Parsing the input dictionary... [INFO] Using the built-in parser... [INFO] Outputting in Odyssey format to file... [INFO] Files en-hu.dict and en-hu.dict.idx created successfully! The problem is, the new idx is ident and the new dict is almost empty :-( So I think I had a too amateurish approach here - AlPe I think you must help if you can :-) Thanks, Nat BR Nat Last edited by oldnat; 11-27-2012 at 05:22 AM. |
11-27-2012, 06:50 AM | #19 |
Member
Posts: 19
Karma: 10
Join Date: Nov 2012
Device: Bookeen Cybook Odyssey HD Frontlight
|
Well, I gave up and installed a debian linux in a vmware. The script works (as assumed) correctly.
Nevertheless I would be eager to know how to make it work under Windows :-) Best ragards, and thanks AlPe again for the fine tool! BR Nat |
11-27-2012, 08:10 AM | #20 |
Member
Posts: 19
Karma: 10
Join Date: Nov 2012
Device: Bookeen Cybook Odyssey HD Frontlight
|
So there comes the next problem. I created the dictionaries and copied them to the Dictionaries folder in root (where the others were). But how can I define which dictionary is used? I did not find an option to set a default dictionary, despite RTFM :-(
Can anyone help? Thanks Nat |
Advert | |
|
11-27-2012, 11:00 AM | #21 |
Digital Amanuensis
Posts: 727
Karma: 1446357
Join Date: Dec 2011
Location: Turin, Italy
Device: Several eReaders and tablets
|
I confirm that the script was developed using Python 2.6 and it works under Python 2.7.
Unfortunately, it does not work under Python 3. I am not a Python expert and I really do not have time to "port" it. If someone is interested, I can add her or him to the Google Code project so that she or he can commit a working version for Python 3. |
11-27-2012, 11:05 AM | #22 |
Digital Amanuensis
Posts: 727
Karma: 1446357
Join Date: Dec 2011
Location: Turin, Italy
Device: Several eReaders and tablets
|
Unfortunately, you cannot.
The dictionary is selected according to the GUI language and the language metadatum of the book you are viewing, as explained in Section "Dictionary management on the Odyssey" of http://www.albertopettarin.it/penelope.html Unfortunately, Bookeen is refusing to implement a simple selector menu for the dictionaries, plus they are not releasing an official specification for creating them, plus they are censoring the comments of people complaining about their unfulfilled promises about dictionary management and other features (like Bluetooth on the Orizon). I find quite ironic that they post on their blog replies like the following one: (source: http://bookeen.com/blog/dictionary-beta-tests-go/ ) |
11-27-2012, 12:02 PM | #23 |
Digital Amanuensis
Posts: 727
Karma: 1446357
Join Date: Dec 2011
Location: Turin, Italy
Device: Several eReaders and tablets
|
Yeah, yet another "go to our kind user's reverse engineering project...":
http://bookeen.com/blog/cybook-odyss...comment-158078 Note: I understand that Bookeen does NOT have the commercial power to embed "commercial" dictionaries in its product (you must be "Amazon", "Kobo" or "Sony" to do that, and you must assure the publishers that you are going to encrypt them or make them unaccessible from the end user.) AND I think that the Cybooks are great because they give you some typographic/management features that other eReaders simply do not have. Including the possibility of adding your own dictionaries (now, also Kobo Glo has that). BUT I am quite annoyed by the fact that Bookeen is not providing an official specification AND that they have not implemented the (rather trivial) menu for letting the user choose which dictionary she prefers. PLUS, the fact that I wrote them months ago, offering advice (for free!) AND they turned down my offer in a rather swift way, does not help... |
11-28-2012, 01:08 AM | #24 |
Member
Posts: 19
Karma: 10
Join Date: Nov 2012
Device: Bookeen Cybook Odyssey HD Frontlight
|
Ciao Alberto,
grazie for the replies. Now I see a lot more clearly... Booken said soemthing about a new firmware being able to choose directories. As for the "automatic" dictionary choice of the thing, I have read that section but did not really understand it fully. I have to read it again, thoroughly :-) My version of "penelop3" seems not to throw syntax errors any more, but as for the windows encoding issue I cannot say if it works correctly. As I wrote before, I did the conversions on Linux with the original penelope script. (Thanks again for it!) Well, we do not have other chances as for wait for bookeen to move. So I do it... If I have any informations I of course shall share it with you! BR Nat |
11-28-2012, 04:37 AM | #25 |
Member
Posts: 19
Karma: 10
Join Date: Nov 2012
Device: Bookeen Cybook Odyssey HD Frontlight
|
So now almost everything is working correctly, despite some dictionaries not being accurate enough, and not being able to handle accented characters in some foreign languages (eg. hungarian).
You can use them ordinary if you name them correctly, and you can even misuse them "cross" if you fakename them :-) So if you have a german interface and a french book but want to use a fr-en dict, you just rename the fr-en dict to fr-de and then it pops up as french-to-english in the german interface. Thanks again for helping me out in this! BR Nat |
11-28-2012, 05:52 AM | #26 | ||
Digital Amanuensis
Posts: 727
Karma: 1446357
Join Date: Dec 2011
Location: Turin, Italy
Device: Several eReaders and tablets
|
Quote:
Quote:
|
||
11-28-2012, 07:08 AM | #27 |
Member
Posts: 19
Karma: 10
Join Date: Nov 2012
Device: Bookeen Cybook Odyssey HD Frontlight
|
1.)
Sure you are right, but neither I have the time to do this properly :-( 2.) Sorry, of course the simple renaming of the files themselves is not enough, with "fakeneme them" I meant you have to create them "fakely" exact as you write :-) BR Nat |
11-28-2012, 07:36 AM | #28 |
Digital Amanuensis
Posts: 727
Karma: 1446357
Join Date: Dec 2011
Location: Turin, Italy
Device: Several eReaders and tablets
|
Sure, no problem.
Thanks for confirming the function of the language metadata. EDIT: changed "issue with" (which might have been confusing) with "function of". Last edited by AlPe; 11-28-2012 at 02:13 PM. |
11-28-2012, 08:30 AM | #29 |
Member
Posts: 19
Karma: 10
Join Date: Nov 2012
Device: Bookeen Cybook Odyssey HD Frontlight
|
And, this is not theory, I tried it and it works. BR Nat
|
11-28-2012, 04:01 PM | #30 |
Digital Amanuensis
Posts: 727
Karma: 1446357
Join Date: Dec 2011
Location: Turin, Italy
Device: Several eReaders and tablets
|
I tried to convert penelope.py to Python 3.
Unfortunately 2to3 just provides, in this case, some trivial translation (print "stuff" is now print("stuff") and the like) but it seems that all the read/write operations must be checked manually due to the change in the default data type to Unicode. And I am really lacking time for this. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Cybook odyssey vs Sony prs-t1 | mentallyinspired | Which one should I buy? | 4 | 07-03-2012 04:57 AM |
Hi there, from Paris, with a Bookeen Cybook Odyssey | Pancrazi | Introduce Yourself | 3 | 02-08-2012 11:56 PM |
Odyssey Cybook Odyssey | bob123 | Bookeen | 77 | 01-15-2012 03:52 AM |
Please support the new Cybook Odyssey | TheSFReader | Devices | 10 | 11-22-2011 03:34 AM |
PB302 - How to replace English->Russian dictionary with English only (with defin.)? | guyanonymous | PocketBook | 29 | 08-03-2010 06:05 PM |