View Full Version : Can I split one epub into more than one file?


ChrisKaos
04-02-2012, 05:15 PM
That is to say, I have an epub with multiple books/series in it, and I would like to split it into multiple separate epub files. I imagine this can be done with something like Calibre or Sigil, but I just haven't been able to figure out how.

dwig
04-02-2012, 06:27 PM
Strictly speaking, I don't think that there is any way to actually split a single book with either tool. That said ...

One method would be to make several copies of the original omnibus ePub, one for each of the individual books and rename them using their new single titles. Then open each, one at a time, in Sigil and:

Use Sigil's split function to isolate one book if necessary.
Delete the (x)HTML files that contain the pieces of the other books
Edit the title page to reflect the new proper title
Edit the metadata to set the correct title and remove any spurious references to the deleted titles that might exist.
Regenerate the TOC
Save.

You'll likely find that step one isn't necessary. Most such omnibuses will contain a number of (x)HTML files and won't have any two book's pieces share a file. Also, you'll probably want to replace the cover image in each to something appropriate. That is easy to do in calibre if you add the Tweak ePub plugin to update the ePub after pasting in a new cover. If you can't find covers you could add the Generate Cover plugin to calibre to generate a cover a bit nicer than calibre's core cover generator.

JSWolf
04-02-2012, 08:16 PM
Actually, I've found the copyright in an omnibus can be shared. The title page can also be shared. But don't forget the cover is also shared even if it is a generic cover.

dwig
04-02-2012, 09:36 PM
Actually, I've found the copyright in an omnibus can be shared. The title page can also be shared. But don't forget the cover is also shared even if it is a generic cover.

By "shared", I was referring to copy for two different books being in the same (x)HTML file. I wasn't referring to being "shareable". I did note that the title page and cover should need editing to reflect the single title.

If the copyright info in present and one its one page, it too may need editing if the individual titles have different copyright status. If it is a typical PD omnibus then each of the separated titles would have the same copyright status.

I should have noted that if there is an (x)HTML TOC it would also need significant edits. Sigil's ability to rebuild the TOC is limited to the real NCX TOC.

FatDog
04-03-2012, 02:57 PM
If you dont mind my asking - what book has this?

I would like to see a good example.

And why are you trying to pull it apart? Is the size too large or are you trying to bounce around the novels?

JSWolf
04-03-2012, 08:15 PM
By "shared", I was referring to copy for two different books being in the same (x)HTML file. I wasn't referring to being "shareable". I did note that the title page and cover should need editing to reflect the single title.

If the copyright info in present and one its one page, it too may need editing if the individual titles have different copyright status. If it is a typical PD omnibus then each of the separated titles would have the same copyright status.

I should have noted that if there is an (x)HTML TOC it would also need significant edits. Sigil's ability to rebuild the TOC is limited to the real NCX TOC.

Here is what I would do...

i would try to find all the separate images for the covers for each book.

If the one copyright file is used for each book, edit as needed for each book by removing the stuff not needed for the book at hand.

Edit the title page as needed.

Delete any internal ToC as it's more work then it's worth and it's not worth any work.

Edit toc.ncx as it's just needed to delete the entries for the files you've deleted.

The only other thing you have to watch for is what CSS you'll need to keep as some omnibuses use multiple CSS.

Load into Sigil and delete the files you don't need, edit the ones you do need to edit, change the graphic for the cover, clean up the CSS & maybe the XML (as needed), save to a different name and done.

mrmikel
04-04-2012, 07:59 AM
Since he is trying to keep the HTML TOC, gutting it might not work so easily.

I wonder if HTTrack, a website copier, might allow him to follow only one track at a time. It has the option of excluding selected directories. It could be run several times to yield separate outputs.

Much depends on exactly how the thing is structured.

JSWolf
04-04-2012, 11:02 AM
Since he is trying to keep the HTML TOC, gutting it might not work so easily.

I wonder if HTTrack, a website copier, might allow him to follow only one track at a time. It has the option of excluding selected directories. It could be run several times to yield separate outputs.

Much depends on exactly how the thing is structured.

The internal ToC is not needed and it's more work then it's worth to get it sorted. Editing toc.ncx is a lot easier and will provide a lot more satisfactory results.

The OP has not replied in this thread since the initial post. No place in the OP's post does it say he wants to keep the internal ToC when he splits the collection.

mrmikel
04-04-2012, 07:12 PM
I assumed since he has a Kindle that that is what he has to have.

I am a Sony guy myself.

JSWolf
04-04-2012, 11:40 PM
I assumed since he has a Kindle that that is what he has to have.

I am a Sony guy myself.

Maybe you've forgotten that Calibre will convert toc.ncx into a working ToC for Mobipocket. So there's no need to have to deal with an internal ToC when it's just easier to edit toc.ncx.

mrmikel
04-05-2012, 07:05 AM
That does simplify matters! Thanks for the reminder!