View Single Post
Old 09-24-2010, 10:00 AM   #1
GRiker
Comparer of the Ephemeris
GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.
 
Posts: 1,496
Karma: 424697
Join Date: Mar 2009
Device: iPad
[Old Thread] Tweak ePub - new feature (0.7.20)

Calibre now makes it possible to make small edits — tweaks — to ePubs in your library. You can use this feature to correct typos and formatting problems, or to edit CSS rules. This feature requires some knowledge of the ePub format — I would describe it as an intermediate user feature. If you need to learn more about the structure of ePubs, take a look at Liza Daly's Build a Digital Book with ePub or Liz Castro's EPUB Straight to the Point.

Begin by selecting a book in your library including an ePub format. Right-click to display the context menu, then select Tweak ePub. (You can also press the shortcut key 'T'). If you do not see the 'Tweak ePub' option, see If you have problems below. If the book does not currently include an ePub format, see Usage tips below.

The Tweak ePub dialog is displayed overlaying the top left corner of the calibre interface:


Click Explode ePub to open a file browser window showing the contents of the ePub. In the file browser window, right-click the file to be edited, then 'Open with...' your editor of choice. (The feature has been tested with BBEdit and Dreamweaver under OSX, and EditPad Pro under Windows.)

When your tweaks are complete, close the file browser window. Click Rebuild ePub. The tweaked ePub is rebuilt, and the rebuilt ePub replaces the original ePub in your calibre library.

Clicking Cancel discards all changes. The original ePub remains untweaked in your library.

Usage tips:
  • If you want to experiment with tweaking an ePub, use calibre's Save to disk to save a backup copy of your original ePub before you begin.
  • When editing HTML files, it may not be immediately apparent which file has the typo you're looking for. By default, HTML files normally open with a web browser, making it easier to figure out which file corresponds to which chapter. Double-click the file or use 'Open' from the context menu to view the files in your default browser.
  • If you need to make structural changes to your ePub, use Sigil or an ePub editor of your choosing. The 'Tweak ePub' feature is designed for light-weight touchups to ePub content.
  • When editing with an HTML design tool like Dreamweaver, changes made to the CSS can be previewed within the editor.
  • If the book you want to edit is not in ePub format:
    • Convert the book from its original format to ePub using Convert books
    • Explode, edit and rebuild the ePub as described above.
    • Convert the ePub back to your original format.

Under the hood:
  • Other than your edits, Tweak ePub does not modify the content of your ePub in any way.
  • Tweak ePub is a GUI-only feature. It is not available in the command line tools.

If you have problems:
  • I don't see the 'Tweak ePub' option when I right-click a book.
    • Open Preferences|Interface|Customize the toolbar
    • Select The context menu for books in the calibre library
    • In Available actions, select Tweak ePub
    • Click the right-pointing arrow, adding the Tweak ePub action to Current actions

Please post comments, questions, suggestions in this thread.

G

Last edited by GRiker; 09-24-2010 at 05:56 PM.
GRiker is offline   Reply With Quote