aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/Config.hs
diff options
context:
space:
mode:
authorpacien2020-02-26 22:13:00 +0100
committerNotkea2020-02-27 21:54:32 +0100
commitf09e9d9fa29284bd9ae872efe5ba1d526e349011 (patch)
tree50d523ffb4f2d6e4b1d09eb2edd9f099c9b20048 /compiler/src/Config.hs
parentc7fa5bd40d0e5c9ea50190a90a0ccfee8ad96c25 (diff)
downloadldgallery-f09e9d9fa29284bd9ae872efe5ba1d526e349011.tar.gz
compiler: add tag inclusion and exclusion globs
GitHub: closes #30
Diffstat (limited to 'compiler/src/Config.hs')
-rw-r--r--compiler/src/Config.hs4
1 files changed, 4 insertions, 0 deletions
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
55 , excludedDirectories :: [String] 55 , excludedDirectories :: [String]
56 , includedFiles :: [String] 56 , includedFiles :: [String]
57 , excludedFiles :: [String] 57 , excludedFiles :: [String]
58 , includedTags :: [String]
59 , excludedTags :: [String]
58 , tagsFromDirectories :: TagsFromDirectoriesConfig 60 , tagsFromDirectories :: TagsFromDirectoriesConfig
59 , thumbnailMaxResolution :: Resolution 61 , thumbnailMaxResolution :: Resolution
60 , pictureMaxResolution :: Maybe Resolution 62 , pictureMaxResolution :: Maybe Resolution
@@ -67,6 +69,8 @@ instance FromJSON GalleryConfig where
67 <*> v .:? "excludedDirectories" .!= [] 69 <*> v .:? "excludedDirectories" .!= []
68 <*> v .:? "includedFiles" .!= ["*"] 70 <*> v .:? "includedFiles" .!= ["*"]
69 <*> v .:? "excludedFiles" .!= [] 71 <*> v .:? "excludedFiles" .!= []
72 <*> v .:? "includedTags" .!= ["*"]
73 <*> v .:? "excludedTags" .!= []
70 <*> v .:? "tagsFromDirectories" .!= (TagsFromDirectoriesConfig 0 "") 74 <*> v .:? "tagsFromDirectories" .!= (TagsFromDirectoriesConfig 0 "")
71 <*> v .:? "thumbnailMaxResolution" .!= (Resolution 400 300) 75 <*> v .:? "thumbnailMaxResolution" .!= (Resolution 400 300)
72 <*> v .:? "pictureMaxResolution" 76 <*> v .:? "pictureMaxResolution"