Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Splitting book into chunks of X #4

Closed
Lgk2 opened this issue Aug 30, 2022 · 7 comments
Closed

Splitting book into chunks of X #4

Lgk2 opened this issue Aug 30, 2022 · 7 comments

Comments

@Lgk2
Copy link

Lgk2 commented Aug 30, 2022

Hey i like your plugin a lot but i'm curious if you would be able to add a feature to split a book into chunks of 50. Kind of like New Book per section but for more than one chapter per new book.

@Lgk2
Copy link
Author

Lgk2 commented Aug 30, 2022

Maybe you could allow it in CLI rather than in the graphical interface, whichever one is easier/best.

@JimmXinu
Copy link
Owner

Here's a link to the last time somebody asked for that. Quoted in part:

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.

If you're using CLI, you could wrap a script around epubsplit to do it yourself the way you want. You'd need to get the TOC list first to get the last valid number, but should otherwise be straightforward.

I won't close this just yet, because I'm still thinking about it a bit. But odds are the answer will remain the same.

@Lgk2
Copy link
Author

Lgk2 commented Aug 31, 2022

Couldn't you have a radiobutton in which you choose whether or not to split by TOC entry or by part/file counts? Or is the problem that if you use the aforementioned solution for all the complexities the feature would be filled to the brink with lots of complex and unintuitive options?

Wildly differing split sizes is a thing users will simply have to accept if they use the feature.

@JimmXinu
Copy link
Owner

I've posted a EpubSplit.zip test version here, but put the details on MobileRead in the plugin thread where most EpubSplit discussion happens.

@JimmXinu
Copy link
Owner

JimmXinu commented Sep 1, 2022

I see I didn't mention that the test version contains an implementation of this feature...

@Lgk2
Copy link
Author

Lgk2 commented Sep 1, 2022

Ah good i tested the new feature on the book Martial World that has 2276 chapters and i split it into chunks of 50 and it seems to work flawlessly.

@JimmXinu
Copy link
Owner

Released in v3.5.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants