View Single Post
Old 05-02-2015, 09:42 PM   #156
OhDear
Junior Member
OhDear began at the beginning.
 
Posts: 4
Karma: 10
Join Date: May 2015
Device: none
I used it on the book I showed before and it split off 100+ short stories without any problems.

Actually, there was one error the first time I used it. "IndexError:list index out of range"

Turns out there was a story that was split into three hrefs, with the two later parts having a blank toc. It stopped splitting when it reached the first blank toc. Making sure no blank tocs were selected the second time, it worked perfectly.

Here's the full error, if it's useful:
Spoiler:
calibre, version 2.27.0
ERROR: Unhandled exception: <b>IndexError</b>:list index out of range

calibre 2.27 Portable isfrozen: True is64bit: False
Windows-8-6.2.9200 Windows ('32bit', 'WindowsPE')
32bit process running on 64bit windows
('Windows', '8', '6.2.9200')
Python 2.7.9
Windows: ('8', '6.2.9200', '', 'Multiprocessor Free')
Successfully initialized third party plugins: K4PC, K4Mac, Kindle Mobi and Topaz DeDRM && Inept Epub DeDRM && EpubMerge && EpubSplit && Ignoble Epub DeDRM && FanFicFare && Favourites Menu && Inept PDF DeDRM && eReader PDB 2 PML
Traceback (most recent call last):
File "calibre_plugins.epubsplit.dialogs", line 108, in new_books
File "calibre_plugins.epubsplit.epubsplit_plugin", line 174, in _do_splits
IndexError: list index out of range


I can think of a few ways of dealing with blank tocs but I'm not sure what's best.
1. Assume they're part of the previous non-blank toc (That often is true for short story collections, I think), and include them in that split.
2a. Make a split, but use the name of the .xhtml file for the story name.
(The xhtml names in that book are actually useful. And at the end of the book there's a few interviews with the author, but with blank tocs. So potentially this could be a useful option.)
2b. Make a split, but give names like "untitled 1, untitled 2, etc."
3. Just skip them so there's no error.

As there's no single best way of handling it, maybe before the splitting starts a window could pop up which lets you choose what to do in case a blank toc is encountered during the splits.

If that window also let you choose the cover to be used for all the splits, that would also be a plus. (I'd always choose to have no cover for short stories myself.)

Quote:
Originally Posted by JimmXinu View Post
I'm open to suggestions for GUI placements and wordings.
Hmm. With as similar as they are now maybe "New Books" could say something like "Split to Multiple Books", just so people don't accidentally click the wrong thing.

The only other suggestion I could make is with as long as a 100+ stories split takes, an abort button could be handy if you realize during the splitting that you did something wrong.

Anyway, what you've added is already very useful. Thank you very much for making EpubSplit in the first place, and for putting in the multi split.

Quote:
Originally Posted by JimmXinu View Post
All you are cancelling at that point is the metadata edit--you're already committed to the book create.
Ah, now I see. On occasion I've realized I had a wrong or extra href selected just after hitting New Book, and then hit cancel to go back and select the right thing. I guess I got confused because it seemed like there was no difference between Ok and Cancel, until that was specifically pointed out.
OhDear is offline   Reply With Quote