| Safe Haskell | None |
|---|
Codec.Epub2.IO
Description
Functions for doing some disk IO with ePub documents
- opfContentsFromZip :: (MonadError String m, MonadIO m) => FilePath -> m (FilePath, String)
- opfContentsFromBS :: (MonadError String m, MonadIO m) => ByteString -> m (FilePath, String)
- opfContentsFromDir :: (MonadError String m, MonadIO m) => FilePath -> m (FilePath, String)
- removeIllegalStartChars :: String -> String
- removeEncoding :: String -> String
- removeDoctype :: String -> String
Documentation
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
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
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