Add tag extractor
This commit is contained in:
parent
2a35aff1b2
commit
f32ddea748
1 changed files with 6 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue