Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > Kindle Formats

Notices

Reply
 
Thread Tools Search this Thread
Old 01-04-2008, 03:00 PM   #106
tompe
Grand Sorcerer
tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.
 
Posts: 7,452
Karma: 7185064
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Kindle Voyage, Nexus 5, Kindle PW
Quote:
Originally Posted by kovidgoyal View Post
@tompe: From my experience with libprs500, OSX is a royal pain in the ass. It's far and away the worst of the three to support. By default OS X has no compiler installed, your users would have to download Xcode. If you're serious about supporting OSX, I would recommend looking at some solution that allows you to distribute an embedded Perl interpreter.
Aha. The embedded Perl interpreter approach is the one used for the Windows binaries. I will not do OSX binaries since I do not have an OSX machine easily available but if any OSX user would like to contribute binaries they are welcome to do that.
tompe is offline   Reply With Quote
Old 01-04-2008, 09:53 PM   #107
tompe
Grand Sorcerer
tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.
 
Posts: 7,452
Karma: 7185064
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Kindle Voyage, Nexus 5, Kindle PW
Version 0.0.21

I put a web page at http://www.ida.liu.se/~tompe/mobiperl/ describing MobiPerl and I tried to document how to install Perl and required modules.

There is also a version 0.0.21 available (no Windows binaries for this version).

Changes in 0.0.21:
  • Added detection of images that are too large in mobi2mobi
  • Added flag --fiximagesizes to mobi2mobi so it will fix the incorrect image sizes.
  • --htmlfile flag for lit2mobi placed file in wrong dir, fixed now.
  • Added flag --coveroffset to mobi2mobi and fixed a bug relating to this. Now it is possible to change which image that is cover image by just specifying another offset.
  • The distribution is now a packed directory.
  • Added flags --exthtype and --exthdata to mobi2mobi to be able to set any type. Values can be set for unknown types 204, 205, 206, 207, 401, 403. This can help to figure out what these items mean.
tompe is offline   Reply With Quote
Advert
Old 01-06-2008, 03:46 PM   #108
JeffElkins
Guru
JeffElkins is no ebook tyro.JeffElkins is no ebook tyro.JeffElkins is no ebook tyro.JeffElkins is no ebook tyro.JeffElkins is no ebook tyro.JeffElkins is no ebook tyro.JeffElkins is no ebook tyro.JeffElkins is no ebook tyro.JeffElkins is no ebook tyro.JeffElkins is no ebook tyro.
 
JeffElkins's Avatar
 
Posts: 779
Karma: 1416
Join Date: Jan 2008
Device: Kobo Clara 2E/HD, Kindle PW
--addcoverlink

How exactly does this work?

From the console:

Code:
lit2mobi --addcoverlink myfile.lit
I get no cover image in the resulting .mobi file. Did I miss something?
JeffElkins is offline   Reply With Quote
Old 01-06-2008, 06:45 PM   #109
tompe
Grand Sorcerer
tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.
 
Posts: 7,452
Karma: 7185064
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Kindle Voyage, Nexus 5, Kindle PW
Quote:
Originally Posted by JeffElkins View Post
How exactly does this work?

From the console:

Code:
lit2mobi --addcoverlink myfile.lit
I get no cover image in the resulting .mobi file. Did I miss something?
--addcoverlink will add a cover image in the html file but you have to have a cover image that is found in the lit file. If your lit file is missing a coverimage then you can add one by

Code:
lit2mobi --coverimage cover.jpg myfile.lit
If the thumbnail then do not work you can use the --addthumbnail flag to mobi2mobi. But for Gen3 it should be enough to add the coverimage. I will test this functionality a bit more and fix any problems I find to the next release.
tompe is offline   Reply With Quote
Old 01-06-2008, 06:56 PM   #110
tompe
Grand Sorcerer
tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.
 
Posts: 7,452
Karma: 7185064
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Kindle Voyage, Nexus 5, Kindle PW
Found a bug. --coverimage will not work for lit2mobi. But you can use mobi2mobi to add a cover image. Will fix this to the next release.
tompe is offline   Reply With Quote
Advert
Old 01-06-2008, 07:10 PM   #111
JeffElkins
Guru
JeffElkins is no ebook tyro.JeffElkins is no ebook tyro.JeffElkins is no ebook tyro.JeffElkins is no ebook tyro.JeffElkins is no ebook tyro.JeffElkins is no ebook tyro.JeffElkins is no ebook tyro.JeffElkins is no ebook tyro.JeffElkins is no ebook tyro.JeffElkins is no ebook tyro.
 
