Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 01-29-2018, 02:44 AM   #211
Skeeve
Zealot
Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.
 
Skeeve's Avatar
 
Posts: 142
Karma: 669192
Join Date: Nov 2013
Device: Kindle 4.1.1 no touch
Hi!

Epub Split seems to be exactly what I require!

Thanks for that.

But could you also not only show the HREF of the ToC entries, but also the text?

"part0003.html#2RHM0-e2106d65dede4aad84f56c1110acb8d1" is much less meaningfull than "Die Macht der Drei" (at least to me)
Skeeve is offline   Reply With Quote
Old 01-29-2018, 05:40 AM   #212
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by Skeeve View Post
But could you also not only show the HREF of the ToC entries, but also the text?
When I use it to split an epub it does show me TOC text entries (see attached).
Attached Thumbnails
Click image for larger version

Name:	Carson_of_Venus_Omnibus.jpg
Views:	298
Size:	232.7 KB
ID:	161922   Click image for larger version

Name:	Wizard_of_Oz_Omnibus.jpg
Views:	273
Size:	248.8 KB
ID:	161923  

Last edited by DoctorOhh; 01-29-2018 at 05:44 AM.
DoctorOhh is offline   Reply With Quote
Advert
Old 01-29-2018, 10:39 AM   #213
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,313
Karma: 3966249
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
DoctorOhh is right--EpubSplit displays both file name and TOC entry.

You might need to scroll right and resize columns. And if the entry texts are not in the TOC but instead only in the files, they will not be displayed.

The tooltip that appears when you hover over the file names will also show you the start of that chapter.
JimmXinu is offline   Reply With Quote
Old 01-29-2018, 02:31 PM   #214
Skeeve
Zealot
Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.
 
Skeeve's Avatar
 
Posts: 142
Karma: 669192
Join Date: Nov 2013
Device: Kindle 4.1.1 no touch
Thanks a lot to both of you.

Too bad I didn't see it
Skeeve is offline   Reply With Quote
Old 01-29-2018, 03:00 PM   #215
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,795
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by Skeeve View Post
Thanks a lot to both of you.

Too bad I didn't see it
Does you EPUB have a valid NCX TOC?
Also, not all file may have TOC entries, you may need to scroll.
theducks is offline   Reply With Quote
Advert
Old 01-30-2018, 12:05 PM   #216
Skeeve
Zealot
Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.
 
Skeeve's Avatar
 
Posts: 142
Karma: 669192
Join Date: Nov 2013
Device: Kindle 4.1.1 no touch
Quote:
Originally Posted by theducks View Post
Does you EPUB have a valid NCX TOC?
No idea, but scrolling helped.

I didn't understand how to automatically split into several books at once, but I managed to split one by one.
Skeeve is offline   Reply With Quote
Old 03-03-2018, 09:10 AM   #217
Inukami
Zealot
Inukami began at the beginning.
 
Inukami's Avatar
 
Posts: 145
Karma: 12
Join Date: Jun 2017
Location: Australia
Device: Mac Pro 2013 & Mini 2018, iPad Mini 4, iPhone 11, iBooks, K4Mac/PC
Hi,

I get the following error message when I try and split a book using EpubSplit. The ToC is working fine when I use the Edit ToC plugin. All others work fine except this one for some reason...The starter pack (box set) was received directly from an author and includes 3 books, each starting a new series.

Code:
KeyError:"There is no item names u'OEBPS/../toc.ncx' in the archive
Code:
calibre, version 3.18.0
ERROR: Unhandled exception: <b>KeyError</b>:"There is no item named u'OEBPS/../toc.ncx' in the archive"

calibre 3.18  embedded-python: True is64bit: True
Darwin-17.4.0-x86_64-i386-64bit Darwin ('64bit', '')
('Darwin', '17.4.0', 'Darwin Kernel Version 17.4.0: Sun Dec 17 09:19:54 PST 2017; root:xnu-4570.41.2~1/RELEASE_X86_64')
Python 2.7.12
OSX: ('10.13.3', ('', '', ''), 'x86_64')
Interface language: None
Successfully initialized third party plugins: DeDRM (6, 3, 4) && Quality Check (1, 9, 11) && EpubSplit (2, 3, 0) && Reading List (1, 6, 6) && Amazon.com Multiple Countries (1, 0, 0) && Manage Series (1, 2, 8) && Save Virtual Libraries To Column (2, 0, 0) && Find Duplicates (1, 6, 3) && Count Pages (1, 8, 0) && SmartEject (2, 0, 7) && View Manager (1, 4, 3) && Embed Comic Metadata (1, 3, 8) && Import List (1, 3, 1) && Save Virtual Libraries To Column GUI (2, 2, 1)
Traceback (most recent call last):
  File "calibre_plugins.epubsplit.epubsplit_plugin", line 137, in plugin_button
  File "calibre_plugins.epubsplit.epubsplit", line 606, in get_split_lines
  File "calibre_plugins.epubsplit.epubsplit", line 529, in get_manifest_items
  File "lib/python2.7/zipfile.py", line 935, in read
  File "lib/python2.7/zipfile.py", line 961, in open
  File "lib/python2.7/zipfile.py", line 909, in getinfo
KeyError: "There is no item named u'OEBPS/../toc.ncx' in the archive"
I would greatly appreciate any help help in fixing this error so I can split this book.

Thanks,

Inukami
Inukami is offline   Reply With Quote
Old 03-03-2018, 01:47 PM   #218
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,313
Karma: 3966249
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
The reference 'OEBPS/../toc.ncx' contains a superfluous path--it's the same as just 'toc.ncx'. And apparently Python's ZipFile class doesn't like that.

