main - code

epub-tools

about

epub-tools is a suite of command-line utilities for creating and manipulating epub book files. Included are: epubmeta, epubname, epubzip. This software uses the epub-metadata library, also available on Hackage.

epubmeta is a command-line utility for examining and editing epub book metadata. With it you can export, import and edit the raw OPF Package XML document for a given book. Or simply dump the metadata to stdout for viewing in a friendly format.

Here's an example of epubmeta output:

$ epubmeta Kelly_Kessel_Lethem-NinetyPercentOfEverything.epub

package
   version: 2.0
   unique-identifier: calibre_id
title: Ninety Percent of Everything
creator
   role: aut
   file-as: Kelly, James Patrick
   text: James Patrick Kelly
creator
   role: aut
   text: John Kessel
creator
   role: aut
   text: Jonathan Lethem
contributor
   role: bkp
   file-as: calibre
   text: calibre (0.5.1) [http://calibre.kovidgoyal.net]
date: 2001-03-25T00:00:00
identifier
   id: calibre_id
   scheme: calibre
   text: b1026732-69a5-4a05-a8d9-a1701685f6fa
identifier
   id: [WARNING: missing required id attribute]
   scheme: ISBN
   text: 1-590620-00-3
subject: Science Fiction/Fantasy
publisher: www.Fictionwise.com
language: en-us

epubname is a command-line utility for renaming epub ebook files based on their OPF Package metadata. It tries to use author names and title info to construct a sensible name.

Using it looks like this:

$ epubname poorly-named-book.epub

poorly-named-book.epub -> WattsPeter-Blindsight_2006.epub

$ epubname another-poorly-named-book.epub

another-poorly-named-book.epub -> Kelly_Kessel_Lethem-NinetyPercentOfEverything.epub

epubzip is a handy utility for zipping up the files that comprise an epub into an .epub zip file. Using the same technology as epubname, it can try to make a meaningful filename for the book.

The software in epub-tools is written in Haskell. It's known to build under GHC 7.6.2

news

2013-04-14 (v2.2)
2013-02-03 (v2.1.1)
2013-02-01 (v2.1.0)
2012-10-31 (v2.0.0)
2012-01-29 (v1.1.2)
2011-11-15 (v1.1.1)
2011-11-04 (v1.1.0)
2011-10-27 (v1.0.0.1)
2011-04-23 (v1.0.0.0)

getting it



last modified 2013-04-14