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 11-29-2023, 12:11 PM   #511
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,328
Karma: 3966249
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
New Version Released

Version 2.17.0 - 2023-11-29
- Update Translations
JimmXinu is offline   Reply With Quote
Old 12-03-2023, 12:16 AM   #512
Wandering Cloud
Junior Member
Wandering Cloud began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Dec 2023
Device: Kindle Oasis 8 gen
Hey man, love the plugin. Do you take feature requests?

If so, I was wondering if you could create settings to:

*Put a chapterlist at the start of the merged epub of all the books merged, for easy reference.
I know can do this manually currently if you edit the epub, but with 15+ epub's merged together it takes a while to do.

*Annotate the chapter headings so instead of being (chapter), they're ((book title)chapter)).
I'm sure that this can be done somehow, because my kindle knows the correct chapter title to display whenever I activate the UI while reading. But I've no idea how to edit this in calibre.
Wandering Cloud is offline   Reply With Quote
Advert
Old 12-03-2023, 10:28 AM   #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,328
Karma: 3966249
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
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.
JimmXinu is offline   Reply With Quote
Old 12-03-2023, 07:25 PM   #514
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, 10:27 PM   #515
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
Advert
Old 12-12-2023, 10:45 PM   #516
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,328
Karma: 3966249
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, 10:57 PM   #517
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-12-2023 at 11:04 PM.
tatteredscroll is offline   Reply With Quote
Old 12-13-2023, 10:41 AM   #518
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,328
Karma: 3966249
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, 02:04 PM   #519
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-15-2023, 11:09 PM   #520
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-15-2023, 11:15 PM   #521
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, 06:07 PM   #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,328
Karma: 3966249
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 10:25 AM. Reason: remove obsolete test version
JimmXinu is offline   Reply With Quote
Old 04-01-2024, 10:25 AM   #523
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,328
Karma: 3966249
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
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 08:39 AM
[GUI Plugin] Quick Preferences kiwidude Plugins 62 03-16-2024 11:47 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 01:03 PM.


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