Add "Split EPUB every N chapters" feature#2524
Add "Split EPUB every N chapters" feature#2524AdolDev40 wants to merge 2 commits intodteviot:ExperimentalTabModefrom
Conversation
- Added 'Split EPUB every N chapters' option (disabled by default with N=0). - Generates multiple EPUB files for long novels. - Cleaned filenames to remove invalid characters for Windows/Linux/macOS. - Ensured metadata and TOC are regenerated for each split block.
What do you mean too large? We made sure that it can get bigger than 1gb. |
I was mainly referring to my experience with e-reader hardware. When a file has 2,000+ pages, it takes a long time to load, and I have some books with 5,000 or even 10,000 pages. |
|
A couple of questions for you.
Note, In general the policy of WebToEpub is to keep it as simple as possible. Additional epub processing is usually deferred to other tools. |
Summary
Adds the ability to split a novel into multiple EPUB files based on a user-defined chapter count. Useful for very long novels where a single EPUB becomes too large.
Changes
New feature: Split EPUB by N chapters
popup.html)0(disabled) by default — existing behavior is unchangedN=20), generates multiple EPUBs with padded filenames:NovelName 01 - 20.epubNovelName 21 - 40.epubNovelName 41 - 50.epubFilename sanitization
makeNovelBaseName()removes characters invalid on Windows/Linux/macOS (<>:"/\|?*~) and control characters (0x00–0x1F)Files modified
plugin/js/main.jssaveSplitEpubs(),makeSplitFileName(),makeNovelBaseName(),getSplitChapterCount()plugin/js/UserPreferences.jssplitChaptersPerEpubpreference (default:"0")plugin/popup.htmlplugin/_locales/en/messages.jsonpackage.jsonreadme.mdChecklist
package.jsonreadme.mdAnexo