diff options
author | pacien | 2020-06-13 10:58:00 +0200 |
---|---|---|
committer | pacien | 2020-06-16 18:23:25 +0200 |
commit | 8905383e2d17e2adb4097e1ce2e7f90ab9ceb5f5 (patch) | |
tree | 70be5303eb820e5a010be5b9e9a0e69e7313636f /compiler/src/Compiler.hs | |
parent | ce2210e6deff1d981186b6d7ddb1176f27e41f49 (diff) | |
download | ldgallery-8905383e2d17e2adb4097e1ce2e7f90ab9ceb5f5.tar.gz |
compiler: split ItemProcessors, FileProcessors and Caching
Diffstat (limited to 'compiler/src/Compiler.hs')
-rw-r--r-- | compiler/src/Compiler.hs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/compiler/src/Compiler.hs b/compiler/src/Compiler.hs index 5a7632d..92e6ed6 100644 --- a/compiler/src/Compiler.hs +++ b/compiler/src/Compiler.hs | |||
@@ -43,9 +43,8 @@ import Files | |||
43 | , nodeName | 43 | , nodeName |
44 | , filterDir | 44 | , filterDir |
45 | , ensureParentDir ) | 45 | , ensureParentDir ) |
46 | import Processors | 46 | import ItemProcessors (itemFileProcessor, thumbnailFileProcessor) |
47 | ( itemFileProcessor, thumbnailFileProcessor | 47 | import Caching (skipCache, withCache) |
48 | , skipCached, withCached ) | ||
49 | 48 | ||
50 | 49 | ||
51 | defaultGalleryConf :: String | 50 | defaultGalleryConf :: String |
@@ -127,7 +126,7 @@ compileGallery configPath inputDirPath outputDirPath outputIndexPath excludedDir | |||
127 | inputTree <- readInputTree sourceTree | 126 | inputTree <- readInputTree sourceTree |
128 | let curatedInputTree = filterInputTree (inputTreeFilter config) inputTree | 127 | let curatedInputTree = filterInputTree (inputTreeFilter config) inputTree |
129 | 128 | ||
130 | let cache = if rebuildAll then skipCached else withCached | 129 | let cache = if rebuildAll then skipCache else withCache |
131 | let itemProc = itemProcessor config cache | 130 | let itemProc = itemProcessor config cache |
132 | let thumbnailProc = thumbnailProcessor config cache | 131 | let thumbnailProc = thumbnailProcessor config cache |
133 | let galleryBuilder = buildGalleryTree itemProc thumbnailProc (tagsFromDirectories config) | 132 | let galleryBuilder = buildGalleryTree itemProc thumbnailProc (tagsFromDirectories config) |