Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 08-24-2016, 02:33 PM   #256
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,283
Karma: 3966249
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
New version posted

Version 2.0.13 - 24 Aug 2016
  • Add code for handling cover that isn't jpg. Detected by file extension.
  • Fail more gracefully when metadata indicates a file that doesn't exist.
  • Update translations, add Portuguese and Turkish.
JimmXinu is offline   Reply With Quote
Old 08-28-2016, 04:45 AM   #257
Serpico
Enthusiast
Serpico began at the beginning.
 
Posts: 27
Karma: 10
Join Date: Nov 2015
Device: PocketBook Touch Lux 3
Hi,

I'm trying to use CLI on Linux but it works only in the most simple version like this:

calibre-debug --run-plugin EpubMerge *.epub

If I try to put any option after EpubMerge it fails. I tried for example:

calibre-debug --run-plugin EpubMerge -f *.epub

or

calibre-debug --run-plugin EpubMerge -o output.epub *.epub
calibre-debug --run-plugin EpubMerge *.epub -o output.epub

and it fails. Can you please advise what command use to merge all files in a directory with flatten TOC, setting the title and the output file name?

Last edited by Serpico; 08-28-2016 at 04:50 AM.
Serpico is offline   Reply With Quote
Advert
Old 08-28-2016, 10:13 AM   #258
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,283
Karma: 3966249
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Quote:
Originally Posted by Serpico View Post
I'm trying to use CLI on Linux but it works only in the most simple version like this:

calibre-debug --run-plugin EpubMerge *.epub

If I try to put any option after EpubMerge it fails. I tried for example:

calibre-debug --run-plugin EpubMerge -f *.epub

or

calibre-debug --run-plugin EpubMerge -o output.epub *.epub
calibre-debug --run-plugin EpubMerge *.epub -o output.epub

and it fails. Can you please advise what command use to merge all files in a directory with flatten TOC, setting the title and the output file name?
You need to add -- after --run-plugin EpubMerge to signal to calibre-debug that all further options are to be passed to EpubMerge.

From the first post:

Code:
Usage: calibre-debug.exe --run-plugin EpubMerge -- [options] <input epub> [<input epub>...]
So do:

Code:
calibre-debug --run-plugin EpubMerge -- -f *.epub
JimmXinu is offline   Reply With Quote
Old 08-28-2016, 01:19 PM   #259
Serpico
Enthusiast
Serpico began at the beginning.
 
Posts: 27
Karma: 10
Join Date: Nov 2015
Device: PocketBook Touch Lux 3
It worked - thank you for help.
Serpico is offline   Reply With Quote
Old 08-31-2016, 11:03 PM   #260
Galileo7
Junior Member
Galileo7 began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Aug 2016
Device: Generic
I don't see my exact issue here, but I'm new to the forum, so please excuse if it's been addressed!

The TOC's in the ebubs I'm merging are fine - pretty much how I want them. But when I merge them, all the sub-entries are lost, and there's just one entry for each book. I've experimented with the EpubMerge plugin config settings, to no avail.

Here are a couple example files, if I do this right:
http://downloads.30bird.com/xfer/samples.zip

Calibre 2.65.1
EpubMerge 2.0.13

Last edited by Galileo7; 08-31-2016 at 11:05 PM. Reason: Bad links
Galileo7 is offline   Reply With Quote
Advert
Old 09-01-2016, 01:26 AM   #261
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,283
Karma: 3966249
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Quote:
Originally Posted by Galileo7 View Post
I don't see my exact issue here, but I'm new to the forum, so please excuse if it's been addressed!

The TOC's in the epubs I'm merging are fine - pretty much how I want them. But when I merge them, all the sub-entries are lost, and there's just one entry for each book. I've experimented with the EpubMerge plugin config settings, to no avail.

Here are a couple example files, if I do this right:
http://downloads.30bird.com/xfer/samples.zip

Calibre 2.65.1
EpubMerge 2.0.13
The metadata TOCs for the two epubs you attached only have one top-level entry each.

EpubMerge assumes if there's only one (top-level) TOC entry, that there effectively is no TOC and it can be left out in favor of just using the book only entry. Clearly, that's incorrect for your case.

Nested TOCs weren't high on my radar when that part was written, and complete ebooks with only one top-level TOC entry are rather rare--the target use case for EpubMerge is more merging existing ebooks than creating new ones. I might have time to figure out a real fix tomorrow evening, but it could be as late as next week.

In the mean time, you can step around the problem a couple different ways:
  1. Move the contents of the single top-level TOC entry to the top-level. If you turn on Insert Table of Contents entry for each title, you can remove previous top-level TOC entry.
  2. Add at least one more top-level TOC entry in each epub, pointing to anything, named anything, that you can then delete after merging.
JimmXinu is offline   Reply With Quote
Old 09-01-2016, 10:10 AM   #262
Galileo7
Junior Member
Galileo7 began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Aug 2016
Device: Generic
Excellent. I'll try those things. My epubs are generated by Oxygen from DITA XML, so I might be able to change the way the transform creates the TOC, now that I know what the problem is.

Thank you for taking the time to look at this!
Galileo7 is offline   Reply With Quote
Old 09-01-2016, 06:29 PM   #263
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,283
Karma: 3966249
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Quote:
Originally Posted by JimmXinu View Post
EpubMerge assumes if there's only one (top-level) TOC entry, that there effectively is no TOC and it can be left out in favor of just using the book only entry. Clearly, that's incorrect for your case. ...
New test version posted (see attached)

Okay, here's how this one works:

