Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 05-18-2009, 07:51 PM   #751
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 74,585
Karma: 130140792
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Will opf2mobi convert an ePub to Mobipocket?
JSWolf is offline   Reply With Quote
Old 05-20-2009, 01:22 PM   #752
bobcdy
Fanatic
bobcdy ought to be getting tired of karma fortunes by now.bobcdy ought to be getting tired of karma fortunes by now.bobcdy ought to be getting tired of karma fortunes by now.bobcdy ought to be getting tired of karma fortunes by now.bobcdy ought to be getting tired of karma fortunes by now.bobcdy ought to be getting tired of karma fortunes by now.bobcdy ought to be getting tired of karma fortunes by now.bobcdy ought to be getting tired of karma fortunes by now.bobcdy ought to be getting tired of karma fortunes by now.bobcdy ought to be getting tired of karma fortunes by now.bobcdy ought to be getting tired of karma fortunes by now.
 
bobcdy's Avatar
 
Posts: 527
Karma: 1048576
Join Date: May 2009
Device: bebook; prs-950; nook simple touch; HTC Jetstream tablet
I tried another mobi file with mobi2html with the raw option and everything worked fine. Perhaps there was something wrong with the firs file I tried. Thanks for the fast responses!
Bob
bobcdy is offline   Reply With Quote
Advert
Old 05-21-2009, 09:01 AM   #753
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 74,585
Karma: 130140792
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Is there anyway to import a cover that has a resolution of 510x680 without changing the resolution? If not, then I have a bug to report.

I've found a bug that really needs squashing.. the cover... when adding a cover I get the following...
CREATING COVER IMAGE WITH ID: 7307727
Reading data from file: cover.jpg - 510 x 680 - JPG
SCALE GD: 510 680 -> 480 640

I don't want it scaled. I want it in the original resolution.

Last edited by JSWolf; 05-21-2009 at 09:13 AM.
JSWolf is offline   Reply With Quote
Old 05-26-2009, 09:32 AM   #754
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 JSWolf View Post
Is there anyway to import a cover that has a resolution of 510x680 without changing the resolution? If not, then I have a bug to report.

I've found a bug that really needs squashing.. the cover... when adding a cover I get the following...
CREATING COVER IMAGE WITH ID: 7307727
Reading data from file: cover.jpg - 510 x 680 - JPG
SCALE GD: 510 680 -> 480 640

I don't want it scaled. I want it in the original resolution.
The documentation say --imagerescale 0
tompe is offline   Reply With Quote
Old 05-26-2009, 10:56 AM   #755
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 74,585
Karma: 130140792
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Thanks!
JSWolf is offline   Reply With Quote
Advert
Old 05-26-2009, 04:23 PM   #756
enhan222
Junior Member
enhan222 began at the beginning.
 
Posts: 1
Karma: 10
Join Date: May 2009
Device: kindle1
mobi2html error

Trying mobi2html on WinXP, I first installed ActivePerl 5.8.9 and the required packages. I added the .pl file extention and tried it but the script aborted at line 25:

C:\Documents and Set
tings\Owner\Desktop\New Folder\mobi2html.pl line 25.
BEGIN failed--compilation aborted at C:\Documents and Settings\Owner\Desktop\New
Folder\mobi2html.pl line 25.

UPDATE: I found the html2mobi.exe version and tried this and it work FAR more easily than this other approach with ActivePerl, etc, etc.

Thanks for making this application!

Toby

Last edited by enhan222; 05-26-2009 at 04:45 PM.
enhan222 is offline   Reply With Quote
Old 05-26-2009, 04:47 PM   #757
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 enhan222 View Post
Trying mobi2html on WinXP, I first installed ActivePerl 5.8.9 and the required packages. I added the .pl file extention and tried it but the script aborted at line 25:

C:\Documents and Set
tings\Owner\Desktop\New Folder\mobi2html.pl line 25.
BEGIN failed--compilation aborted at C:\Documents and Settings\Owner\Desktop\New
Folder\mobi2html.pl line 25.

UPDATE: I found the html2mobi.exe version and tried this and it work FAR more easily than this other approach with ActivePerl, etc, etc.

Thanks for making this application!

Toby
Did you copy the MobiPerl directory and put it in the same directory as mobi2html? It seems like it does not find MobiPerl::Util but the error message is a bit confusing.

Or maybe you have to run it with "perl mobi2html..."
tompe is offline   Reply With Quote
Old 06-06-2009, 11:00 AM   #758
barnsdale11
Junior Member
barnsdale11 began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jun 2009
Device: hp ipaq
This is going to sound completely stupid, but I had never seen such a thing as perl before. So if you could help me...

This is my request:

I run on Windows XP, and installed the newest version of ActivePerl.

Then I installed these packages:
* p5-Palm
* TimeDate
* Getopt-Mixed
* Image-Size
* XML-Parser-Lite-Tree
* GD
* Encode
* image-BMP

Then I went to preferences and wrote this repository:
http://theoryx5.uwinnipeg.ca/ppms/package.lst (though it has 0 packages...)

So, what do I do next to install MobiPerl? I want to use Lit2Mobi, but I can't execute anything yet...

Can anyone help me, please?
barnsdale11 is offline   Reply With Quote
Old 06-06-2009, 11:31 AM   #759
wallcraft
reader
wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.
 
wallcraft's Avatar
 
