From 6691b14cf4e867a9018f38c174fa98f1ada19f82 Mon Sep 17 00:00:00 2001 From: pacien Date: Tue, 31 Dec 2019 08:38:15 +0100 Subject: compiler: add option to ignore files matching a regex GitHub: closes #10 --- compiler/src/Config.hs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'compiler/src/Config.hs') 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(..)) data CompilerConfig = CompilerConfig { galleryName :: String + , ignoreFiles :: String , implicitDirectoryTag :: Bool , thumbnailResolution :: Resolution , pictureMaxResolution :: Maybe Resolution @@ -50,6 +51,7 @@ data CompilerConfig = CompilerConfig instance FromJSON CompilerConfig where parseJSON = withObject "CompilerConfig" $ \v -> CompilerConfig <$> v .:? "galleryName" .!= "Gallery" + <*> v .:? "ignoreFiles" .!= ".^" <*> v .:? "implicitDirectoryTag" .!= False <*> v .:? "thumbnailResolution" .!= (Resolution 400 400) <*> v .:? "pictureMaxResolution" -- cgit v1.2.3