aboutsummaryrefslogtreecommitdiff
path: root/compiler/src
diff options
context:
space:
mode:
authorzeroinformatique2022-11-11 00:29:42 +0100
committerGitHub2022-11-11 00:29:42 +0100
commitddadf9798b7f874aa0a829d55987ec0d105efa6d (patch)
treef208efeec53d97dd53cbd61f6fe4dfe824d8754c /compiler/src
parentbb3b0eae37a7214a3a4a6a1e4354e6f082adf15e (diff)
parent7ae7e904303dd623398495c2d61d1acadfe96fb1 (diff)
downloadldgallery-ddadf9798b7f874aa0a829d55987ec0d105efa6d.tar.gz
Merge pull request #346 from ldgallery/p_compiler_logging
compiler: fix support for non-utf8 terminals, add more steps prints
Diffstat (limited to 'compiler/src')
-rw-r--r--compiler/src/Compiler.hs6
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/src/Compiler.hs b/compiler/src/Compiler.hs
index 4111f02..d92d8e9 100644
--- a/compiler/src/Compiler.hs
+++ b/compiler/src/Compiler.hs
@@ -85,7 +85,8 @@ loadGalleryIndex path =
85 doesFileExist path >>= bool (return Nothing) decodeIndex 85 doesFileExist path >>= bool (return Nothing) decodeIndex
86 where 86 where
87 decodeIndex = 87 decodeIndex =
88 JSON.eitherDecodeFileStrict path 88 putStrLn ("Loading previous index:\t" ++ path)
89 >> JSON.eitherDecodeFileStrict path
89 >>= either (\err -> warn err >> return Nothing) (return . Just) 90 >>= either (\err -> warn err >> return Nothing) (return . Just)
90 warn = putStrLn . ("Warning:\tUnable to reuse existing index as cache: " ++) 91 warn = putStrLn . ("Warning:\tUnable to reuse existing index as cache: " ++)
91 92
@@ -136,10 +137,13 @@ compileGallery configPath inputDirPath outputDirPath outputIndexPath excludedDir
136 do 137 do
137 config <- readConfig $ inputGalleryConf configPath 138 config <- readConfig $ inputGalleryConf configPath
138 139
140 putStrLn "Inventorying input files"
139 inputDir <- readDirectory inputDirPath 141 inputDir <- readDirectory inputDirPath
140 excludedCanonicalDirs <- mapM canonicalizePath excludedDirs 142 excludedCanonicalDirs <- mapM canonicalizePath excludedDirs
143
141 let sourceFilter = galleryDirFilter config excludedCanonicalDirs 144 let sourceFilter = galleryDirFilter config excludedCanonicalDirs
142 let sourceTree = filterDir sourceFilter inputDir 145 let sourceTree = filterDir sourceFilter inputDir
146 putStrLn "Reading input metadata"
143 inputTree <- readInputTree sourceTree 147 inputTree <- readInputTree sourceTree
144 let curatedInputTree = filterInputTree (inputTreeFilter config) inputTree 148 let curatedInputTree = filterInputTree (inputTreeFilter config) inputTree
145 149