Functions for doing some disk IO with ePub documents
Note that these functions do their work by using the external unzip utility.
- extractFileFromZip :: (MonadIO m, MonadError String m) => FilePath -> FilePath -> m String
- opfPath :: (MonadError String m, MonadIO m) => FilePath -> m String
Documentation
:: (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.