aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/Config.hs
diff options
context:
space:
mode:
authorpacien2020-01-05 19:24:50 +0100
committerpacien2020-01-05 19:24:50 +0100
commit2ad60869c2e8d0846672ccb18b2de99c9cf33671 (patch)
tree20c855a0d6eba12f81d8242caea237eb297f645f /compiler/src/Config.hs
parentab2f076c5bf546f8aca9910b2b61a1b5a67361bc (diff)
downloadldgallery-2ad60869c2e8d0846672ccb18b2de99c9cf33671.tar.gz
compiler: add option to add tags from n parent directories
GitHub: closes #15
Diffstat (limited to 'compiler/src/Config.hs')
-rw-r--r--compiler/src/Config.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/src/Config.hs b/compiler/src/Config.hs
index b9434ba..20bc3bb 100644
--- a/compiler/src/Config.hs
+++ b/compiler/src/Config.hs
@@ -35,7 +35,7 @@ import Resource (Resolution(..))
35data CompilerConfig = CompilerConfig 35data CompilerConfig = CompilerConfig
36 { galleryName :: String 36 { galleryName :: String
37 , ignoreFiles :: String 37 , ignoreFiles :: String
38 , implicitDirectoryTag :: Bool 38 , tagsFromDirectories :: Int
39 , thumbnailMaxResolution :: Resolution 39 , thumbnailMaxResolution :: Resolution
40 , pictureMaxResolution :: Maybe Resolution 40 , pictureMaxResolution :: Maybe Resolution
41 } deriving (Generic, Show) 41 } deriving (Generic, Show)
@@ -44,7 +44,7 @@ instance FromJSON CompilerConfig where
44 parseJSON = withObject "CompilerConfig" $ \v -> CompilerConfig 44 parseJSON = withObject "CompilerConfig" $ \v -> CompilerConfig
45 <$> v .:? "galleryName" .!= "Gallery" 45 <$> v .:? "galleryName" .!= "Gallery"
46 <*> v .:? "ignoreFiles" .!= ".^" 46 <*> v .:? "ignoreFiles" .!= ".^"
47 <*> v .:? "implicitDirectoryTag" .!= False 47 <*> v .:? "tagsFromDirectories" .!= 0
48 <*> v .:? "thumbnailMaxResolution" .!= (Resolution 400 400) 48 <*> v .:? "thumbnailMaxResolution" .!= (Resolution 400 400)
49 <*> v .:? "pictureMaxResolution" 49 <*> v .:? "pictureMaxResolution"
50 50