I would like to split one of the books I have in Mobi format in three different parts (ie 3 different files). Is this possible without having to convert it to something like word and then reconvert it into mobi?

I would like to split one of the books I have in Mobi format in three different parts (ie 3 different files). Is this possible without having to convert it to something like word and then reconvert it into mobi?

I do not need any text editing, just split.

Many thanks!

You do not need to convert it to word. Kindleunpack can take it apart and produce some original opf and html files that can be used to split the parts. If there is a mobi KF8 inside then it will regenerate an ePub that can be edit in Sigil or other ePub editing tool and then you can use KindleGen to put it back together. Mobi these days can be just a wrapper for several internal formats. Kindleupack with automatically do the right thing.

It would be nice to have a script to automate all of this, for either mobi or epub. Both Amazon and Google provide cloud storage for third party content but there is a 50MB limit on ebook size. I have several books that are bigger than that.

You do not need to convert it to word. Kindleunpack can take it apart and produce some original opf and html files that can be used to split the parts. If there is a mobi KF8 inside then it will regenerate an ePub that can be edit in Sigil or other ePub editing tool and then you can use KindleGen to put it back together. Mobi these days can be just a wrapper for several internal formats. Kindleupack with automatically do the right thing.

Dale

Dale,
many thanks for your suggestion. Kindleunpack works fine but the generated HTML file contains some extra white lines that I can't get rid of - converting it back to Mobi with Calibre using the "remove spacing between paragraph" option, will suppress the white lines created by kindleunpack as well as others that should stay.

Would probably need to see the original mobi (that doesn't exhibit the whitespace issue) to see where the extra whitespace might come from (or a small mobi that exhibits the same behavior if the one you're using is too large and/or copyrighted).

You might try immediately rebuilding the html with Kindlegen (untouched by Word) to see if the unwanted whitespace is still showing up.

If I had to guess, I'd say using Word to do your splitting is where the whitespace gets introduced--regardless of what viewing the html in calibre shows (the test suggested above should confirm that). I'd recommend using Sigil or just a plain text editor of some kind to do the actual HTML editing/splitting. Nothing wrong with Word if it's all you have/know, but it's going to take liberties with the code.

Yes. It seems apparent (now anyway) that the code KindleUnpack extracts from a MOBI7-only ebook is really only useful for rebuilding a MOBI7-only ebook with kindlegen (if you want the output to be identical to the original). And since kindlegen creates a dual-purpose file by default, the KF8 portion of that dual-purpose file (which will be rendered by any device supporting KF8) will be wonky and will introduce the unwanted space between the paragraphs.

After creating your three new ebooks (with Kindlegen), you could use KindleUnpack to then split the MOBI from the KF8 and that MOBI-only file will look the same as the original on all devices. But if you have any hopes of creating a KF8 file (or dual MOBI/KF8 file) for your final use, I can't recommend doing so with the KindleUnpacked source of a MOBI-only ebook. If you do, it will likely only render the same as the original on a device that doesn't support the KF8 format.

I've probably only confused you more, but that's about the best description of what's going on that I can come up with.

Thanks very much for your answer! I must admit I had to read it few times but it makes sense now.

However I tried to play a bit around and I came to this conclusion: the extra lines are generated by Kindleunpack, not Kindlegen. If I send the Mobi file to KindleUnpack I get an HTML file which (when opened using Chrome, or even Calibre) shows already the extra lines between paragraphs - extra lines that were NOT there in the original Mobi.

However I tried to play a bit around and I came to this conclusion: the extra lines are generated by Kindleunpack, not Kindlegen. If I send the Mobi file to KindleUnpack I get an HTML file which (when opened using Chrome, or even Calibre) shows already the extra lines between paragraphs - extra lines that were NOT there in the original Mobi.

Am I adding confusion?

Not confusion. Just a bit of wrongness. KindleUnpack is not generating any extra lines. Period. It doesn't really matter how a browser renders the resulting source, because browsers aren't used to create MOBI files; kindlegen is. The extra lines are added when the resulting source is used by kindlegen to create the KF8 portion of the hybrid MOBI/KF8 file. The MOBI-only portion of the file is, indeed, being created without "extra spacing" and looks just like the original. I've checked. Rebuild the source and use KindlePreviewer (in Kindle eInk->Kindle emulation mode) to see.