JeffElkins's Avatar
 
Posts: 779
Karma: 1416
Join Date: Jan 2008
Device: Kobo Clara 2E/HD, Kindle PW
Quote:
Originally Posted by tompe View Post
Found a bug. --coverimage will not work for lit2mobi. But you can use mobi2mobi to add a cover image. Will fix this to the next release.
Thanks! I'm new to the ebook world and so far your apps have been extremely helpful.
JeffElkins is offline   Reply With Quote
Old 01-06-2008, 10:42 PM   #112
tompe
Grand Sorcerer
tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.
 
Posts: 7,452
Karma: 7185064
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Kindle Voyage, Nexus 5, Kindle PW
Version 0.0.22 with Windows Binaries

Version 0.0.22 with Windows binaries are now available via:

http://www.ida.liu.se/~tompe/mobiperl/

Changes in 0.0.22:
  • Fixed so that flags --coverimage, --addthumbnail, --addcoverlink works for html2mobi and lit2mobi.

lit2mobi will try to figure out if there is a cover image available. If none is found or if you want to override the choice use the --coverimage flag. If a cover image is found in some way it will be used as cover image and as thumb nail image (used in MobiPocket desktop version for example). --addcoverlink will add the coverimage first in the document so it is visible in for example FBReader. In Gen3 you will get double cover images with this flag.
tompe is offline   Reply With Quote
Old 01-07-2008, 08:00 AM   #113
Jiiri
Enthusiast
Jiiri has learned how to buy an e-book online
 
Posts: 25
Karma: 78
Join Date: Dec 2007
Device: Kindle
Tompe, quick question. I purchased a Harvard Classic ebook from Amazon (before I found them on this site, unfortunately), and the title is not what I'd like it to be. With other .azw files I've been able to change the extension to prc, run it through the mobi2mobi script, and then rename the .mobi file that results with .azw, and everything has been working.

The problem I'm having now is that I can't seem to change the title on this file, it still shows up in my Kindle wrong. In the Command Prompt it is showing the title as correct, and the author as correct. The name that I don't want but that is showing is listed in mobi2mobi under

EXTH item: 503-503-80- Harvard Classics, Vol. 23: Two years before the mast and twenty-four years after

and;

LONGTITLE: Harvard Classics, Vol. 23: Two years before the mast and twenty-four years after

Do you have any idea which of these strings is the one I need to change? Also, does mobi2mobi allow me to change it? Thanks!

Jiiri
Jiiri is offline   Reply With Quote
Old 01-07-2008, 10:10 AM   #114
tompe
Grand Sorcerer
tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.
 
Posts: 7,452
Karma: 7185064
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Kindle Voyage, Nexus 5, Kindle PW
Quote:
Originally Posted by Jiiri View Post
The problem I'm having now is that I can't seem to change the title on this file, it still shows up in my Kindle wrong. In the Command Prompt it is showing the title as correct, and the author as correct. The name that I don't want but that is showing is listed in mobi2mobi under

EXTH item: 503-503-80- Harvard Classics, Vol. 23: Two years before the mast and twenty-four years after

and;

LONGTITLE: Harvard Classics, Vol. 23: Two years before the mast and twenty-four years after
The LONGTITLE can be changed by mobi2mobi using --title. You can use mobi2mobi without any flag to check the result. It this does not help it must be the 503 that is the problem. With the latest mobi2mobi you might be able to change it with:

mobi2mobi --exthtype 503 --exthdata "New title" --outfile new.awz in.awz

So I wonder what the intended meaning of item 503 is?
tompe is offline   Reply With Quote
Old 01-07-2008, 10:48 AM   #115
Jiiri
Enthusiast
Jiiri has learned how to buy an e-book online
 
Posts: 25
Karma: 78
Join Date: Dec 2007
Device: Kindle
I downloaded the latest version, and tried the string you suggested, with no luck. It's impossible for me to troubleshoot it since I have no idea what the strings even mean or do, not being a programmer. If the problem is the drm of the .azw file, I'd just as soon not spend a lot of time just to find out that I can't do it anyway. If you care at all, I can send you the azw file and let you look at it.
Jiiri is offline   Reply With Quote
Old 01-07-2008, 03:32 PM   #116
tompe
Grand Sorcerer
tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.
 
Posts: 7,452
Karma: 7185064
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Kindle Voyage, Nexus 5, Kindle PW
I got a testfile for this problem and I think I have fixed the problem. The problem occured if item 401 was in the EXTH header and had length 1. I had mistakenly assumed it should have length 4. Things that happens when the format is not documented.

