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 02-15-2008, 09:34 AM   #1
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,771
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
mobi2oeb

After an 8-hour hackathon I'm happy to announce mobi2oeb. Converts (non DRMed) .mobi/.prc files to an exploded OEBPS ebook. Supports all three levels of compression in .mobi files. Part of libprs500 v0.4.37. To use

Code:
mobi2oeb book.mobi
This is an initial release, so expect bugs. Thanks to darkninja for the HUFF/CDIC decompression code.
kovidgoyal is offline   Reply With Quote
Old 02-15-2008, 09:55 AM   #2
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
Great! Thanks, Kovid; this will make it very easy to edit a MobiPocket book. Use your tool to explode to OEB, make the edits, then use Mobi Creator to rebuild it.
HarryT is offline   Reply With Quote
Old 02-16-2008, 09:25 AM   #3
Ortep
Fanatic
Ortep has a complete set of Star Wars action figures.Ortep has a complete set of Star Wars action figures.Ortep has a complete set of Star Wars action figures.Ortep has a complete set of Star Wars action figures.Ortep has a complete set of Star Wars action figures.
 
Posts: 527
Karma: 470
Join Date: Sep 2007
Location: The Netherlands
Device: Kindle Oasis
Quote:
Originally Posted by kovidgoyal View Post
After an 8-hour hackathon I'm happy to announce mobi2oeb. Converts (non DRMed) .mobi/.prc files to an exploded OEBPS ebook. Supports all three levels of compression in .mobi files. Part of libprs500 v0.4.37.


Sounds great, But look what I got when I clicked on the link:

Code:
There is a problem with this website's security certificate. 
 
   
 The security certificate presented by this website was not issued by a trusted certificate authority.

Security certificate problems may indicate an attempt to fool you or intercept any data you send to the server.  
  We recommend that you close this webpage and do not continue to this website.  
  Click here to close this webpage.  
  Continue to this website (not recommended).  
     More information 


If you arrived at this page by clicking a link, check the website address in the address bar to be sure that it is the address you were expecting. 
When going to a website with an address such as https://example.com, try adding the 'www' to the address, https://www.example.com. 
If you choose to ignore this error and continue, do not enter private information into the website. 

For more information, see "Certificate Errors" in Internet Explorer Help.
Ortep is offline   Reply With Quote
Old 02-16-2008, 09:40 AM   #4
Nate the great
Sir Penguin of Edinburgh
Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.
 
Nate the great's Avatar
 
Posts: 12,375
Karma: 23555235
Join Date: Apr 2007
Location: DC Metro area
Device: Shake a stick plus 1
That's because he doesn't have the money to pay for a security certificate. His site has alway been that way. I just checked again; his site is still there. I canvouch for him.
Nate the great is offline   Reply With Quote
Old 02-16-2008, 10:13 AM   #5
Ortep
Fanatic
Ortep has a complete set of Star Wars action figures.Ortep has a complete set of Star Wars action figures.Ortep has a complete set of Star Wars action figures.Ortep has a complete set of Star Wars action figures.Ortep has a complete set of Star Wars action figures.
 
Posts: 527
Karma: 470
Join Date: Sep 2007
Location: The Netherlands
Device: Kindle Oasis
Ok, thanks

We can't be to carefull these days
Ortep is offline   Reply With Quote
Old 02-16-2008, 10:30 AM   #6
FixB
Groupie
FixB has a complete set of Star Wars action figures.FixB has a complete set of Star Wars action figures.FixB has a complete set of Star Wars action figures.FixB has a complete set of Star Wars action figures.FixB has a complete set of Star Wars action figures.
 
FixB's Avatar
 
Posts: 186
Karma: 499
Join Date: Oct 2007
Location: France, Toulouse
Device: Sony PRS500
Thanks kovidgoyal !
Once again, your work helps us all so much !!
FixB is offline   Reply With Quote
Old 02-17-2008, 01:02 AM   #7
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 kovidgoyal View Post
After an 8-hour hackathon I'm happy to announce mobi2oeb. Converts (non DRMed) .mobi/.prc files to an exploded OEBPS ebook. Supports all three levels of compression in .mobi files. Part of libprs500 v0.4.37. To use

Code:
mobi2oeb book.mobi
This is an initial release, so expect bugs. Thanks to darkninja for the HUFF/CDIC decompression code.
I used my 'mobi2imp' (version 5) to output 'SpaceEncyclopedia.mobi' into OEBFF (.oeb) output. I use:
Code:
mobi2imp --oeb 'SpaceEncyclopedia.mobi' Space
Can you check it against the output of mobi2oeb? Can you load my .oeb in mobicreator or use it with libprs500 utils?

Our (ebook format) worlds are crossing...

