![]() |
#346 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,374
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You can specify the encoding when using mobigen. I haven't bothered with getting the filepos exactly right since it's not that critical. As long as you make sure you dont insert an anchor inside another <> you're fine.
If I had to guess I'd say filepos represents byte position not character position, since in the cp1252 encoding every character is one byte and that was the original encoding mobigen used, back when it was prcgen. |
![]() |
![]() |
![]() |
#347 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,452
Karma: 7185064
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Kindle Voyage, Nexus 5, Kindle PW
|
Quote:
Yes, i assume you can just put an anchor somewhere but I wanted to re-use the existing anchor if it existed... |
|
![]() |
![]() |
![]() |
#348 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,452
Karma: 7185064
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Kindle Voyage, Nexus 5, Kindle PW
|
Version 0.0.32 available (no Windows binaries yet)
Verson 0.0.32 is available at
http://www.ida.liu.se/~tompe/mobiperl/ No Windows binaries for this version yet. Feel free to contribute them... I removed mobi2imp from the distribution since it is distributed in another thread and it is to much work to keep it updated for me. If things stabilize I can put it back if people think it is a good idea. I added some instruction for Mac on the web site. Please give feedback how to make them better if you try to use them. Changes in 0.0.32:
|
![]() |
![]() |
![]() |
#349 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,551
Karma: 64462893
Join Date: Jan 2008
Location: Harrisburg outskirts
Device: Palms, K1-4s, iPads, iPhones, KV, KO1
|
Oops -- meant to be a PM.
Last edited by badgoodDeb; 02-26-2008 at 07:58 PM. Reason: oops -meant for a PM |
![]() |
![]() |
![]() |
#350 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,452
Karma: 7185064
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Kindle Voyage, Nexus 5, Kindle PW
|
Version 0.0.33 available (no Windows binaries yet)
There is a version 0.0.33 now since there was a bug in the utf-8 fix that caused books with codepage 1252 converted to HTML not to be displayed correctly.
|
![]() |
![]() |
![]() |
#351 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,452
Karma: 7185064
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Kindle Voyage, Nexus 5, Kindle PW
|
Version 0.0.34 available (no Windows binaries yet)
Just so the best version is available if somebody do a Windows version...
I did a 0.0.34 and the change is:
|
![]() |
![]() |
![]() |
#352 | |
Fanatic
![]() ![]() ![]() ![]() ![]() Posts: 527
Karma: 470
Join Date: Sep 2007
Location: The Netherlands
Device: Kindle Oasis
|
Quote:
If there is corruption in the file, it is something that was caused by the software used in creating it. I have 9 others with the same problem. The corruption has no (direct) effect when I use them on my Cybook. The only thing I did notice was that the cover was not visible. So that was when I started to experiment with mobi2mobi. And when I didn't like the result I used mobi2html in an attempt to start from scratch. Perhaps I should contact the writer and tell him about it |
|
![]() |
![]() |
![]() |
#353 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,452
Karma: 7185064
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Kindle Voyage, Nexus 5, Kindle PW
|
The only noticeable effect is probably that the links will jump to the wrong file position but you will only notice that if it jumps inside a format tag or something similar and in the case of extra bytes the jump will be too short and then you will probably not notice it.
|
![]() |
![]() |
![]() |
#354 |
Linux User
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 323
Karma: 13682
Join Date: Aug 2007
Location: Germany
Device: Kindle 3
|
Any chance that you'll include huffdic compression support for mobi2html?
|
![]() |
![]() |
![]() |
#355 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,452
Karma: 7185064
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Kindle Voyage, Nexus 5, Kindle PW
|
Maybe. But I would have to convert the code and it is not trivial. If somebody read the Python code and write a "mathematical" specification of the algorithm I would definitely implement it. I saw that kovidgoyal had distributed the code under GPL so I can just choose to trust that he is correct in this. Otherwise I had some concern about the status of the resulting code. I will not do the work if I cannot distribute the code under GPL. A written description of the algorithm would also make totally clear that it is no problem to distribute the code under GPL.
|
![]() |
![]() |
![]() |
#356 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,154
Karma: 3252017
Join Date: Jan 2008
Location: Germany
Device: Pocketbook Touch Lux (623)
|
Quote:
Also, you may want to add the Encode package both to the installation instructions on your web site and the mh target in the Makefile. |
|
![]() |
![]() |
![]() |
#357 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,452
Karma: 7185064
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Kindle Voyage, Nexus 5, Kindle PW
|
Quote:
|
|
![]() |
![]() |
![]() |
#358 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,792
Karma: 146391129
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
tompe, can you also check your code against purchased Mobipocket eBooks as well?
|
![]() |
![]() |
![]() |
#359 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,452
Karma: 7185064
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Kindle Voyage, Nexus 5, Kindle PW
|
Quote:
I have now changed the code so that if not "codepage" is specified it does nothing. If 1252 is specified it add the meta header for that. If 65001 (UTF-8) is specified I add meta header for that and decode the byte stream with before sending it to HTML::TreeBuilder. It worked for the Sherlock Holmes omnibus. I will check the UTF-8 example I have and maybe do a new release later today... |
|
![]() |
![]() |
![]() |
#360 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,792
Karma: 146391129
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Please include a Windows edition too.
|
![]() |
![]() |
![]() |
Tags |
mobi2mobi, mobils |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Mobi2Mobi Mobi2Mobi v0.13 - GUI for Mobiperl tools | Jad | Kindle Formats | 476 | 03-15-2015 05:51 PM |
Tools for Editing Kindle .mobi Files? | GJN | Kindle Formats | 33 | 12-26-2013 02:05 PM |
Handy Perl Script to convert HTML0 files to smartquotes | maggotb0y | Sony Reader | 0 | 04-12-2007 11:49 AM |
PRS-500 Perl tools to generate Reader content | TadW | Sony Reader Dev Corner | 0 | 01-08-2007 05:55 AM |
gmail copy (gmcp) - Perl script to copy files to/from Gmail | Colin Dunstan | Lounge | 0 | 09-04-2004 01:24 PM |