View Single Post
Old 05-19-2012, 05:15 PM   #1
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.
 
Posts: 1,588
Karma: 411867
Join Date: Dec 2011
Location: Midwest USA
Device: Nook STR w/Glowlight, Kindle 3g, Droid
[GUI Plugin] EpubSplit

Splitting omnibus eBooks into multiple eBooks seems to be a common request, but there haven't been many tools to do so without a lot of hand editing.

This plugin provides the ability to create new EPUBs by splitting off part of an existing (non-DRM) EPUB format eBook.

Main Features of EpubSplit Plugin:
  • Present the user with a list of 'split lines' in the existing EPUB. The beginning of each file listed in the manifest spine and each Table of Contents(TOC) entry. <guide> tagged files are also indicated.
  • 'Preview' contents of each 'split line' as a tooltip over the HREF.
  • Allow user to edit the TOC entry(s) for each 'line'.
  • Select one or more of the offered lines to include in the new eBook,
  • Edit the metadata for the new split eBook, and then,
  • Extract only the selected contents of the source EPUB into the new EPUB,
  • Scan the selected content for CSS & image links for additional files to include,
  • Scan the selected content for internal links and anchors and update links that need to point to different filenames,
  • Use the metadata entered into calibre for the new eBook (including cover) as the metadata in the new EPUB.
  • Return to list of source EPUB sections after creating a new split EPUB.
  • Configure which metadata from source EPUB to copy to new eBook, now offering more of the standard metadata and custom columns.
  • Configurably populate a custom column with the source book title/author/etc.
  • CLI via calibre-debug --run-plugin

Special Notes:
  • Requires Calibre v0.9.29 or later.

Languages:

This plugin has translations for:
  • English
  • French
  • Spanish
  • Ukrainian
  • Portuguese (Brazil)

Command Line Interface(CLI)

Starting with calibre v0.9.23, calibre offers a command-line interface (CLI) for calling plugins.

This plugin supports that option and allows the user to call the plugin's basic functionality from outside calibre without having to install Python or get the plugin's files separately.

Details:
Spoiler:

Code:
Usage: calibre-debug.exe --run-plugin EpubSplit -- [options] <input epub> [line numbers...]

Giving an epub without line numbers will return a list of line numbers: the
possible split points in the input file. Calling with line numbers will
generate an epub with each of the "lines" given included.

Options:
  -h, --help            show this help message and exit
  -o OUTPUT, --output=OUTPUT
                        Set OUTPUT file, Default: split.epub
  -t TITLE, --title=TITLE
                        Use TITLE as the metadata title.  Default: '<original
                        epub title> Split'
  -d DESC, --description=DESC
                        Use DESC as the metadata description.  Default: 'Split
                        from <epub title> by <author>'.
  -a AUTHOR, --author=AUTHOR
                        Use AUTHOR as a metadata author, multiple authors may
                        be given, Default: <All authors from original epub>
  -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
  -c COVER, --cover=COVER
                        Path to a jpg to use as cover image.


Installation Steps:
  1. Download the attached zip file and install the plugin/add to context menu or toolbar/restart Calibre as described in the Introduction to plugins thread.

Paypal Donations:
  • If you find this plugin useful please feel free to show your appreciation.

Version History:
Spoiler:

Version 2.0.0 - 22 Jul 2014
Now supporting Qt5 and Calibre 2.0 (currently in beta).
Translations updates to Spanish, French and Ukrainian and new translation Portuguese (Brazil), courtesy of the volunteers at Transifex.
Plugin zip file now uncompressed for performance per Kovid's recommendation.

Version 1.3.4 - 02 Jul 2014
Update Spanish and add Ukrainian translations, courtesy of the volunteers at Transifex.
Pretty format XML of generated metadata files.

Version 1.3.3 - 30 Dec 2013
Tweaks to French Translation. Thanks, Ptitprince.

Version 1.3.2 - 12 Dec 2013
Add Spanish Translation. Thanks, Terisa.
Tweaks to French Translation. Thanks, Ptitprince.

Version 1.3.1 - 07 Dec 2013
Add French Translation. Thanks, Ptitprince.

Version 1.3.0 - 22 Sep 2013
Remove debug output. Caused errors for a Mac user with a large epub.

Version 1.2.9 - 03 May 2013
Fix for a changed an internal name in calibre in 0.9.29.

Version 1.2.8 - 16 Mar 2013
Move CLI main import into cli_main. Caused problems for some users on install.

Version 1.2.7 - 15 Mar 2013
Add calibre CLI.

Version 1.2.6 - 01 Dec 2012
Change import for 64 bit calibre.

Version 1.2.5 - 26 Nov 2012
Disable plugin when viewing device, not library.

Version 1.2.4 - 09 Nov 2012
Handle TOC entries with empty text gracefully.

Version 1.2.3 - 27 Sep 2012
'Preview' contents of each 'split line' as a tooltip over the HREF.

Version 1.2.2 - 23 Sep 2012
Add more standard columns to copy list, add custom columns tab to allow copying, make both scrollable in config dialog.
Add options to save the source book title/author/etc to a custom column.

Version 1.2.1 - 28 Jul 2012
Allow for old JSON settings with only partial settings.

Version 1.2.0 - 27 Jul 2012
Return to list of source EPUB sections after creating a new split EPUB.
Options now stored inside the Library rather than an external JSON file.

Version 1.1.1 - Jun 28 2012
Handling links to missing images and css files better.

Version 1.1.0 - Jun 23 2012
Change icon
Add config options to choose which metadata from source EPUB to copy to new eBook.

Version 1.0.0 - May 26 2012
Allow edit of ToC entries.

Version 0.0.1 - May 21 2012
Not configurable.
Show {Guide} entries when splitting.

Version 0.0.0 - May 19 2012
Initial version.
Attached Files
File Type: zip EpubSplit.zip (195.5 KB, 169 views)

Last edited by JimmXinu; 07-22-2014 at 10:31 PM. Reason: Update to latest version.
JimmXinu is offline   Reply With Quote