-Nick
Attached Files
File Type: zip Mobipocket - Space Encyclopedia-oeb.zip (689.4 KB, 2604 views)
nrapallo is offline   Reply With Quote
Old 02-17-2008, 11:03 AM   #8
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,771
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
There are really only a handful of things to do in mobi->oeb conversion so I see no reason why your OEB output should be wrong. THey are
1) Read metadata from the EXTH header to create the .opf file
2) Decompress the text using the three possible compression chemes
3) Replace the filepos attributes
4) Replace the mobi specific tags like <mbpagebreak>
5) Extract the images and replace the <img recindex> tags

At the moment, the only not fullly implemented step is 4). The only mobi specific markup that mobi2oeb replaces is <mbpagebreak>
kovidgoyal is offline   Reply With Quote
Old 02-17-2008, 11:37 AM   #9
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 kovidgoyal View Post
There are really only a handful of things to do in mobi->oeb conversion so I see no reason why your OEB output should be wrong. THey are
1) Read metadata from the EXTH header to create the .opf file
2) Decompress the text using the three possible compression chemes
3) Replace the filepos attributes
4) Replace the mobi specific tags like <mbpagebreak>
5) Extract the images and replace the <img recindex> tags

At the moment, the only not fullly implemented step is 4). The only mobi specific markup that mobi2oeb replaces is <mbpagebreak>
Hey, this reads like psuedo-code and would be a great guide to 'rolling-your-own' program.

However, for me, this was all accomplished by using tompe's 'mobi2html' and making my .IMP specific changes to get 'mobi2imp'.

So, in the end, it appears we get the same result.

Cool!

-Nick
nrapallo is offline   Reply With Quote
Old 03-04-2008, 07:05 PM   #10
brecklundin
Banned
brecklundin is as sexy as a twisted cruller doughtnut.brecklundin is as sexy as a twisted cruller doughtnut.brecklundin is as sexy as a twisted cruller doughtnut.brecklundin is as sexy as a twisted cruller doughtnut.brecklundin is as sexy as a twisted cruller doughtnut.brecklundin is as sexy as a twisted cruller doughtnut.brecklundin is as sexy as a twisted cruller doughtnut.brecklundin is as sexy as a twisted cruller doughtnut.brecklundin is as sexy as a twisted cruller doughtnut.brecklundin is as sexy as a twisted cruller doughtnut.brecklundin is as sexy as a twisted cruller doughtnut.
 
Posts: 1,906
Karma: 15348
Join Date: Jun 2007
Device: mine
kovid....kovid...kovid....awesome...thanks!!

here is the best I can offer in return:



She is yours...
brecklundin is offline   Reply With Quote
Old 03-04-2008, 07:24 PM   #11
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,771
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
I appreciate the gesture, but I have to say I like 'em with a leetle more meat on the bones
kovidgoyal is offline   Reply With Quote
Old 03-07-2008, 01:12 AM   #12
brecklundin
Banned
brecklundin is as sexy as a twisted cruller doughtnut.brecklundin is as sexy as a twisted cruller doughtnut.brecklundin is as sexy as a twisted cruller doughtnut.brecklundin is as sexy as a twisted cruller doughtnut.brecklundin is as sexy as a twisted cruller doughtnut.brecklundin is as sexy as a twisted cruller doughtnut.brecklundin is as sexy as a twisted cruller doughtnut.brecklundin is as sexy as a twisted cruller doughtnut.brecklundin is as sexy as a twisted cruller doughtnut.brecklundin is as sexy as a twisted cruller doughtnut.brecklundin is as sexy as a twisted cruller doughtnut.
 
Posts: 1,906
Karma: 15348
Join Date: Jun 2007
Device: mine
your wish is our command oh great code breaker...

brecklundin is offline   Reply With Quote
Old 03-07-2008, 09:41 AM   #13
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
Nice work, thanks! One question though: is it normal that the exploded html file has only three lines? Line one is always "<html><head>" line two is "<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />" and line three is the rest. It's no problem to make some breaks with par, but the resulting html code is not very cleary arranged for manual editing.
IceHand is offline   Reply With Quote
Old 03-07-2008, 10:56 AM   #14
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 IceHand View Post
Nice work, thanks! One question though: is it normal that the exploded html file has only three lines? Line one is always "<html><head>" line two is "<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />" and line three is the rest. It's no problem to make some breaks with par, but the resulting html code is not very cleary arranged for manual editing.
All of the pre-.epub HTML-based e-book formats seems to do this – strip out all “unnecessary” whitespace to save space. ConvertLIT tries to fix this for LIT files by adding whitespace to the generated HTML, but it gets it wrong often enough to be troublesome. For adding whitespace and otherwise cleaning up grody HTML check out HTML Tidy.
llasram is offline   Reply With Quote
Old 03-07-2008, 11:33 AM   #15
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
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?
IceHand 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 07:44 AM.


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