02-15-2008, 10:34 AM | #1 |
creator of calibre
Posts: 44,572
Karma: 24495948
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 |
02-15-2008, 10:55 AM | #2 |
eBook Enthusiast
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.
|
Advert | |
|
02-16-2008, 10:25 AM | #3 | |
Fanatic
Posts: 527
Karma: 470
Join Date: Sep 2007
Location: The Netherlands
Device: Kindle Oasis
|
Quote:
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. |
|
02-16-2008, 10:40 AM | #4 |
Sir Penguin of Edinburgh
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.
|
02-16-2008, 11:13 AM | #5 |
Fanatic
Posts: 527
Karma: 470
Join Date: Sep 2007
Location: The Netherlands
Device: Kindle Oasis
|
Ok, thanks
We can't be to carefull these days |
Advert | |
|
02-16-2008, 11:30 AM | #6 |
Groupie
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 !! |
02-17-2008, 02:02 AM | #7 | |
GuteBook/Mobi2IMP Creator
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:
Code:
mobi2imp --oeb 'SpaceEncyclopedia.mobi' Space Our (ebook format) worlds are crossing... -Nick |
|
02-17-2008, 12:03 PM | #8 |
creator of calibre
Posts: 44,572
Karma: 24495948
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> |
02-17-2008, 12:37 PM | #9 | |
GuteBook/Mobi2IMP Creator
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:
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 |
|
03-04-2008, 08:05 PM | #10 |
Banned
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... |
03-04-2008, 08:24 PM | #11 |
creator of calibre
Posts: 44,572
Karma: 24495948
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
|
03-07-2008, 02:12 AM | #12 |
Banned
Posts: 1,906
Karma: 15348
Join Date: Jun 2007
Device: mine
|
your wish is our command oh great code breaker...
|
03-07-2008, 10:41 AM | #13 |
Linux User
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.
|
03-07-2008, 11:56 AM | #14 | |
Reticulator of Tharn
Posts: 618
Karma: 400000
Join Date: Jan 2007
Location: EST
Device: Sony PRS-505
|
Quote:
|
|
03-07-2008, 12:33 PM | #15 |
Linux User
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? |
|
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 02:18 PM |
Having problem; mobi2oeb then opening the html in BookDesigner | texasnightowl | Workshop | 4 | 03-04-2009 01:07 AM |
Mobi2oeb is blowing up on a conversion | JSWolf | Calibre | 1 | 08-29-2008 08:35 PM |