From f09e9d9fa29284bd9ae872efe5ba1d526e349011 Mon Sep 17 00:00:00 2001 From: pacien Date: Wed, 26 Feb 2020 22:13:00 +0100 Subject: compiler: add tag inclusion and exclusion globs GitHub: closes #30 --- compiler/src/Config.hs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'compiler/src/Config.hs') diff --git a/compiler/src/Config.hs b/compiler/src/Config.hs index 1bdb2b8..8796c3c 100644 --- a/compiler/src/Config.hs +++ b/compiler/src/Config.hs @@ -55,6 +55,8 @@ data GalleryConfig = GalleryConfig , excludedDirectories :: [String] , includedFiles :: [String] , excludedFiles :: [String] + , includedTags :: [String] + , excludedTags :: [String] , tagsFromDirectories :: TagsFromDirectoriesConfig , thumbnailMaxResolution :: Resolution , pictureMaxResolution :: Maybe Resolution @@ -67,6 +69,8 @@ instance FromJSON GalleryConfig where <*> v .:? "excludedDirectories" .!= [] <*> v .:? "includedFiles" .!= ["*"] <*> v .:? "excludedFiles" .!= [] + <*> v .:? "includedTags" .!= ["*"] + <*> v .:? "excludedTags" .!= [] <*> v .:? "tagsFromDirectories" .!= (TagsFromDirectoriesConfig 0 "") <*> v .:? "thumbnailMaxResolution" .!= (Resolution 400 300) <*> v .:? "pictureMaxResolution" -- cgit v1.2.3