main -
code
epub-metadata
about
Library for parsing and manipulating ePub OPF package data. An attempt has been made here to very thoroughly implement the OPF Package Document specification. This project at one time included a command-line utility for querying this info (epubmeta) which has been expanded to perform modification and has been moved to the epub-tools project.
epub-metadata is written in Haskell. It's known to build under GHC 7.6.2
news
- 2013-04-13 (v3.0)
-
- Repackaged this code to show that it's for EPUB v2.x only at this time
- Fixed a bug where mimetype file not occurring first in the archive on Windows
- Fixed support for all 0-or-more epub2 metadata fields
- Redesigned the Format (metadata display) code
- Modularized the unit tests so that more tests could be added that aren't specifically about parsing metadata.
- Cosmetic updates to the EPUB metadata API including some documentation clean-up
- 2013-02-01 (v2.3.2)
-
- Added code to strip illegal characters from the beginning of the OPF metadata XML file
- Switched the encoding hack to be case-insensitive
- 2012-10-31 (v2.3.1)
-
- Added a fix for epub zip files with a damaged central directory signature
- 2012-01-29 (v2.3.0)
-
- Encountered a problem in Windows where using a lazy ByteString to read the entire epub zip file was never closing the file while consumer applications were still running. Changed this library to use a strict ByteString instead for reading the zip archive.
- 2011-10-27 (v2.2.0.1)
-
- Changed display output of OPF data to label the textual content of a tag as "text"
- Extensive changes to the cabal build of this project to bring it up to Cabal 1.10
- Unit tests now use the test-suite cabal stanza
- 2011-04-20 (v2.2.0.0)
-
- Now includes some API functions for working directly with zip archives and directories full of the loose files which will be made into epubs
- Moved the epubmeta utility from this project. It's now in epub-tools
- 2011-02-13 (v2.1.0)
-
- Project now uses zip-archive instead of the libzip library. zip-archive is a pure Haskell solution that's easier to build on non-UNIX-like platforms
- Other changes to the build and project to make it buildable under Windows
- 2011-01-10 (v2.0.2)
-
- This library now uses the haskell LibZip library instead of relying on unzip shell command invocation
- Changed command-line utility name from epub-meta to epubmeta
- 2011-01-08 (v2.0.1)
-
- Now always using namespace qualification for all OPF Package tags. Library would incorrectly fail if the OPF document was created using explicit namespacing for the OPF package elements.
- Hack to avoid problems with UTF-8 encoding in OPF Package XML documents
- Hack to avoid problems with !DOCTYPE declarations. Found some books where a DTD was specified for a completely different type of document. Discarding these declarations for now.
- Changed this code to use System.Process instead of HSH for unzip invocation in order to have more control over interpreting exit codes.
- 2011-01-02 (v2.0.0)
-
- Added parsing and output of the manifest, spine and guide portions of the spec. Full read capability of OPF Package data is now complete.
- Major redesign of the API. It's been split and organized into smaller, more focused modules.
- Updated to work with the 9.x version of hxt
- Redesigned epub metadata formatting code to be much more efficient using Writer monad and Data.Sequence
- Added support for new capabilities to command-line utility
- Clarified the Haddock documentation to describe how these data types map to the source XML data
- Updated unit tests to reflect the large API changes
- 2010-05-11 (v1.0.2)
- Initial release
documentation
View the API documentation at the Hackage page
Browse the source code
Read the OPF Package Document specification
getting it
- Build and install with cabal-install:
$ cabal update ; cabal install epub-metadata
- Download the cabalized package from Hackage
- Download the cabalized source tarball from here
- Get source with darcs:
$ darcs get http://ui3.info/darcs/epub-metadata
- Or browse the source on the web
- epub-metadata may also be available for Arch Linux from the AUR
last modified 2013-04-13