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 03-07-2008, 03:20 PM   #16
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,772
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by IceHand View Post
Thanks for the tip, but I already knew of HTML Tidy and it won't generate a cleaned up version if the source file has errors – which includes most exploded Mobipocket html files.

Anyway, I had a closer look at the html code and it seems that running a search and replace for "> <" with ">\n<" does the trick. Maybe an idea for the next mobi2oeb version?
That's not quite safe, what if you have something like
Code:
<font size=4>W</font><font size=2>ord</font>
kovidgoyal is online now   Reply With Quote
Old 03-07-2008, 04:36 PM   #17
IceHand
Linux User
IceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavens
 
IceHand's Avatar
 
Posts: 323
Karma: 13682
Join Date: Aug 2007
Location: Germany
Device: Kindle 3
Quote:
Originally Posted by kovidgoyal View Post
That's not quite safe, what if you have something like
Code:
<font size=4>W</font><font size=2>ord</font>
Then nothing will happen for that line. It's >space< that would be replaced with >line break< which gives the same output.

>< with no space between should of course not be separated by a line break.
IceHand is offline   Reply With Quote
Advert
Old 03-07-2008, 07:26 PM   #18
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,772
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Are there spaces in the output HTML? Seems odd there would be, if the creation tools are stripping unneeded whitespace characters.
kovidgoyal is online now   Reply With Quote
Old 03-08-2008, 06:59 AM   #19
IceHand
Linux User
IceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavens
 
IceHand's Avatar
 
Posts: 323
Karma: 13682
Join Date: Aug 2007
Location: Germany
Device: Kindle 3
Yes, there are. To me it doesn't look like that the creation tools are stripping unneeded whitespace characters, but rather like either they are converting line breaks to whitespaces (would seem odd to me, if they would do that) or the script used for exploding to html misinterprets line breaks as whitespaces (that's only a guess of course).

Here's a small sample output from mobi2oeb from a selfmade mobi file. Notice that whereever there is "> <" there should have been a line break between:

Code:
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<guide></guide></head><body><br/><br/> <h1 align="center"><b>Book Title</b></h1> <br/> <h2 align="center">Author Name</h2> </body></html>
IceHand is offline   Reply With Quote
Old 03-08-2008, 02:39 PM   #20
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,772
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
OK will be in next release.
kovidgoyal is online now   Reply With Quote
Advert
Old 03-09-2008, 06:50 AM   #21
IceHand
Linux User
IceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavens
 
IceHand's Avatar
 
Posts: 323
Karma: 13682
Join Date: Aug 2007
Location: Germany
Device: Kindle 3
Great, thanks!
IceHand is offline   Reply With Quote
Old 03-12-2008, 10:00 AM   #22
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
Is there an oeb2mobi?

As .oeb (an OEBFF container produced by eBook Publisher) is a 'generic' self-contained format, are there any tools you may have that convert from it to mobi format? to any format?

I'm adding .oeb as an output format to PDFRead and will soon release same as version 1.8 (with Ashish Kulkarni's permission). I wanted to easily allow mobipocket users to benefit from this addition as PDFRead does not presently support .prc output formats natively.

By the way, I also added .html as an output format to PDFRead which produces a .opf file along with this, so I guess opf2mobi or Mobipocket creator can do the trick for mobipocket users. However, I'm having issues with this as the .opf file produced is not mobipocket specific and breaks sometimes.

I prefer however a direct .oeb to .mobi tool, if there is one already.
nrapallo is offline   Reply With Quote
Old 03-12-2008, 12:19 PM   #23
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,772
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
mobi2oeb doesn't actually produce an oeb file, which is really just a zipped up set of HTML + OPF files. You should be talking to tompe, the creator of opf2mobi.
kovidgoyal is online now   Reply With Quote
Old 03-17-2008, 10:12 AM   #24
IceHand
Linux User
IceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavens
 
IceHand's Avatar
 
