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 04-19-2008, 03:08 PM   #481
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 Jellby View Post
Well, now I've tried with Mobireader and with the Cybook, and indeed the links don't work. I think my HTML doesn't have anything strange, I have things like:

<A HREF="#780619">19</A>
...
<A NAME="780619">19/06/1978</A><BR>



Hmm... but how do I create the opf file? Or better, what are opf files? (what is their format? are they text files? can they be easily created from HTML?) I'm using Linux, by the way, so Windows-only tools are of no use to me.
I assume the links works in the html file? You could try to use "a", "href" and "name" and see if it works.

opf files are documented on the MobiPocket web site. The contain meta information and pointers to the html files that te book consists of. Thinking about it a bit more I think it will work if you just put the guide thing in the correct place in the html file (the header). html2mobi should expand the links to a filepos and it should work.
tompe is offline   Reply With Quote
Old 04-19-2008, 03:27 PM   #482
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,550
Karma: 19500001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by tompe View Post
I assume the links works in the html file? You could try to use "a", "href" and "name" and see if it works.
Yes, the initial HTML file worked fine. I found the problem, though, it seems the links don't work when they are pure numbers, so I changed "780619" into "week0619" and now it's OK.

Quote:
opf files are documented on the MobiPocket web site. The contain meta information and pointers to the html files that te book consists of. Thinking about it a bit more I think it will work if you just put the guide thing in the correct place in the html file (the header). html2mobi should expand the links to a filepos and it should work.
Thanks, I'll try that.

EDIT: Yes, it works if I add the <guide></guide> thing in the <head> section of the HTML file. Now the only thing missing, for the moment, is how the reader computes the location for the "Start Reading" link, since it doesn't seem to be defined anywhere.

Last edited by Jellby; 04-20-2008 at 12:49 PM.
Jellby is offline   Reply With Quote
Advert
Old 04-24-2008, 12:20 PM   #483
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 will do a new release in a couple of days. I have added possibility to set language and description and will add setting of subjects. I will probably also add an imageresize flag in spite of my opinion about this... Anything else simple I should add when I am looking at the code?

Concerning language setting. Now you can set all languages if you specify the number for it. I also have in my code:
Code:
my %langmap = ("en-us" => 0x0409,
               "sv"    => 0x041d,
               "fi"    => 0x000b,
               "en"    => 0x0009,
               "en-gb" => 0x0809);
If peole wanting to use this give me the line for your language I will add it here. Or give me a pointer to a list of this mapping. The ides was that the string is what is specified in the opf file.
tompe is offline   Reply With Quote
Old 04-24-2008, 01:38 PM   #484
nrapallo
GuteBook/Mobi2IMP Creator
nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.
 
nrapallo's Avatar
 
Posts: 2,958
Karma: 2530691
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
Quote:
Originally Posted by tompe View Post
Anything else simple I should add when I am looking at the code?
Yeah, how about a simple usage message when no arguments are passed.

This is helpful when the perl code is compiled into a windows executable and you no longer have access (OK easy access) to the source code and documentation therein.

Nothing fancy, just straight forward command line syntax.

BTW, if you look at mobi2imp.pl, I went overboard there!

Last edited by nrapallo; 04-24-2008 at 01:40 PM.
nrapallo is offline   Reply With Quote
Old 04-24-2008, 01:56 PM   #485
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,550
Karma: 19500001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by tompe View Post
If peole wanting to use this give me the line for your language I will add it here. Or give me a pointer to a list of this mapping. The ides was that the string is what is specified in the opf file.
I don't know if this is the mapping you want, but it seems to fit with your list (except that "sv" is 0x001d and 0x041d is "sv-SE"):

http://msdn2.microsoft.com/en-us/lib...fo(VS.71).aspx
Jellby is offline   Reply With Quote
Advert
Old 04-24-2008, 02:12 PM   #486
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 nrapallo View Post
Yeah, how about a simple usage message when no arguments are passed.

This is helpful when the perl code is compiled into a windows executable and you no longer have access (OK easy access) to the source code and documentation therein.

Nothing fancy, just straight forward command line syntax.
Damn, you remembered

But that is writing documentation and not simple... I will add something.
tompe is offline   Reply With Quote
Old 04-26-2008, 08:47 PM   #487
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 nrapallo View Post
This is helpful when the perl code is compiled into a windows executable and you no longer have access (OK easy access) to the source code and documentation therein.
Just a reminder that if you use an ordinary Perl program the standard way is to do "perldoc programname" to get the documentation and that works for MobiPerl also. But it does not work if you use the Windows binaries.

I have now added printout of usage if programs are started without arguments.
tompe is offline   Reply With Quote
Old 04-27-2008, 07:51 AM   #488
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.38 available (no Windows binaries yet...)

Verson 0.0.38 is available at

https://dev.mobileread.com/trac/mobiperl/

The actual release files are at

https://dev.mobileread.com/dist/tompe/mobiperl/

No Windows binaries for this version yet. Feel free to contribute them...

