epub-metadata-3.0: Library for parsing and manipulating EPUB files and OPF package data

Safe HaskellNone

Codec.Epub2.IO

Description

Functions for doing some disk IO with ePub documents

Synopsis

Documentation

opfContentsFromZipSource

Arguments

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

path to ePub zip file

-> m (FilePath, String)

path and contents of the OPF Package Document

Get the contents of the OPF Package Document from an EPUB (zip) file

opfContentsFromBSSource

Arguments

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

contents of the zip file

-> m (FilePath, String)

path and contents of the OPF Package Document

Get the contents of the OPF Package Document from a ByteString representing an EPUB (zip) file

opfContentsFromDirSource

Arguments

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

directory path

-> m (FilePath, String)

path and contents of the OPF Package Document

Get the contents of the OPF Package Document from a directory containing the files from an EPUB file (as in: it's been unzipped into a dir)

removeIllegalStartChars :: String -> StringSource

An evil hack to remove *ILLEGAL* characters before the XML declaration. Why do people write software that does this? Can't they follow directions?

removeEncoding :: String -> StringSource

An evil hack to remove encoding from the document

removeDoctype :: String -> StringSource

An evil hack to remove any ... from the document