Fixing that particular problem isn't difficult, but it represents an entire class of problems with allowed paths: "asdf/../asdf" "asdf//asdf" "asdf/./asdf" and variations there on. Using the builtin Python method for this (os.path.normpath()) isn't directly practical because on windows it changes the '/'s to '\'s. Or '\\' in my tests, which ZipFile also doesn't like.

I'm trying to decide how much of this I want to address and how. Clearly it's not a common problem, since this is the first time it's come up in 5+ years.

In the meantime, you could edit your epub, open the content.opf file and remove "OEBPS/../". Then EpubSplit should work on it.
JimmXinu is offline   Reply With Quote
Old 03-03-2018, 06:26 PM   #219
Inukami
Zealot
Inukami began at the beginning.
 
Inukami's Avatar
 
Posts: 145
Karma: 12
Join Date: Jun 2017
Location: Australia
Device: Mac Pro 2013 & Mini 2018, iPad Mini 4, iPhone 11, iBooks, K4Mac/PC
@JimmXinu, thanks for your help

Quote:
Originally Posted by JimmXinu View Post
In the meantime, you could edit your epub, open the content.opf file and remove "OEBPS/../". Then EpubSplit should work on it.
Will removing the "OEBPS/../" from the content.opf make any changes to the file or is it unneeded code? And where do you find/access the content.opf file?

Thanks,

Inukami
Inukami is offline   Reply With Quote
Old 03-03-2018, 07:34 PM   #220
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,795
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by Inukami View Post
@JimmXinu, thanks for your help



Will removing the "OEBPS/../" from the content.opf make any changes to the file or is it unneeded code? And where do you find/access the content.opf file?

Thanks,

Inukami
Use the Calibre Editor (it is down in the Misc sction), or simply U(npack) tool and a pure text editor like Notepad, then click repack (in the tool )
theducks is offline   Reply With Quote
Old 03-04-2018, 01:02 AM   #221
Inukami
Zealot
Inukami began at the beginning.
 
Inukami's Avatar
 
Posts: 145
Karma: 12
Join Date: Jun 2017
Location: Australia
Device: Mac Pro 2013 & Mini 2018, iPad Mini 4, iPhone 11, iBooks, K4Mac/PC
So I removed the following line in the content.opf, but EpubSplit is still not working...

Code:
527   <item href="../toc.ncx" id="toc1" media-type="application/x-dtbncx+xml"/>
Any ideas?

Thanks,

Inukami
Inukami is offline   Reply With Quote
Old 03-04-2018, 02:05 AM   #222
ilovejedd
hopeless n00b
ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.
 
ilovejedd's Avatar
 
Posts: 5,111
Karma: 19597086
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PW4, PW3, Libra H2O, iPad 10.5, iPad 11, iPad 12.9
I believe you just edit the line, not remove it completely. Posting a screenshot of the unpacked epub in Finder or Windows Explorer would probably help with determining correct paths.

Code:
<item href="toc.ncx" id="toc1" media-type="application/x-dtbncx+xml"/>
ilovejedd is offline   Reply With Quote
Old 03-04-2018, 02:12 AM   #223
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by Inukami View Post
I get the following error message when I try and split a book using EpubSplit. The ToC is working fine when I use the Edit ToC plugin. All others work fine except this one for some reason...The starter pack (box set) was received directly from an author and includes 3 books, each starting a new series.
I would try an epub to epub conversion and see if epub split works after the conversion.
DoctorOhh is offline   Reply With Quote
Old 03-04-2018, 09:00 AM   #224
Inukami
Zealot
Inukami began at the beginning.
 
Inukami's Avatar
 
Posts: 145
Karma: 12
Join Date: Jun 2017
Location: Australia
Device: Mac Pro 2013 & Mini 2018, iPad Mini 4, iPhone 11, iBooks, K4Mac/PC
Quote:
Originally Posted by ilovejedd View Post
I believe you just edit the line, not remove it completely. Posting a screenshot of the unpacked epub in Finder or Windows Explorer would probably help with determining correct paths.

Code:
<item href="toc.ncx" id="toc1" media-type="application/x-dtbncx+xml"/>
Sorry. This did not work.

Quote:
Originally Posted by DoctorOhh View Post
I would try an epub to epub conversion and see if epub split works after the conversion.
This worked! I converted and EpubSplit was able to open the file. Thank you for this suggestion.

Thanks to everyone for their input/suggestions. All good now.

Inukami
Inukami is offline   Reply With Quote
Old 03-04-2018, 05:07 PM   #225
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,313
Karma: 3966249
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
New Test Version

It appears I'm late with a fix, but here's a test version anyway that I believe corrects addresses the issue identified.

(Turns out I had already figured it out before, I just hadn't applied it everywhere.)

I'd like it if people would test this version, both with EPUBs that had that issue and some you've split before. Feedback is appreciated.

Last edited by JimmXinu; 03-13-2018 at 01:26 PM. Reason: Remove obsolete test versions
JimmXinu is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] EpubMerge JimmXinu Plugins 522 04-01-2024 10:25 AM
[GUI Plugin] Open With kiwidude Plugins 403 04-01-2024 08:39 AM
[GUI Plugin] KindleUnpack - The Plugin DiapDealer Plugins 492 10-25-2022 08:13 AM
[GUI Plugin] FanFictionDownLoader JimmXinu Plugins 3985 05-08-2015 11:18 PM
[GUI Plugin] Plugin Updater **Deprecated** kiwidude Plugins 159 06-19-2011 12:27 PM


All times are GMT -4. The time now is 03:46 PM.


MobileRead.com is a privately owned, operated and funded community.