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 12-03-2023, 08:25 PM   #511
Wandering Cloud
Junior Member
Wandering Cloud began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Dec 2023
Device: Kindle Oasis 8 gen
Quote:
Originally Posted by JimmXinu View Post
Not very much anymore.

As for your specific requests:

You can use Calibre's Convert epub->epub or Edit book (under Tools) to inject an in-line ToC. And if you're converting to AZW3 for Kindle, the ToC at the end of the book.

EpubMerge doesn't actually look inside the book contents at all, it only reads/writes the metadata. And nothing says chapter headings inside have to match what the ToC says, or have any consistent formatting to find. So annotating chapter headings is non-trivial.
Ah, thanks for the reply.
Wandering Cloud is offline   Reply With Quote
Old 12-12-2023, 11:27 PM   #512
tatteredscroll
Enthusiast
tatteredscroll will become famous soon enoughtatteredscroll will become famous soon enoughtatteredscroll will become famous soon enoughtatteredscroll will become famous soon enoughtatteredscroll will become famous soon enoughtatteredscroll will become famous soon enough
 
tatteredscroll's Avatar
 
Posts: 45
Karma: 510
Join Date: Sep 2012
Device: Kindle
Does the CLI expect simple filenames for merge?

Does the CLI expect simple filenames for merge? In other words, for multiple files, is it expecting something like--

$ calibre-debug --run-plugin EpubMerge file1.epub file2.epub book9.epub

I've got a directory with several epubs and with some fairly typical ebook names (by that I mean they are quite varied), as an example--

My ebook of all the planets_ John Smith.epub
How to make a souffle(part I) _ Web Recipes.epub
The Christmas Tree Story, Nothing Artificial.epub

I've tried many ways to get these oddly named files formatted so EpubMerge can handle, but I've hit a point where I'm not sure exactly sure what it's expecting.
tatteredscroll is offline   Reply With Quote
Old 12-12-2023, 11:45 PM   #513
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,590
Karma: 4600349
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Quote:
Originally Posted by tatteredscroll View Post
Does the CLI expect simple filenames for merge? In other words, for multiple files, is it expecting something like--

$ calibre-debug --run-plugin EpubMerge file1.epub file2.epub book9.epub
EpubMerge itself doesn't have any particular expectations about file names.

Unless it's just an oversight that you forgot to include in your post, I suspect you need the '--' after '--run-plugin EpubMerge' that tells calibre-debug's option parser to stop and pass everything after that to EpubMerge.

From first post:
Quote:
Originally Posted by JimmXinu View Post
Code:
Usage: calibre-debug.exe --run-plugin EpubMerge -- [options] <input epub> [<input epub>...]

Given list of epubs will be merged together into one new epub.

Options:
  -h, --help            show this help message and exit
  -o OUTPUT, --output=OUTPUT
                        Set OUTPUT file, Default: merge.epub
  -t TITLE, --title=TITLE
                        Use TITLE as the metadata title.  Default: '<first
                        epub title> Anthology'
  -d DESC, --description=DESC
                        Use DESC as the metadata description.  Default: '<epub
                        title> by <author>' for each epub.
  -a AUTHOR, --author=AUTHOR
                        Use AUTHOR as a metadata author, multiple authors may
                        be given, Default: <All authors from epubs>
  -g TAG, --tag=TAG     Include TAG as dc:subject tag, multiple tags may be
                        given, Default: None
  -l LANG, --language=LANG
                        Include LANG as dc:language tag, multiple languages
                        may be given, Default: en
  -n, --no-titles-in-toc
                        Default is to put an entry in the TOC for each epub,
                        nesting each epub's chapters under it.
  -N, --no-original-toc
                        Default is to include the TOC from each original epub.
  -f, --flatten-toc     Flatten TOC down to one level only.
  -c COVER, --cover=COVER
                        Path to a jpg to use as cover image.
  -k, --keep-meta       Keep original metadata files in merged epub.  Use for
                        UnMerging.
  -s URL, --source=URL  Include URL as dc:source and
                        dc:identifier(opf:scheme=URL).
  -u, --unmerge         UnMerge an existing epub that was created by merging
                        with --keep-meta.
  -D OUTPUTDIR, --outputdir=OUTPUTDIR
                        Set output directory for unmerge, Default: (current
                        dir)
