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 05-28-2022, 09:25 AM   #361
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,368
Karma: 3966377
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Sarrenthal: This is a bit more complicated than it may seem. More complicated than I want to deal, honestly.

If you are commonly split epubs from the same source, it probably seems obvious what the 'right' choices are, but I have to consider all possibilities plus the edge and corner cases they can each have.

Here are just a few of the complexities:

- Some epubs have many parts (different files internally), but few TOC entries.
- Some epubs have may TOC entries, but few part/files.
Should the automatic split points be by TOC entry or by part/file counts?

- In some epubs the TOC entries point to beginning of each part/file.
- In some the TOC entries point to HTML tags somewhere.
Some epubs include content in the same part/file before the TOC tag, if split from the TOC tag, that prior content will be in the previous split.

- TOC entries and part/files are never guaranteed to be evenly sized.
Splitting every 10 or 100 entries may have wildly different sized splits.
JimmXinu is offline   Reply With Quote
Old 05-28-2022, 11:15 AM   #362
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,904
Karma: 55267620
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 Sarrenthal View Post
Hi! I'm sure you might have gotten this question before but, was there anyway to autosplit a book into equal parts? Some of the novels I've been splitting are 1000+ parts and I would like to just be able to split every 100 or split them evenly into x number of books. Is that a feature that I am unaware of? Thanks for the great plugin!
Insane for a Novel if what you said is really true

EPUB split is a tool typically used to break up Omnibus editions/boxed sets into their (original) books.

Convert has a setting to break up EPUB internal files because older device choked on big chunk . 260K is the default. IMHO leave that for next chunk performance. It tries and break at a logical place, not a precise byte count.

What I suspect is crappy coding, that was converted.
Calibre typically will break files on H# tags. (there is a conversion setting on what/how to break)
Unfortunately, there are still folk that use those for Bold -centered
and Conversion makes a hash out of those. ( another reason to archive the original source file)
theducks is offline   Reply With Quote
Advert
Old 05-28-2022, 08:26 PM   #363
Rellwood
Library Breeder (She/Her)
Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.
 
Rellwood's Avatar
 
Posts: 1,166
Karma: 1900479
Join Date: Apr 2015
Location: Fullerton, California
Device: Kobo Aura HD (1) PW3 (4) PW3 2019 new edition (1)
Suggestion for plugin

I would like to ask that this plugin be calibrated the same as epub merge for some of the custom colums.

Example - tags, genres, various dates, pulisher.

I am trying to split anthologies and would like to keep the various columns that I have for date added and booksource, etc.

I understand that columns that would normally be merged when merging epubs won't split but being able to set some of the columns would save a lot of time.

Thanks!
Rellwood is offline   Reply With Quote
Old 05-28-2022, 09:17 PM   #364
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,368
Karma: 3966377
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Already in it.

Go look in the EpubSplit config, either in the Calibre Preferences > Plugins or from the Configure button when you have EpubSplit open on a book.
JimmXinu is offline   Reply With Quote
Old 05-29-2022, 04:11 PM   #365
Rellwood
Library Breeder (She/Her)
Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.
 
Rellwood's Avatar
 
Posts: 1,166
Karma: 1900479
Join Date: Apr 2015
Location: Fullerton, California
Device: Kobo Aura HD (1) PW3 (4) PW3 2019 new edition (1)
Quote:
Originally Posted by JimmXinu View Post
Already in it.

Go look in the EpubSplit config, either in the Calibre Preferences > Plugins or from the Configure button when you have EpubSplit open on a book.
Thanks! I didn't see it there. Makes more sense to set the columns for each "split"
Rellwood is offline   Reply With Quote
Advert
Old 07-16-2022, 06:31 PM   #366
shauntih
Junior Member
shauntih began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Sep 2013
Device: Kindle
Exclamation Issue working with Calibre 6.1

Calibre 6.0 and 6.1 just came out, and it was mentioned that some plugins wouldn't work. I found that this epubsplit plugin has an issue with it - when you right-click a section to "check selected", it throws the error below. I use this plugin so frequently that I downgraded Calibre to use it. Please update the plugin to work with Calibre 6+!
------------------------------------------------------------------------------
calibre, version 6.1.0
ERROR: Unhandled exception: <b>TypeError</b>:exec_() takes 1 positional argument but 2 were given

