diff --git a/app/EpubParser.hs b/app/EpubParser.hs index cbfaf78..f9bea9e 100644 --- a/app/EpubParser.hs +++ b/app/EpubParser.hs @@ -47,6 +47,12 @@ getOpfPath archive = do (t:_) -> Just (fromAttrib "full-path" t) [] -> Nothing +getOpfTags :: Archive -> FilePath -> [Tag String] +getOpfTags archive opfpath = + case findEntryByPath opfpath archive of + Just entry -> parseTags $ C8.unpack (fromEntry entry) + Nothing -> [] + getRootPrefix :: FilePath -> FilePath getRootPrefix path = let dir = takeDirectory path