diff options
author | pacien | 2019-12-31 01:39:23 +0100 |
---|---|---|
committer | pacien | 2019-12-31 01:39:23 +0100 |
commit | 7ef9f09c0f3be1cd5e1f38c9abc845abc9ed3639 (patch) | |
tree | b727b960c95feae01f52274013c1ad2ccb01c4d5 /compiler/src/Config.hs | |
parent | 856d6ea290f6050e813e9cd5634b9e9960995671 (diff) | |
download | ldgallery-7ef9f09c0f3be1cd5e1f38c9abc845abc9ed3639.tar.gz |
compiler: add option to add implicit directory tags
GitHub: closes #7
Diffstat (limited to 'compiler/src/Config.hs')
-rw-r--r-- | compiler/src/Config.hs | 2 |
1 files changed, 2 insertions, 0 deletions
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(..)) | |||
42 | 42 | ||
43 | data CompilerConfig = CompilerConfig | 43 | data CompilerConfig = CompilerConfig |
44 | { galleryName :: String | 44 | { galleryName :: String |
45 | , implicitDirectoryTag :: Bool | ||
45 | , thumbnailResolution :: Resolution | 46 | , thumbnailResolution :: Resolution |
46 | , pictureMaxResolution :: Maybe Resolution | 47 | , pictureMaxResolution :: Maybe Resolution |
47 | } deriving (Generic, Show) | 48 | } deriving (Generic, Show) |
@@ -49,6 +50,7 @@ data CompilerConfig = CompilerConfig | |||
49 | instance FromJSON CompilerConfig where | 50 | instance FromJSON CompilerConfig where |
50 | parseJSON = withObject "CompilerConfig" $ \v -> CompilerConfig | 51 | parseJSON = withObject "CompilerConfig" $ \v -> CompilerConfig |
51 | <$> v .:? "galleryName" .!= "Gallery" | 52 | <$> v .:? "galleryName" .!= "Gallery" |
53 | <*> v .:? "implicitDirectoryTag" .!= False | ||
52 | <*> v .:? "thumbnailResolution" .!= (Resolution 400 400) | 54 | <*> v .:? "thumbnailResolution" .!= (Resolution 400 400) |
53 | <*> v .:? "pictureMaxResolution" | 55 | <*> v .:? "pictureMaxResolution" |
54 | 56 | ||