aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/Config.hs
diff options
context:
space:
mode:
authorpacien2019-12-31 08:38:15 +0100
committerpacien2019-12-31 08:38:15 +0100
commit6691b14cf4e867a9018f38c174fa98f1ada19f82 (patch)
treeff43476e81ee80c38ad4fb28822853849be03929 /compiler/src/Config.hs
parent641ea85d4da795cb2c67d9777cb3db3dfede1d8b (diff)
downloadldgallery-6691b14cf4e867a9018f38c174fa98f1ada19f82.tar.gz
compiler: add option to ignore files matching a regex
GitHub: closes #10
Diffstat (limited to 'compiler/src/Config.hs')
-rw-r--r--compiler/src/Config.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/src/Config.hs b/compiler/src/Config.hs
index d025afd..ca3259f 100644
--- a/compiler/src/Config.hs
+++ b/compiler/src/Config.hs
@@ -42,6 +42,7 @@ import Resource (Resolution(..))
42 42
43data CompilerConfig = CompilerConfig 43data CompilerConfig = CompilerConfig
44 { galleryName :: String 44 { galleryName :: String
45 , ignoreFiles :: String
45 , implicitDirectoryTag :: Bool 46 , implicitDirectoryTag :: Bool
46 , thumbnailResolution :: Resolution 47 , thumbnailResolution :: Resolution
47 , pictureMaxResolution :: Maybe Resolution 48 , pictureMaxResolution :: Maybe Resolution
@@ -50,6 +51,7 @@ data CompilerConfig = CompilerConfig
50instance FromJSON CompilerConfig where 51instance FromJSON CompilerConfig where
51 parseJSON = withObject "CompilerConfig" $ \v -> CompilerConfig 52 parseJSON = withObject "CompilerConfig" $ \v -> CompilerConfig
52 <$> v .:? "galleryName" .!= "Gallery" 53 <$> v .:? "galleryName" .!= "Gallery"
54 <*> v .:? "ignoreFiles" .!= ".^"
53 <*> v .:? "implicitDirectoryTag" .!= False 55 <*> v .:? "implicitDirectoryTag" .!= False
54 <*> v .:? "thumbnailResolution" .!= (Resolution 400 400) 56 <*> v .:? "thumbnailResolution" .!= (Resolution 400 400)
55 <*> v .:? "pictureMaxResolution" 57 <*> v .:? "pictureMaxResolution"