JimmXinu is offline   Reply With Quote
Old 12-12-2023, 11:57 PM   #514
tatteredscroll
Enthusiast
tatteredscroll will become famous soon enoughtatteredscroll will become famous soon enoughtatteredscroll will become famous soon enoughtatteredscroll will become famous soon enoughtatteredscroll will become famous soon enoughtatteredscroll will become famous soon enough
 
tatteredscroll's Avatar
 
Posts: 45
Karma: 510
Join Date: Sep 2012
Device: Kindle
Quote:
Originally Posted by JimmXinu View Post
EpubMerge itself doesn't have any particular expectations about file names.

Unless it's just an oversight that you forgot to include in your post, I suspect you need the '--' after '--run-plugin EpubMerge' that tells calibre-debug's option parser to stop and pass everything after that to EpubMerge.

From first post:
Ok, I missed that , let me give it another go.

UPDATE: that did the trick. On Linux, to get it to read the full list of filenames in-line and separate, I did this for anyone who cares or might stumble on this in the future

Built file list with
find ~/Documents/mergeTest/ -type f | sed 's/ /\\ /g' | tr '\n' ' ' > epubs-list2

Then ran EpubMerge from calibre-debug CLI
cat epubs-list2 | xargs calibre-debug --run-plugin EpubMerge --

This produced the default merge.epub file.

Last edited by tatteredscroll; 12-13-2023 at 12:04 AM.
tatteredscroll is offline   Reply With Quote
Old 12-13-2023, 11:41 AM   #515
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,590
Karma: 4600349
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Quote:
Originally Posted by tatteredscroll View Post
UPDATE: that did the trick. On Linux, to get it to read the full list of filenames in-line and separate, I did this for anyone who cares or might stumble on this in the future
Glad you got it working.

FYI, you can save several steps like so:
Code:
find ~/Documents/mergeTest/ -type f -print0 | xargs -0 calibre-debug --run-plugin EpubMerge --
JimmXinu is offline   Reply With Quote
Old 12-13-2023, 03:04 PM   #516
tatteredscroll
Enthusiast
tatteredscroll will become famous soon enoughtatteredscroll will become famous soon enoughtatteredscroll will become famous soon enoughtatteredscroll will become famous soon enoughtatteredscroll will become famous soon enoughtatteredscroll will become famous soon enough
 
tatteredscroll's Avatar
 
Posts: 45
Karma: 510
Join Date: Sep 2012
Device: Kindle
Quote:
Originally Posted by JimmXinu View Post
Glad you got it working.

FYI, you can save several steps like so:
Code:
find ~/Documents/mergeTest/ -type f -print0 | xargs -0 calibre-debug --run-plugin EpubMerge --
Thanks for the tip!
tatteredscroll is offline   Reply With Quote
Old 12-16-2023, 12:09 AM   #517
jnote
Junior Member
jnote began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Dec 2023
Device: kindle oasis 3
for windows batch file

Quote:
Originally Posted by tatteredscroll View Post
Thanks for the tip!
thanks for the tip~~

and gpt4 create this windows batch file, it works well
(assuming that 'calibre-debug' is included in your windows path)


@echo off
setlocal enabledelayedexpansion

set FILES=
for %%f in ("C:\your_path\*.epub") do (
set FILES=!FILES! "%%f"
)

calibre-debug --run-plugin EpubMerge -- %FILES%
jnote is offline   Reply With Quote
Old 12-16-2023, 12:15 AM   #518
jnote
Junior Member
jnote began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Dec 2023
Device: kindle oasis 3
for windows

Quote:
Originally Posted by JimmXinu View Post
Glad you got it working.