Changes in 0.0.38:
  • Added flag --description to mobi2mobi.
  • Added flag --language to mobi2mobi.
  • Read title from mbp file (not tested...) in mobi2mobi.
  • Unpack directory argument is now optional for mobi2html.
  • Added print of usage when programs are started without argument.
  • --imagerescale flag added to a mobi2mobi and *2mobi programs. Default is rescaling. To not rescale use "--imagerescale 0".
  • %langmap in MobiHeader.pm extended but it is still not compleat.
  • Added flag --subject to mobi2mobi. Currently only one subject can be set.
tompe is offline   Reply With Quote
Old 04-27-2008, 09:00 AM   #489
Gudy
Wizard
Gudy ought to be getting tired of karma fortunes by now.Gudy ought to be getting tired of karma fortunes by now.Gudy ought to be getting tired of karma fortunes by now.Gudy ought to be getting tired of karma fortunes by now.Gudy ought to be getting tired of karma fortunes by now.Gudy ought to be getting tired of karma fortunes by now.Gudy ought to be getting tired of karma fortunes by now.Gudy ought to be getting tired of karma fortunes by now.Gudy ought to be getting tired of karma fortunes by now.Gudy ought to be getting tired of karma fortunes by now.Gudy ought to be getting tired of karma fortunes by now.
 
Gudy's Avatar
 
Posts: 1,154
Karma: 3252017
Join Date: Jan 2008
Location: Germany
Device: Pocketbook Touch Lux (623)
Quote:
Originally Posted by tompe View Post
No Windows binaries for this version yet. Feel free to contribute them...
Here you are.
Attached Files
File Type: zip mobiperl-win-0.0.38.zip (9.46 MB, 393 views)
Gudy is offline   Reply With Quote
Old 04-27-2008, 09:24 AM   #490
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
Thanks. Windows binaries also uploaded to dist directory.
tompe is offline   Reply With Quote
Old 04-27-2008, 07:08 PM   #491
Jad
Groupie
Jad has learned how to read e-booksJad has learned how to read e-booksJad has learned how to read e-booksJad has learned how to read e-booksJad has learned how to read e-booksJad has learned how to read e-booksJad has learned how to read e-books
 
Jad's Avatar
 
Posts: 152
Karma: 772
Join Date: Mar 2008
Location: Perth, Western Australia
Device: Cybook Gen3
Thanks for the great update Tommy. I'll look at adding the new flag options into the Mobi2Mobi GUI shortly.

Thank you also Gudy for the Win32 compile. Makes my life easier if the Perl & Win32 versions are available at the same time to keep the GUI in sync.
Jad is offline   Reply With Quote
Old 04-27-2008, 09:12 PM   #492
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
Remember that there can be more then one Subject in the EXTH. All are printed on the output. But the flag only change the first one.
tompe is offline   Reply With Quote
Old 05-02-2008, 10:16 AM   #493
jontom
Junior Member
jontom began at the beginning.
 
Posts: 6
Karma: 10
Join Date: May 2008
Device: iliad
Error on html2mobi

Hi I've been trying to convert a pdf to mobi file using initially pdfread, this seems to hang after conversion to html. So i tried the html2mobi prog from the latest windows binary (0.38) and it begins to convert but hangs after a couple of images. When I resize the image by 1 or 2% and restart the process it continues and hangs a little further on.

The error message will be something like this: Could not shrink image file size for 66.png at mobiperl/Util.pm line 555. I should mention that i am using the -- imagerescale 0 option to try and get the best image for my iliad.

Any suggestions?

Jontom
jontom is offline   Reply With Quote
Old 05-02-2008, 10:19 AM   #494
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: 79,796
Karma: 146391129
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Try converting the images to JPG and editing the HTML to reflect that they are now JPG and try again.
JSWolf is offline   Reply With Quote
Old 05-02-2008, 10:31 AM   #495
nrapallo
GuteBook/Mobi2IMP Creator
nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.
 
nrapallo's Avatar
 
Posts: 2,958
Karma: 2530691
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
Quote:
Originally Posted by jontom View Post
Hi I've been trying to convert a pdf to mobi file using initially pdfread, this seems to hang after conversion to html. So i tried the html2mobi prog from the latest windows binary (0.38) and it begins to convert but hangs after a couple of images. When I resize the image by 1 or 2% and restart the process it continues and hangs a little further on.

The error message will be something like this: Could not shrink image file size for 66.png at mobiperl/Util.pm line 555. I should mention that i am using the -- imagerescale 0 option to try and get the best image for my iliad.

Any suggestions?

Jontom
tompe, I'll take this one!

May I suggest that you create an empty file called 'debug' in the PDFRead install directory (usually C:\Program Files\PDFRead) and then try the conversion again. This time, at the end, the html and images used in making the .prc will be retained. I use a modified html2mobi (from version 0.37) that forces the 'imagerescale 0' option so as to get the largest possible images on the iLiad.

If you already have access to the resulting .html and .opf, then ignore the above.

Please post your .html and .opf files only here so that we can see if there is something going amiss with your conversion. Also, if you have any full-sized images (.png), what are their sizes generally? s/b 768x935!
nrapallo 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 07:02 AM.


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