Posts: 323
Karma: 13682
Join Date: Aug 2007
Location: Germany
Device: Kindle 3
Hm, that's strange – the resulting HTMLs from huffdic compressed e-books from HarperCollins are twice as big as they should be. I looked at the generated HTMLs and found out that after they should end, the books start again with the table of contents like:
Title page(s)
Table of Contents
Book content
Book ending
Table of Contents (this and the following content shouldn't be there)
Book content
Book ending

You can test this with the free e-book Flight of the Nighthawks by Raymond E. Feist.
IceHand is offline   Reply With Quote
Old 03-17-2008, 10:24 AM   #25
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 IceHand View Post
Hm, that's strange – the resulting HTMLs from huffdic compressed e-books from HarperCollins are twice as big as they should be. I looked at the generated HTMLs and found out that after they should end, the books start again with the table of contents like:
Title page(s)
Table of Contents
Book content
Book ending
Table of Contents (this and the following content shouldn't be there)
Book content
Book ending

You can test this with the free e-book Flight of the Nighthawks by Raymond E. Feist.

Actually, I got similar results (duplicated HTML code) using the Mobipocket sample file, SpaceEncyclopedia.mobi, which I believe uses standard compression.
nrapallo is offline   Reply With Quote
Old 03-17-2008, 12:33 PM   #26
llasram
Reticulator of Tharn
llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.
 
llasram's Avatar
 
Posts: 618
Karma: 400000
Join Date: Jan 2007
Location: EST
Device: Sony PRS-505
Quote:
Originally Posted by nrapallo View Post
Actually, I got similar results (duplicated HTML code) using the Mobipocket sample file, SpaceEncyclopedia.mobi, which I believe uses standard compression.
kovidgoyal's got it fixed in svn.
llasram is offline   Reply With Quote
Old 03-17-2008, 12:50 PM   #27
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 llasram View Post
kovidgoyal's got it fixed in svn.
Thanks, good to know!
nrapallo is offline   Reply With Quote
Old 11-14-2008, 11:22 PM   #28
FizzyWater
You kids get off my lawn!
FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.
 
FizzyWater's Avatar
 
Posts: 4,220
Karma: 73492664
Join Date: Aug 2007
Location: Columbus, Ohio
Device: Oasis 2 and Libra H2O and half a dozen older models I can't let go of
Did something change in mobi2oeb recently? It looks like it's now converting any HTML code using
Code:
<i></i>
to
Code:
<span="italic"></span>
.

Is there a way to turn that off? I looked at the User Guide and didn't find anything in the arguments.

The reason I ask is, I can't get my copy of Word (2002) to recognize "span" tags in HTML. So I lose all my italic formatting when I open the HTML output in Word.

Thanks!
FizzyWater is offline   Reply With Quote
Old 11-15-2008, 01:21 AM   #29
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,772
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
yeah it's changed, the reason is that mobipocket html nests <i> and <b> levels at arbitrary depths which causes problems with some HTML parsers. It cant be turned off.
kovidgoyal is online now   Reply With Quote
Old 11-15-2008, 01:41 AM   #30
FizzyWater
You kids get off my lawn!
FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.
 
FizzyWater's Avatar
 
Posts: 4,220
Karma: 73492664
Join Date: Aug 2007
Location: Columbus, Ohio
Device: Oasis 2 and Libra H2O and half a dozen older models I can't let go of
Sigh.

Thanks, Kovid. I appreciate the answer. Not happy news (for me), but at least I know for sure.

There's still tompe's "mobi2html", for the time being, anyway.

Last edited by FizzyWater; 11-15-2008 at 05:59 PM.
FizzyWater is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
okay im stupid, but how do you use the mobi2oeb plugin? grechzoo Plugins 3 06-03-2010 01:18 PM
Having problem; mobi2oeb then opening the html in BookDesigner texasnightowl Workshop 4 03-04-2009 12:07 AM
Mobi2oeb is blowing up on a conversion JSWolf Calibre 1 08-29-2008 07:35 PM


All times are GMT -4. The time now is 09:35 AM.


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