diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-11-01 23:35:51 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-11-01 23:35:51 +0100 |
commit | f18a8f6e637610d0c89a5c1ab1d960c0071a1d50 (patch) | |
tree | 6e0d58fd1ad200e9003e7a231397908499cfd7a0 | |
parent | Add makefile. (diff) | |
download | vimwiki-scripts-f18a8f6e637610d0c89a5c1ab1d960c0071a1d50.tar.gz vimwiki-scripts-f18a8f6e637610d0c89a5c1ab1d960c0071a1d50.tar.xz |
Minor cleanup.
-rw-r--r-- | hs/src/Config.hs | 5 | ||||
-rw-r--r-- | hs/src/Html.hs | 8 |
2 files changed, 7 insertions, 6 deletions
diff --git a/hs/src/Config.hs b/hs/src/Config.hs index f3c0d5b..e0b846c 100644 --- a/hs/src/Config.hs +++ b/hs/src/Config.hs @@ -84,7 +84,7 @@ confParser ini = Configuration { _output = OutputConfig { _mu4eURL = d "Output" "mu4eURL" , _xapianOmega = d "Output" "xapianOmega" - , _webPath = fromMaybe "" $ d "Output" "webpath" + , _webPath = fromMaybe "" $ d "Output" "webPath" , _manProvider = d "Output" "manProvider" } , _data' = if "Data" `elem` sections ini @@ -96,7 +96,8 @@ confParser ini = else (_data' defaultConf) , _wikis = case keys "Wikis" ini of Left _ -> mempty - -- This is safe + -- This includes a fromRight, but is saze since + -- we already checked that the key existed Right keys -> parseURIs $ zip keys $ f "Wikis" <$> keys } diff --git a/hs/src/Html.hs b/hs/src/Html.hs index a45f4b1..eda9384 100644 --- a/hs/src/Html.hs +++ b/hs/src/Html.hs @@ -329,15 +329,15 @@ main = do -- mapM_ print otherFiles -- TODO ignore hidden files - copyFiles (conf ^. (data' . outputDir)) otherFiles + copyFiles (conf ^. data' . outputDir) otherFiles createDirectoryIfMissing True $ conf ^. data' . outputDir userdd <- getUserDataDir "vimwiki" systemdds <- getSystemDataDirs "vimwiki" - let dataDirs = [ "." - , userdd - ] ++ systemdds + let dataDirs = "." + : userdd + : systemdds let od = conf ^. (data' . outputDir) copyFromDatadir "style.css" dataDirs $ od </> "style.css" copyFromDatadir "script.js" dataDirs $ od </> "script.js" |