From 7ef9f09c0f3be1cd5e1f38c9abc845abc9ed3639 Mon Sep 17 00:00:00 2001 From: pacien Date: Tue, 31 Dec 2019 01:39:23 +0100 Subject: compiler: add option to add implicit directory tags GitHub: closes #7 --- compiler/src/Config.hs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'compiler/src/Config.hs') diff --git a/compiler/src/Config.hs b/compiler/src/Config.hs index c75ab01..d025afd 100644 --- a/compiler/src/Config.hs +++ b/compiler/src/Config.hs @@ -42,6 +42,7 @@ import Resource (Resolution(..)) data CompilerConfig = CompilerConfig { galleryName :: String + , implicitDirectoryTag :: Bool , thumbnailResolution :: Resolution , pictureMaxResolution :: Maybe Resolution } deriving (Generic, Show) @@ -49,6 +50,7 @@ data CompilerConfig = CompilerConfig instance FromJSON CompilerConfig where parseJSON = withObject "CompilerConfig" $ \v -> CompilerConfig <$> v .:? "galleryName" .!= "Gallery" + <*> v .:? "implicitDirectoryTag" .!= False <*> v .:? "thumbnailResolution" .!= (Resolution 400 400) <*> v .:? "pictureMaxResolution" -- cgit v1.2.3