calibre 6.1 embedded-python: True
Windows-10-10.0.22000-SP0 Windows ('64bit', 'WindowsPE')
('Windows', '10', '10.0.22000')
Python 3.10.1
Windows: ('10', '10.0.22000', 'SP0', 'Multiprocessor Free')
Interface language: None
Successfully initialized third party plugins: DeDRM (7, 0, 0) && APNX Generator (1, 1, 0) && Barnes & Noble (1, 2, 16) && Comments Cleaner (1, 6, 3) && Consolidate All Library Metadata (2, 0, 42) && Copy Cover To Device (2, 0, 4) && Count Pages (1, 11, 2) && EpubMerge (2, 13, 0) && EpubSplit (3, 3, 0) && Find Duplicates (1, 9, 5) && Generate Cover (2, 1, 1) && Goodreads (1, 5, 3) && Goodreads Sync (1, 15, 4) && KindleUnpack - The Plugin (0, 83, 1) && Kobo Books (1, 9, 2) && Manage Series (1, 3, 0) && Modify ePub (1, 7, 3) && MultiColumnSearch (1, 0, 89) && Obok DeDRM (7, 2, 1) && Quality Check (1, 12, 0) && Reading List (1, 12, 0) && Save Virtual Libraries To Column GUI (2, 3, 0) && Smashwords Metadata (1, 0, 2) && View Manager (1, 8, 0)
Traceback (most recent call last):
File "calibre_plugins.epubsplit.dialogs", line 299, in contextMenuEvent
TypeError: exec_() takes 1 positional argument but 2 were given
shauntih is offline   Reply With Quote
Old 07-16-2022, 07:32 PM   #367
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,368
Karma: 3966377
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Quote:
Originally Posted by shauntih View Post
File "calibre_plugins.epubsplit.dialogs", line 299, in contextMenuEvent
TypeError: exec_() takes 1 positional argument but 2 were given
The right-click a section to "check selected" feature appears to be the only part that has a problem. So you can still use EpubSplit, just not that particular feature.

What's happening:

Qt6 renamed a function previously exec_() to exec().

Python2 reserved exec as a fundamental statement of the language, like if() or while(). Which means if I try to use q.exec() in Cal3/4, it throws a syntax error, rather than anything I can catch and make conditional. (Which is why qt called it exec_ instead.)

kovid thoughtfully restored exec_() in Calibre's qt6 compatibility code, but without parameters.

I've submitted a PR to add them. If accepted, this EpubSplit feature will work again in the next calibre release with no other action.

If the PR (or some equivalent) is not accepted, I will have consider dropping Cal3/4 support for EpubSplit, or re-architecting how the right-click menu feature works.
JimmXinu is offline   Reply With Quote
Old 07-17-2022, 03:45 PM   #368
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,368
Karma: 3966377
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Quote:
Originally Posted by JimmXinu View Post
kovid thoughtfully restored exec_() in Calibre's qt6 compatibility code, but without parameters.

I've submitted a PR to add them. If accepted, this EpubSplit feature will work again in the next calibre release with no other action.
PR was accepted. Next Calibre6 release should work fine.
JimmXinu is offline   Reply With Quote
Old 07-19-2022, 10:28 AM   #369
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,368
Karma: 3966377
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
New Test Version Posted

2022-07-19
- Use cal6 icon theme system to allow plugin icon customization.

EpubSplit only has one custom icon, but it uses several of the 'standard' Calibre icons. Now it should use installed icon themes and icon themes can include a custom icon for EpubSplit specifically (EpubSplit/images/icon.png). Only for Calibre 6+.

Last edited by JimmXinu; 07-20-2022 at 03:02 PM. Reason: Remove obsolete test version
JimmXinu is offline   Reply With Quote
Old 07-20-2022, 03:01 PM   #370
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,368
Karma: 3966377
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
New Test Version Posted

2022-07-20
- Use cal6 icon theme system to allow plugin icon customization--but don't require pluginname/images/

EpubSplit only has one custom icon, but it uses several of the 'standard' Calibre icons. Now it should use installed icon themes and icon themes can include a custom icon for EpubSplit specifically (EpubSplit/icon.png). Only for Calibre 6+.

Note that until Cal 6.2 comes out, you will see extra stacktraces ending with KeyError: "There is no item named 'icon.png' in the archive" if you run Calibre in debug.

