Quote:
Originally Posted by kovidgoyal
As I mentioned in the gigantic how to make sigil thread, adding a programmatic way to split a file in multiple locations at once is on my todo list, but it will use XPath, not regex.
|
So, then would it work like chapter detection works in Calibre?
If so, given an epub in which the whole book is in one file, could I insert, say,
Code:
<hr class="chapter-spllit" /hr>
at the points I want to split, and then use an xpath expression something like
Code:
//h:hr[re:test(@class, "chapter-split", "i")]
so that it would split the file at all the indicated points?
(And hopefully naming them something like "split_1", split_2" ... rather than "split_1", "split_1_1" ... since there could be (usually would be) several dozen splits.)
That would work for me.