it is probably good to make these assumption. They willl cause bugs but I will get feedback and more data to use to try to figure out what is wrong. So whenever you see something like:

Code:
ERROR: generated EXTH does not match original
MISMATCH POS:878:0x9:0xc
MISMATCH POS:883:0x93:0x0
MISMATCH POS:885:0x0:0x1
MISMATCH POS:886:0x0:0x93
MISMATCH POS:887:0x9:0x0
MISMATCH POS:890:0x0:0x9
in the output from mobi2mobi please tell me and if possible send me the file that caused this.

There is a version 0.0.23 available as tar file but the only change is the one described here so no need to update if you do not have this problem.
tompe is offline   Reply With Quote
Old 01-07-2008, 04:13 PM   #117
JeffElkins
Guru
JeffElkins is no ebook tyro.JeffElkins is no ebook tyro.JeffElkins is no ebook tyro.JeffElkins is no ebook tyro.JeffElkins is no ebook tyro.JeffElkins is no ebook tyro.JeffElkins is no ebook tyro.JeffElkins is no ebook tyro.JeffElkins is no ebook tyro.JeffElkins is no ebook tyro.
 
JeffElkins's Avatar
 
Posts: 779
Karma: 1416
Join Date: Jan 2008
Device: Kobo Clara 2E/HD, Kindle PW
Code:
Treasure_Box - Treasure Box.htm - text/html
RW_~Cover01 - ~Cover01.jpg - image/jpeg
Could not read image file: ~Cover01.jpg
Can't call method "getBounds" on an undefined value at /usr/local/bin/MobiPerl/Util.pm line 25, <OPF> chunk 1.
0.22 fixed my image problem, thanks! I do get the occasional failure as posted above. Not a showstopper for me at all, but thought I'd report it. The ~Cover01.jpg file seems to be fine.
JeffElkins is offline   Reply With Quote
Old 01-07-2008, 04:32 PM   #118
tompe
Grand Sorcerer
tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.
 
Posts: 7,452
Karma: 7185064
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Kindle Voyage, Nexus 5, Kindle PW
Quote:
Originally Posted by JeffElkins View Post
Code:
Treasure_Box - Treasure Box.htm - text/html
RW_~Cover01 - ~Cover01.jpg - image/jpeg
Could not read image file: ~Cover01.jpg
Can't call method "getBounds" on an undefined value at /usr/local/bin/MobiPerl/Util.pm line 25, <OPF> chunk 1.
0.22 fixed my image problem, thanks! I do get the occasional failure as posted above. Not a showstopper for me at all, but thought I'd report it. The ~Cover01.jpg file seems to be fine.
It is the GD module that fails to read the file. Strange, since it shoud read jpeg without problems. I eliminated the message about undefined value. If i have the ~Cover01.jpg file I can try to see why it fails. But as you say, it is not a show stopper.
tompe is offline   Reply With Quote
Old 01-07-2008, 04:40 PM   #119
Jiiri
Enthusiast
Jiiri has learned how to buy an e-book online
 
Posts: 25
Karma: 78
Join Date: Dec 2007
Device: Kindle
Downloading the latest version is causing me some issues. The link at http://www.ida.liu.se/~tompe/mobiperl/ sends me to http://www.ida.liu.se/~tompe/mobiperl/downloads/, which is the same page. When I click on the link there, it takes me to
http://www.ida.liu.se/~tompe/mobiper...oads/downloads
Which is broken.

As soon as I can get it v0.23, I'll test the new work you've done and see if it works on the Kindle. Thanks, Tompe.
Jiiri is offline   Reply With Quote
Old 01-07-2008, 05:10 PM   #120
tompe
Grand Sorcerer
tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.
 
Posts: 7,452
Karma: 7185064
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Kindle Voyage, Nexus 5, Kindle PW
Quote:
Originally Posted by Jiiri View Post
Downloading the latest version is causing me some issues. The link at http://www.ida.liu.se/~tompe/mobiperl/ sends me to http://www.ida.liu.se/~tompe/mobiperl/downloads/, which is the same page. When I click on the link there, it takes me to
http://www.ida.liu.se/~tompe/mobiper...oads/downloads
Which is broken.

As soon as I can get it v0.23, I'll test the new work you've done and see if it works on the Kindle. Thanks, Tompe.
Fixed! I had copied the HTML files to the wrong directory.
tompe is offline   Reply With Quote
Reply

Tags
mobi2mobi, mobils

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
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


All times are GMT -4. The time now is 06:08 AM.


MobileRead.com is a privately owned, operated and funded community.