epub-metadata-2.0.1: Library and utility for parsing and manipulating ePub OPF package data

Codec.Epub.IO

Description

Functions for doing some disk IO with ePub documents

Note that these functions do their work by using the external unzip utility.

Synopsis

Documentation

extractFileFromZipSource

Arguments

:: (MonadIO m, MonadError String m) 
=> FilePath

path to zip file

-> FilePath

path within zip file to extract

-> m String

contents of expected file

Extract a file from a zipfile. This is here because ePub files are really just zip files.

Yep, you saw right sports fans. This code is using the command- line unzip utility. In the future I'd like to make it use a library.

opfPathSource

Arguments

:: (MonadError String m, MonadIO m) 
=> FilePath

path to ePub zip file

-> m String

path within ePub to the OPF Package Document

Get the path within an ePub file to the OPF Package Document