If Insert Table of Contents entry for each title is ON:
  • A top level TOC entry in the merged book is made for each sub-book containing the sub-book title (and the author if there's more than one author).
  • If there's only one TOC in the sub-book (total--including nesting), the original sub-book TOC is discarded, leaving only the created sub-book title TOC. (To match existing behavior.)
  • If there's more than one TOC in the sub-book (now including nesting), the original sub-book TOC entries are added under the created sub-book title TOC. Nesting is preserved, but shifted down a level.

If Insert Table of Contents entry for each title is OFF:
  • The original sub-book TOC entries are all added to the merged book TOC. Top level sub-book TOC entries become top level merged book TOC entries. Nesting is preserved.
  • This also means that if a sub-book TOC is empty, there will be NO TOC entry at all for that sub-book while Insert Table of Contents entry for each title is OFF. (To match existing behavior.)

Last edited by JimmXinu; 09-06-2016 at 06:41 PM. Reason: Remove obsolete test versions - replaced by newer test or released version.
JimmXinu is offline   Reply With Quote
Old 09-01-2016, 09:14 PM   #264
Galileo7
Junior Member
Galileo7 began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Aug 2016
Device: Generic
Outstanding! Works great. Thanks - I donated.
Galileo7 is offline   Reply With Quote
Old 09-01-2016, 10:03 PM   #265
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,283
Karma: 3966249
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Quote:
Originally Posted by Galileo7 View Post
Outstanding! Works great. Thanks - I donated.
Glad it's working for you. And thanks.
JimmXinu is offline   Reply With Quote
Old 09-06-2016, 06:41 PM   #266
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,283
Karma: 3966249
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
New Version Released

Version 2.0.14 - 06 Sep 2016
  • Handle sub-books with single top-level TOC, but nested entries better.
  • Update Translations
JimmXinu is offline   Reply With Quote
Old 10-01-2016, 08:30 PM   #267
Budfudder
Enthusiast
Budfudder began at the beginning.
 
Posts: 26
Karma: 10
Join Date: Nov 2010
Device: Kindle 3
Fantastic tool. But obviously I'm doing something wrong - why is it not generating a TOC for me at all? Each book has their own (they had it when they were single books), but there's no TOC for the anthology as a whole. The only configuration option I can see about it is the checkbox with the text 'Insert Table of Contents entry for each title?' and I have that checked - but still no TOC.
Budfudder is offline   Reply With Quote
Old 10-01-2016, 11:32 PM   #268
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,283
Karma: 3966249
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Quote:
Originally Posted by Budfudder View Post
Fantastic tool. But obviously I'm doing something wrong - why is it not generating a TOC for me at all? Each book has their own (they had it when they were single books), but there's no TOC for the anthology as a whole. The only configuration option I can see about it is the checkbox with the text 'Insert Table of Contents entry for each title?' and I have that checked - but still no TOC.
We were having a problem with books with single TOC items, but it was fixed in the last release.

Can you post the epubs (or a couple of them) that have that problem? Or upload them somewhere and PM me the link?
JimmXinu is offline   Reply With Quote
Old 10-02-2016, 07:38 PM   #269
Budfudder
Enthusiast
Budfudder began at the beginning.
 
Posts: 26
Karma: 10
Join Date: Nov 2010
Device: Kindle 3
Quote:
Originally Posted by JimmXinu View Post
We were having a problem with books with single TOC items, but it was fixed in the last release.

Can you post the epubs (or a couple of them) that have that problem? Or upload them somewhere and PM me the link?
Just FYI, I'm using v 2.0.14. I'm getting the problem with ALL books I try to merge, so I don't think it's specific to the books. Is there some step I could be missing or something?

In any case, attached are a couple of the books I've merged and the epub I get when I merge them. Notice that both books have tables of contents, and they are shown in the resulting merged book, but there is no TOC for the anthology itself, showing both books as entries.
Attached Files
File Type: epub Oliver Twist - Charles Dickens.epub (419.0 KB, 242 views)
File Type: epub David Copperfield - Charles Dickens.epub (871.7 KB, 210 views)
File Type: epub Charles Dickens Anthology - Charles Dickens.epub (1.33 MB, 240 views)
Budfudder is offline   Reply With Quote
Old 10-02-2016, 07:54 PM   #270
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,283
Karma: 3966249
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Quote:
Originally Posted by Budfudder View Post
Just FYI, I'm using v 2.0.14. I'm getting the problem with ALL books I try to merge, so I don't think it's specific to the books. Is there some step I could be missing or something?

In any case, attached are a couple of the books I've merged and the epub I get when I merge them. Notice that both books have tables of contents, and they are shown in the resulting merged book, but there is no TOC for the anthology itself, showing both books as entries.
What are you using to read the resulting EPUB that you don't see a TOC?

Because I see exactly the TOC I expected to see in the merged EPUB you posted. I didn't merge them--I just looked inside the EPUBs you posted.

The only thing I can thing of (other than you're using a different reader) is that you mean an in-line TOC in the pages of the EPUB instead of the meta-data TOC...
Attached Thumbnails
Click image for larger version

Name:	Capture.PNG
Views:	205
Size:	32.9 KB
ID:	152117  
JimmXinu is offline   Reply With Quote
Reply

Tags
calibre, combine books, epubmerge, make collection, merge epub, merge epubs

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] Quick Preferences kiwidude Plugins 62 03-16-2024 11:47 PM
[GUI Plugin] Open With kiwidude Plugins 402 03-16-2024 11:44 PM
[GUI Plugin] FanFictionDownLoader JimmXinu Plugins 3985 05-08-2015 11:18 PM
eBookCleaner slobberchopz Plugins 9 02-23-2012 04:25 AM
[GUI Plugin] Plugin Updater **Deprecated** kiwidude Plugins 159 06-19-2011 12:27 PM


All times are GMT -4. The time now is 02:28 PM.


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