FYI, you can save several steps like so:
Code:
find ~/Documents/mergeTest/ -type f -print0 | xargs -0 calibre-debug --run-plugin EpubMerge --
thanks for the tip

and gpt4 create this batch file, it works well
(assuming that calibre-debug included in your windows path)

Code:
@echo off
setlocal enabledelayedexpansion

set FILES=
for %%f in ("C:\your_path\*.epub") do (
    set FILES=!FILES! "%%f"
)

calibre-debug --run-plugin EpubMerge -- %FILES%
jnote is offline   Reply With Quote
Old 02-11-2024, 07:07 PM   #519
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,590
Karma: 4600349
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
New Test Version

2024-02-11
- Update Translations
- Decrypt encrypted/obfuscated font files.

Recently, it's come up in the EpubSplit thread that encrypted font files weren't being handled gracefully.

It turns out Calibre Convert has been 'preserving font encryption' for nearly 15 years.

This version of EpubMerge decrypts the font files, but it doesn't make any attempt to re-encrypt them again in the merged epub. I just don't see the point.

There are, in fact, two different 'encryptions' used, according to the Calibre code. I've carried over the implementation for both, but I only have one to test with. FYI.

Last edited by JimmXinu; 04-01-2024 at 11:25 AM. Reason: remove obsolete test version
JimmXinu is offline   Reply With Quote
Old 04-01-2024, 11:25 AM   #520
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,590
Karma: 4600349
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
New Version Released

Version 2.18.0 - 2024-04-01
- Update Translations
- Decrypt encrypted/obfuscated font files
- Save opf:file-as attr from author tags in CLI #13
- Actually have 'en' default for `-l` in CLI.
JimmXinu is offline   Reply With Quote
Old 07-16-2024, 10:45 AM   #521
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,590
Karma: 4600349
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
New Test Version

2024-07-16

- Add title/author/filename Job log output on individual input epub failure #17
- Restructure for easier CLI install - contributed by Matheus

Last edited by JimmXinu; 07-20-2024 at 11:30 AM. Reason: remove obsolete test version
JimmXinu is offline   Reply With Quote
Old 07-20-2024, 11:29 AM   #522
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,590
Karma: 4600349
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
New Version Released

Version 3.1.0 - 2024-07-20
- Update Translations
- Add title/author/filename output on individual input epub failure. #17
JimmXinu is offline   Reply With Quote
Old 08-20-2024, 05:03 PM   #523
randy@asa3.org
Member
randy@asa3.org began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Feb 2019
Device: Lenovo desktop Win 10 Chrome browser
New version of EpubMerge fails

For about 5 years we have been merging about a half-dozen Epub files of the articles in our quarterly journal using Calibre w/EpubMerge plugin. Until the last issue we were using Calibre V5 but we just updated to V7 and updated the plugin. We can no longer successfully merge our files and our next issue is scheduled to be released next wee. We cannot find any legible error message or reason for failure. We are doing nothing differently from the past. What can we do now?
randy@asa3.org is offline   Reply With Quote
Old 08-20-2024, 05:35 PM   #524
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,590
Karma: 4600349
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Run Calibre in debug mode (under Calibre's Preferences dropdown) and try it. When you quit Calibre, you'll get a debug log with additional output.

Otherwise, I'd need to see the epubs involved to.
JimmXinu is offline   Reply With Quote
Old 08-20-2024, 10:40 PM   #525
randy@asa3.org
Member
randy@asa3.org began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Feb 2019
Device: Lenovo desktop Win 10 Chrome browser
Merge failure

I did the debug process but the log indicated nothing wrong but still output failed. I used exactly the same files on my own laptop which was running Calibre 7.6 instead of 7.16 and EpubMerge v2.17 instead of 3.1. It worked fine.

But on the desktop with versions 7.16 and 3.1, the same inputs and settings leads to "EpubMerge failed. No new Epub file was created..."
randy@asa3.org is offline   Reply With Quote
Reply

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


Forum Jump

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


All times are GMT -4. The time now is 07:53 PM.


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