diff options
Diffstat (limited to 'compiler/src/Config.hs')
-rw-r--r-- | compiler/src/Config.hs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/compiler/src/Config.hs b/compiler/src/Config.hs index 53333a5..d670aae 100644 --- a/compiler/src/Config.hs +++ b/compiler/src/Config.hs | |||
@@ -34,8 +34,10 @@ import Resource (Resolution(..)) | |||
34 | 34 | ||
35 | data CompilerConfig = CompilerConfig | 35 | data CompilerConfig = CompilerConfig |
36 | { galleryName :: String | 36 | { galleryName :: String |
37 | , includeFiles :: [String] | 37 | , includedDirectories :: [String] |
38 | , excludeFiles :: [String] | 38 | , excludedDirectories :: [String] |
39 | , includedFiles :: [String] | ||
40 | , excludedFiles :: [String] | ||
39 | , tagsFromDirectories :: Int | 41 | , tagsFromDirectories :: Int |
40 | , thumbnailMaxResolution :: Resolution | 42 | , thumbnailMaxResolution :: Resolution |
41 | , pictureMaxResolution :: Maybe Resolution | 43 | , pictureMaxResolution :: Maybe Resolution |
@@ -44,8 +46,10 @@ data CompilerConfig = CompilerConfig | |||
44 | instance FromJSON CompilerConfig where | 46 | instance FromJSON CompilerConfig where |
45 | parseJSON = withObject "CompilerConfig" $ \v -> CompilerConfig | 47 | parseJSON = withObject "CompilerConfig" $ \v -> CompilerConfig |
46 | <$> v .:? "galleryName" .!= "Gallery" | 48 | <$> v .:? "galleryName" .!= "Gallery" |
47 | <*> v .:? "includeFiles" .!= ["*"] | 49 | <*> v .:? "includedDirectories" .!= ["*"] |
48 | <*> v .:? "excludeFiles" .!= [] | 50 | <*> v .:? "excludedDirectories" .!= [] |
51 | <*> v .:? "includedFiles" .!= ["*"] | ||
52 | <*> v .:? "excludedFiles" .!= [] | ||
49 | <*> v .:? "tagsFromDirectories" .!= 0 | 53 | <*> v .:? "tagsFromDirectories" .!= 0 |
50 | <*> v .:? "thumbnailMaxResolution" .!= (Resolution 400 400) | 54 | <*> v .:? "thumbnailMaxResolution" .!= (Resolution 400 400) |
51 | <*> v .:? "pictureMaxResolution" | 55 | <*> v .:? "pictureMaxResolution" |