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
|
paths = map #path images
|
||||||
dls = mapMaybe #download images
|
dls = mapMaybe #download images
|
||||||
|
extras = #extras info
|
||||||
|
|
||||||
dir = build </> prefix </> yamlDir
|
dir = build </> prefix </> yamlDir
|
||||||
page = dir </> "index.html"
|
page = dir </> "index.html"
|
||||||
deps = unwords $ map (dir </>) $
|
deps = unwords $ map (dir </>) $
|
||||||
thumbFile (thumbnail info) : map pageFile paths ++ paths ++ dls
|
thumbFile (thumbnail info) : map pageFile paths ++ paths ++ dls ++ extras
|
||||||
|
|
||||||
dependGallery :: GalleryInfo
|
dependGallery :: GalleryInfo
|
||||||
-> FilePath -- ^ index file
|
-> FilePath -- ^ index file
|
||||||
|
|
|
@ -40,7 +40,8 @@ data Info =
|
||||||
nsfwDesc :: !(Maybe Text),
|
nsfwDesc :: !(Maybe Text),
|
||||||
images :: ![Image],
|
images :: ![Image],
|
||||||
thumb' :: !(Maybe FilePath),
|
thumb' :: !(Maybe FilePath),
|
||||||
links :: ![Link]
|
links :: ![Link],
|
||||||
|
extras :: ![FilePath]
|
||||||
}
|
}
|
||||||
deriving (Eq, Show)
|
deriving (Eq, Show)
|
||||||
|
|
||||||
|
@ -127,6 +128,7 @@ instance FromYAML Info where
|
||||||
<*> (m .: "images" >>= imageList)
|
<*> (m .: "images" >>= imageList)
|
||||||
<*> m .:? "thumb"
|
<*> m .:? "thumb"
|
||||||
<*> m .:? "links" .!= []
|
<*> m .:? "links" .!= []
|
||||||
|
<*> m .:? "extras" .!= []
|
||||||
|
|
||||||
instance FromYAML Artist where
|
instance FromYAML Artist where
|
||||||
parseYAML y = justName y <|> withUrl y where
|
parseYAML y = justName y <|> withUrl y where
|
||||||
|
|
Loading…
Reference in a new issue