Last edited by JimmXinu; 07-31-2022 at 11:00 AM. Reason: Remove obsolete test version
JimmXinu is offline   Reply With Quote
Old 07-31-2022, 10:52 AM   #371
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,368
Karma: 3966377
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
New Version Released

Version 3.4.0 - 2022-07-31
- Use Cal6 get_icons() so icon themes apply
- Update Translations
JimmXinu is offline   Reply With Quote
Old 08-13-2022, 01:17 AM   #372
MCBastos
Enthusiast
MCBastos began at the beginning.
 
Posts: 37
Karma: 10
Join Date: Jan 2012
Location: Brazil
Device: Galaxy A71
A question

Just for clarification sake (and possibly to add to the plugin description), because I don't think really a problem as I found a fairly easy workaround, as I will explain below...

I understand that this plugin currently supports only ePub2? I say that because I ran into an issue splitting an ePub I obtained -- the plugin refused to run with an error message saying that it requires ePub2. Digging into the internal structure of the problem ePub appears to indicate that it is in ePub3 format.

Fortunately, it turned out to be easy to work around this: I just converted ePub -> ePub which apparently turned the ePUb3 into an ePub2.

I have seen criticism of the ePub3 format as excessively complex and hard to implement, so I won't be surprised if the answer to the following question is "no", but anyway... are there any plans to add ePub3 support?
MCBastos is offline   Reply With Quote
Old 08-13-2022, 09:58 AM   #373
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,368
Karma: 3966377
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Converting epub3->epub2 is the official EpubSplit solution.

If it's a significant problem, I can add code to automatically do epub3->epub2 conversion--EpubMerge already has that code.

So far, I have yet to see a compelling reason to implement epub3 natively.
JimmXinu is offline   Reply With Quote
Old 08-13-2022, 11:26 AM   #374
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 74,444
Karma: 129358310
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by JimmXinu View Post
Converting epub3->epub2 is the official EpubSplit solution.

If it's a significant problem, I can add code to automatically do epub3->epub2 conversion--EpubMerge already has that code.

So far, I have yet to see a compelling reason to implement epub3 natively.
One reason is most ePub these days are being released as ePub 3. So these omnibus that are to be slit could be ePub 2, ePub 2/3, or ePub 3. And the newer they are, the better chance of just ePub 3.

When you convert from ePub 3 > ePub 2, does all the ePub 3 code get removed? Do things like <figure> get changed to <div>? Do small-caps get converted to a font size (I prefer 0.8333em)? There are a number of things that may be best done by hand if the conversion doesn't do it properly.

Last edited by JSWolf; 08-13-2022 at 11:28 AM.
JSWolf is offline   Reply With Quote
Old 08-31-2022, 03:08 PM   #375
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,368
Karma: 3966377
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
New Test Version Posted

2022-08-31
- Add Split every N sections & Split into N Books options.

This is something that's come up a few times before, but I've always dragged my feet implementing it.

This time, when Lgk2 asked in github I was a bit more open the idea for whatever reason.

There's a new tab in EpubSplit config where you can know choose which of three modes the 'New Book Per' button will use:
  • New Book per Section (as previous);
  • New Book per N Sections (as requested), plus an orphan limit feature, and;
  • N New Books (included just because), even divide selected sections into N new books.

Attached is a screen shot of the new config tab.

What this implementation does is expand on the pre-existing 'New Book per Section' feature and basically just 'do the same thing, but with more sections'. So the same 'sections with no ToC entry lump with the previous section' limitation applies--complete with warning dialog (until you click the 'never show this again' checkbox).

I've tested with a relatively small set of books, but the basic splitting hasn't changed, just how sections are selected. I checked with Cal3, 5 & 6.

For reference, here is the last time this was discussed.

For some reason, MR isn't letting me upload the zip today, so the test version is on github.
Attached Thumbnails
Click image for larger version

Name:	Capture.PNG
Views:	90
Size:	106.0 KB
ID:	196187  
JimmXinu is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] KindleUnpack - The Plugin DiapDealer Plugins 494 05-18-2024 02:34 AM
[GUI Plugin] EpubMerge JimmXinu Plugins 519 04-01-2024 10:25 AM
[GUI Plugin] Open With kiwidude Plugins 403 04-01-2024 08:39 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:05 AM.


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