03-19-2013, 05:27 PM | #31 |
Plugin Developer
Posts: 6,319
Karma: 3966249
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
|
The anchor needs to be a tag with an id attribute. It's not required, but <a> is common:
Code:
<a id="split_here" /> Assuming that I added the anchor above to file "OEBPS/file0004.xhtml" I'd need to add an entry to the TOC that looks something like this: Code:
<navPoint id="split_here" playOrder="99"> <navLabel> <text>split_here</text> </navLabel> <content src="OEBPS/file0004.xhtml#split_here"/> </navPoint> (If you don't have another other anchored TOC entries for OEBPS/file0004.xhtml, you could put it at the end of the navMap tag as the last navPoint tag, but that's a bit ugly.) I've attached an example. |
03-20-2013, 10:27 AM | #32 | |
Member
Posts: 15
Karma: 10
Join Date: Mar 2013
Device: Bluefire reader, samsung galaxy s3
|
Not giving split lines for the sample epub you uploaded
Quote:
output file: split.epub and exits no split lines being output. I would expect to see an additional line added to the split lines for the new one we added. Am i correct? So that I can find out the line number and input it to epubsplit to split the epub on that basis. Am i wrong in this assumption? |
|
03-20-2013, 11:09 AM | #33 |
Plugin Developer
Posts: 6,319
Karma: 3966249
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
|
If you run it without any line numbers, yes it should be giving you the list of split lines. It does for me.
You might want to make sure you have the most recent version from the source repository--it's split line output is cleaner than the earlier version. |
03-20-2013, 03:03 PM | #34 | |
Member
Posts: 15
Karma: 10
Join Date: Mar 2013
Device: Bluefire reader, samsung galaxy s3
|
Quote:
But for some reason if we do this split_here thing it doesn't copy the TOC file over to the new epub. I tried to move the split_here anchor navpoint to the end of the TOC file even then it doesnt work. Is there something that is different in these files that it is missing the .ncx file in the resulting file? |
|
03-20-2013, 03:10 PM | #35 | |
Plugin Developer
Posts: 6,319
Karma: 3966249
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
|
Quote:
|
|
03-20-2013, 03:14 PM | #36 |
Member
Posts: 15
Karma: 10
Join Date: Mar 2013
Device: Bluefire reader, samsung galaxy s3
|
No TOC.ncx file in the result epub
I have included lines at least 19 lines but none show up in the table of contents. The pages are moved but not the TOC. I opened up the epub and didnt see the TOC.ncx file there. Any reason?
|
03-20-2013, 03:26 PM | #37 |
Member
Posts: 15
Karma: 10
Join Date: Mar 2013
Device: Bluefire reader, samsung galaxy s3
|
I tried it on the Test Story Title 67 - Test Author aa.epub with the following lines (0 1 2 3 4 5 6) that you uploaded and it also din't show the table of contents.
|
03-20-2013, 05:30 PM | #38 |
Plugin Developer
Posts: 6,319
Karma: 3966249
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
|
Interesting.
In windows, on command line, epubsplit throws an encoding error when it tries to include line 2 in the TOC. That's a line of deliberately difficult characters--it is a testing file after all. It works fine in calibre, and it works fine if you skip that line. I'll look into it. The split.epub was started, but it wasn't finished. That's why it appears as if it somewhat worked. Running on CLI, you should have seen error message when it failed. |
03-20-2013, 05:51 PM | #39 |
Plugin Developer
Posts: 6,319
Karma: 3966249
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
|
I've put a fairly brute force fix for that problem in. Go grab the most recent version from the source repository again.
|
03-20-2013, 05:53 PM | #40 | |
Member
Posts: 15
Karma: 10
Join Date: Mar 2013
Device: Bluefire reader, samsung galaxy s3
|
Quote:
File "C:\Python27\lib\codecs.py", line 351, in write data, consumed = self.encode(object, self.errors) nicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 21: ordinal not in range(128) File "C:\Python27\lib\codecs.py", line 351, in write data, consumed = self.encode(object, self.errors) UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 98: ordinal not in range(128) |
|
03-20-2013, 05:57 PM | #41 | |
Member
Posts: 15
Karma: 10
Join Date: Mar 2013
Device: Bluefire reader, samsung galaxy s3
|
Thanks it worked for one file.
Quote:
Thanks. |
|
03-27-2013, 07:47 PM | #42 |
Resident Curmudgeon
Posts: 73,983
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
If you use the ADE way of counting pages, there's no issue there. ADE being the most widely used software for reading ePub, the page numbers people get are most likely going to be the ADE method.
|
Tags |
.net, automate, calibre, commandline, epubsplit |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[GUI Plugin] EpubSplit | JimmXinu | Plugins | 422 | 04-07-2024 04:10 PM |
Automate Calibre Tagging | ohemeffgee | Library Management | 1 | 11-11-2012 06:56 AM |
Any way to automate editting metadata? | louwin | Library Management | 4 | 04-24-2012 06:58 PM |
Help Merging Multiple Small Epubs into One Large Epub | kazbates | Workshop | 14 | 09-15-2011 02:18 AM |
I am looking for a tool that could automate convertion of... | astra | Workshop | 24 | 08-30-2009 06:38 AM |