aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/Config.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/src/Config.hs')
-rw-r--r--compiler/src/Config.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/src/Config.hs b/compiler/src/Config.hs
index 20bc3bb..53333a5 100644
--- a/compiler/src/Config.hs
+++ b/compiler/src/Config.hs
@@ -34,7 +34,8 @@ import Resource (Resolution(..))
34 34
35data CompilerConfig = CompilerConfig 35data CompilerConfig = CompilerConfig
36 { galleryName :: String 36 { galleryName :: String
37 , ignoreFiles :: String 37 , includeFiles :: [String]
38 , excludeFiles :: [String]
38 , tagsFromDirectories :: Int 39 , tagsFromDirectories :: Int
39 , thumbnailMaxResolution :: Resolution 40 , thumbnailMaxResolution :: Resolution
40 , pictureMaxResolution :: Maybe Resolution 41 , pictureMaxResolution :: Maybe Resolution
@@ -43,7 +44,8 @@ data CompilerConfig = CompilerConfig
43instance FromJSON CompilerConfig where 44instance FromJSON CompilerConfig where
44 parseJSON = withObject "CompilerConfig" $ \v -> CompilerConfig 45 parseJSON = withObject "CompilerConfig" $ \v -> CompilerConfig
45 <$> v .:? "galleryName" .!= "Gallery" 46 <$> v .:? "galleryName" .!= "Gallery"
46 <*> v .:? "ignoreFiles" .!= ".^" 47 <*> v .:? "includeFiles" .!= ["*"]
48 <*> v .:? "excludeFiles" .!= []
47 <*> v .:? "tagsFromDirectories" .!= 0 49 <*> v .:? "tagsFromDirectories" .!= 0
48 <*> v .:? "thumbnailMaxResolution" .!= (Resolution 400 400) 50 <*> v .:? "thumbnailMaxResolution" .!= (Resolution 400 400)
49 <*> v .:? "pictureMaxResolution" 51 <*> v .:? "pictureMaxResolution"