09-16-2011, 02:29 PM | #211 |
creator of calibre
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Ah, you want to only allow editing of the content, not the TOC...then yes, decompiling the NCX from the INDX records is fine.
|
09-16-2011, 03:29 PM | #212 | |
Developer
Posts: 155
Karma: 280
Join Date: Nov 2010
Device: Kindle 3 (Keyboard) 3G / iPad 9 WiFi / Google Pixel 6a (Android)
|
Quote:
I asked Kovid to remove that "feature", but he refused to do so. So the only way to find out if a mobi files was created by calibre or not is to search the contributor EXTH (value 108) for the string "calibre". Ciao, Steffen |
|
Advert | |
|
09-17-2011, 02:05 AM | #213 |
Grand Sorcerer
Posts: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Hey fandrieu,
I can't find where it's happening for the life of me, but something in your code is doubling the html output. It doesn't happen with books that have no ncx, but if it does have ncx data, the html file being produced is the original html x 2: as in the whole book and then the whole book all over again. Maybe you'll have better luck spotting it. |
09-17-2011, 10:09 AM | #214 | |
Member
Posts: 11
Karma: 10
Join Date: Sep 2011
Device: kindle 3
|
@kovid: thanks very much for your great app !
@sieberd: thanks for the info, i'll look into it. Quote:
Here's a fixed version including the typos mentioned earlier. ... The bug was a weird collateral of the "ncx filepos anchor injection" code. The duplication occured because an entry had -1 as filepos, meaning an extra large "dataList". The cause was IDXT parsing, some files have an extra null entry at the end. I added two checks to prevent both problems. ... REUP: after posting that i realized it'd be better to use header['count'] to determine when to stop parsing IDXT... Last edited by fandrieu; 09-17-2011 at 11:10 AM. |
|
10-17-2011, 07:31 PM | #215 |
Junior Member
Posts: 6
Karma: 10
Join Date: Sep 2011
Device: Mac
|
I am getting these errors with mobi:
Unpacking Book... Mobipocket version 6 Warning: Unknown metadata with id 405 found Warning: Unknown metadata with id 406 found Warning: Unknown metadata with id 407 found Warning: Unknown metadata with id 403 found Write ncx Palmdoc compression Unpack raw html Decode images Find link anchors Insert data into html Insert hrefs into html Remove empty anchors from html Insert image references into html Write html Write opf Completed But no dat was created just ncx opf and html |
Advert | |
|
10-18-2011, 03:34 AM | #216 | |
The Grand Mouse 高貴的老鼠
Posts: 71,507
Karma: 306214458
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
|
Quote:
|
|
10-24-2011, 06:16 PM | #217 |
Grand Sorcerer
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
|
While the tool works great with regular books, it seems to have problems with some dictionaries. When I unpacked my simple Swedish-English dictionary, which I uploaded some time ago, I noticed that the <DictionaryInLanguage> value was not correctly recovered. My original .opf file contained the following entries:
<DictionaryInLanguage>sv</DictionaryInLanguage> <DictionaryOutLanguage>en-us</DictionaryOutLanguage> However, the reverse engineered .opf file contained the following entries: <DictionaryInLanguage>en</DictionaryInLanguage> <DictionaryOutLanguage>en-us</DictionaryOutLanguage> Since the <DictionaryInLanguage> value is used by the Kindle for automatic dictionary selection, a wrong value will cause problems. I also got a lot of "Delete operation of inflection rule failed" error messages, but I remember having read somewhere that there are still problems with inflections. |
10-25-2011, 02:57 AM | #218 | |
The Grand Mouse 高貴的老鼠
Posts: 71,507
Karma: 306214458
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
|
Quote:
|
|
10-27-2011, 05:46 AM | #219 | |
The Grand Mouse 高貴的老鼠
Posts: 71,507
Karma: 306214458
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
|
Quote:
Anyway, I've uploaded version 0.32 to the fifth post in this thread. It includes some refactoring by DiapDealer, which will hopefully make maintenance easier. |
|
10-27-2011, 06:01 AM | #220 | |
Developer
Posts: 155
Karma: 280
Join Date: Nov 2010
Device: Kindle 3 (Keyboard) 3G / iPad 9 WiFi / Google Pixel 6a (Android)
|
Quote:
Normally this shouldn't happen, but for non-ascii letters the letters don't match. I assume that the text encodings of the rules and the actual text are different. But I have no idea what encoding is used in the rules. I could provide the source of a minimal dictionary which shows the error if needed. Ciao, Steffen |
|
10-27-2011, 07:00 AM | #221 |
The Grand Mouse 高貴的老鼠
Posts: 71,507
Karma: 306214458
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
|
|
10-27-2011, 05:36 PM | #222 |
Developer
Posts: 155
Karma: 280
Join Date: Nov 2010
Device: Kindle 3 (Keyboard) 3G / iPad 9 WiFi / Google Pixel 6a (Android)
|
Ok, here is the promised sample dictionary. The first entry creates the error.
deleteruleerror.zip Ciao, Steffen |
10-28-2011, 08:08 AM | #223 | |
The Grand Mouse 高貴的老鼠
Posts: 71,507
Karma: 306214458
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
|
Quote:
A quick hack at the right place to substitute 0xDF back in for 0x0573 fixes things for this instance. Unfortunately, I don't really understand why the error is happening, and it isn't a general fix — there are still problems with the swedish dictionary mentioned above. Perhaps with access to the source for the swedish dictionary, it might be possible to work out what's going on. |
|
10-29-2011, 06:59 AM | #224 | |
Grand Sorcerer
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
Code:
<idx:infl><idx:iform value="abc-böckers"/></idx:infl> Unfortunately, there seem to be other serious issues with accented characters which you'll see when you look at the original and the reconstructed .html files. Even though the reconstructed dictionary looks the same as the original when it's compiled, it no longer works as a dictionary. |
|
10-29-2011, 07:14 AM | #225 | |
Developer
Posts: 155
Karma: 280
Join Date: Nov 2010
Device: Kindle 3 (Keyboard) 3G / iPad 9 WiFi / Google Pixel 6a (Android)
|
Quote:
In mobipocket reader, a dictionary uses javascript to implement dictionary search. This might indeed not work. My focus was to use the recompiled dictionary in the kindle app (as the formatting of my originial dictionary made it unsuitable for the popup dictionary window), which should work as the kindle app only uses the dicitionary index and doesn't support javascript (so I removed the javascript code before recompiling the dictionary). Ciao, Steffen Last edited by siebert; 10-29-2011 at 07:20 AM. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Can i rotate text and insert images in Mobi and EPUB? | JanGLi | Kindle Formats | 5 | 02-02-2013 04:16 PM |
PDF to Mobi with text and images | pocketsprocket | Kindle Formats | 7 | 05-21-2012 07:06 AM |
Mobi files - images | DWC | Introduce Yourself | 5 | 07-06-2011 01:43 AM |
pdf to mobi... creating images rather than text | Dumhed | Calibre | 5 | 11-06-2010 12:08 PM |
Transfer of images on text files | anirudh215 | 2 | 06-22-2009 09:28 AM |