Minor cleanup
This commit is contained in:
parent
747c9183a9
commit
adfc94e352
1 changed files with 2 additions and 6 deletions
|
|
@ -11,8 +11,7 @@ module EpubParser
|
||||||
, Tag(..)
|
, Tag(..)
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Codec.Archive.Zip
|
import Codec.Archive.Zip ( Archive, findEntryByPath, fromEntry, toArchive )
|
||||||
( Archive, findEntryByPath, fromEntry, toArchive )
|
|
||||||
|
|
||||||
import qualified Data.ByteString.Lazy as B
|
import qualified Data.ByteString.Lazy as B
|
||||||
import qualified Data.Text as T
|
import qualified Data.Text as T
|
||||||
|
|
@ -23,9 +22,7 @@ import Text.HTML.TagSoup (parseTags, Tag(..))
|
||||||
import System.FilePath (takeDirectory, (</>), normalise)
|
import System.FilePath (takeDirectory, (</>), normalise)
|
||||||
import Data.List (find)
|
import Data.List (find)
|
||||||
|
|
||||||
-- epub-metadata parse API
|
|
||||||
import Codec.Epub.Parse (getManifest , getSpine)
|
import Codec.Epub.Parse (getManifest , getSpine)
|
||||||
|
|
||||||
import qualified Codec.Epub.Data.Manifest as DM
|
import qualified Codec.Epub.Data.Manifest as DM
|
||||||
import qualified Codec.Epub.Data.Spine as DS
|
import qualified Codec.Epub.Data.Spine as DS
|
||||||
|
|
||||||
|
|
@ -63,8 +60,7 @@ getRootPath (TagOpen "rootfile" attrs : _) = lookup "full-path" attrs
|
||||||
getRootPath (_ : xs) = getRootPath xs
|
getRootPath (_ : xs) = getRootPath xs
|
||||||
|
|
||||||
myEnv :: Archive -> FilePath -> String -> EpubEnv
|
myEnv :: Archive -> FilePath -> String -> EpubEnv
|
||||||
myEnv arch opfPath xml =
|
myEnv arch opfPath xml = EpubEnv arch xml (takeDirectory opfPath)
|
||||||
EpubEnv arch xml (takeDirectory opfPath)
|
|
||||||
|
|
||||||
resolveSpine :: EpubAction [FilePath]
|
resolveSpine :: EpubAction [FilePath]
|
||||||
resolveSpine = do
|
resolveSpine = do
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue