allow extra images etc
This commit is contained in:
parent
813d802fce
commit
6c84d4eb1c
2 changed files with 16 additions and 13 deletions
|
@ -29,11 +29,12 @@ dependSingle' yamlDir info prefix build nsfw =
|
|||
|
||||
paths = map #path images
|
||||
dls = mapMaybe #download images
|
||||
extras = #extras info
|
||||
|
||||
dir = build </> prefix </> yamlDir
|
||||
page = dir </> "index.html"
|
||||
deps = unwords $ map (dir </>) $
|
||||
thumbFile (thumbnail info) : map pageFile paths ++ paths ++ dls
|
||||
thumbFile (thumbnail info) : map pageFile paths ++ paths ++ dls ++ extras
|
||||
|
||||
dependGallery :: GalleryInfo
|
||||
-> FilePath -- ^ index file
|
||||
|
|
|
@ -40,7 +40,8 @@ data Info =
|
|||
nsfwDesc :: !(Maybe Text),
|
||||
images :: ![Image],
|
||||
thumb' :: !(Maybe FilePath),
|
||||
links :: ![Link]
|
||||
links :: ![Link],
|
||||
extras :: ![FilePath]
|
||||
}
|
||||
deriving (Eq, Show)
|
||||
|
||||
|
@ -127,6 +128,7 @@ instance FromYAML Info where
|
|||
<*> (m .: "images" >>= imageList)
|
||||
<*> m .:? "thumb"
|
||||
<*> m .:? "links" .!= []
|
||||
<*> m .:? "extras" .!= []
|
||||
|
||||
instance FromYAML Artist where
|
||||
parseYAML y = justName y <|> withUrl y where
|
||||
|
|
Loading…
Reference in a new issue