Posts: 6,975
Karma: 5183568
Join Date: Mar 2006
Location: Mississippi, USA
Device: Kindle 3, Kobo Glo HD
Quote:
Originally Posted by barnsdale11 View Post
I run on Windows XP
There are pre-built Windows binaries that don't require Perl, here. You want mobiperl-win-0.0.41.zip.

Note that Calibre (has its own Forum here) can also convert from LIT to MOBI, and it does not require any other software (it is written in Python, but comes pre-built) and also comes with a GUI so you don't need to use the command line (although Calibre's any2mobi --compress ebook.lit will work from the command line like MobiPerl's lit2mobi).
wallcraft is offline   Reply With Quote
Old 06-08-2009, 04:01 AM   #760
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
Hi Tommy,

I've just tried "opf2mobi" for the first time, and I have a question. Apologies if this has been asked before, but I really don't want to read all 50+ pages of this thread .

The end result is excellent, but I've found that it doesn't appear to use the items in the "Guide" section of my OPF file, which work fine with Mobi Creator. I don't get a cover image unless I use the "--coverimage" option, and the "Table of Contents" link in the resulting file takes me to the first page of the file, rather than the "TOC" link defined in the "Guide" section of the file.
HarryT is offline   Reply With Quote
Old 06-08-2009, 06:31 AM   #761
barnsdale11
Junior Member
barnsdale11 began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jun 2009
Device: hp ipaq
Quote:
Originally Posted by wallcraft View Post
There are pre-built Windows binaries that don't require Perl, here. You want mobiperl-win-0.0.41.zip.
Note that Calibre (has its own Forum here) can also convert from LIT to MOBI, and it does not require any other software (it is written in Python, but comes pre-built) and also comes with a GUI so you don't need to use the command line (although Calibre's any2mobi --compress ebook.lit will work from the command line like MobiPerl's lit2mobi).
Thank you very much!! I've just tried Calibre and it works right, and without so much trouble!
barnsdale11 is offline   Reply With Quote
Old 06-08-2009, 07:52 AM   #762
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 HarryT View Post
Hi Tommy,

I've just tried "opf2mobi" for the first time, and I have a question. Apologies if this has been asked before, but I really don't want to read all 50+ pages of this thread .

The end result is excellent, but I've found that it doesn't appear to use the items in the "Guide" section of my OPF file, which work fine with Mobi Creator. I don't get a cover image unless I use the "--coverimage" option, and the "Table of Contents" link in the resulting file takes me to the first page of the file, rather than the "TOC" link defined in the "Guide" section of the file.
As I remember the implementation is a bit limited in functionality. Looking at the code now it seems like it does use the guide section only for TOC and cover image. If you give me an example file with more tags I can probably add more functionality to a future release.

That TOC and coverimage does not work is probably a bug or a limitation. The code looks like:
Code:
                   if ($type eq "toc") {
                        $self->set_toc_href ($c->{"attributes"}->{"href"});
                        print STDERR "TOCHREF: ", $self->get_toc_href (), "\n";
                    }
                    if ($type eq "other.ms-coverimage-standard") {
                        my $href = $c->{"attributes"}->{"href"};
                        $self->set_cover_image ($href);
                    }
So if the identifier is not "toc" and "other.ms-coverimage-standard" it will not work. And example file that does not work would be good to have...
tompe is offline   Reply With Quote
Old 06-08-2009, 09:10 AM   #763
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
Example file

Here's an example.

The file "book.prc" was created from "book.opf" using Mobi Creator. As you'll see when you open it, it has both a cover image, and a "Table of Contents" link which takes you to the TOC. The file "test.mobi" was created from the same OPF file using the command line:

opf2mobi --mobifile test.mobi book.opf

You will find that it has no cover image, and, although it has a "Table of Contents" link, that link takes one to the first page of the book, rather than to the TOC.

I believe that the Guide items in the OPF file are specified as you describe, so any light that you could shed on this would be most welcome.

Thanks!
Attached Files
File Type: zip Test.zip (557.6 KB, 338 views)
HarryT is offline   Reply With Quote
Old 06-08-2009, 09:39 AM   #764
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
Minor change request:

Any OPF file created by Mobi Creator seems to start with the 3 byte sequence:

EF BB BF

immediately before the opening tag <?xml ...

These three bytes make "opf2mobi" give a "junk before XML element" error. Would it be possible to make the tool ignore them?

A little research shows that this is a Unicode "Byte Order Mark" sequence indicating that the file has UTF-8 encoding. See:

http://en.wikipedia.org/wiki/Byte-order_mark

for details.
HarryT is offline   Reply With Quote
Old 06-08-2009, 09:50 AM   #765
pilotbob
Grand Sorcerer
pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.
 
pilotbob's Avatar
 
Posts: 19,832
Karma: 11844413
Join Date: Jan 2007
Location: Tampa, FL USA
Device: Kindle Touch
Quote:
Originally Posted by HarryT View Post
A little research shows that this is a Unicode "Byte Order Mark" sequence indicating that the file has UTF-8 encoding. See:

http://en.wikipedia.org/wiki/Byte-order_mark

for details.
Yea, that is pretty standard for a text file to specify encoding. I think if a file doesn't have them it is assumed to be ANSI something or other.

The XML dom processor that perl has should certainly be able to support this accordingly. But I do admit I don't use perl at all...been quite a while.

BOb
pilotbob is offline   Reply With Quote
Reply

Tags
mobi2mobi, mobils


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 08:16 PM.


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