aboutsummaryrefslogtreecommitdiff
path: root/compiler/app
diff options
context:
space:
mode:
authorpacien2020-02-25 20:19:54 +0100
committerNotkea2020-02-27 14:35:01 +0100
commit74e4a83ac7511086f45d2fa9880b7ae5728020bd (patch)
treef4d07bea56ea09de0f7aadee84cd426907714056 /compiler/app
parentdd1e092af09cc3d780ed546aadf9fc9baa799371 (diff)
downloadldgallery-74e4a83ac7511086f45d2fa9880b7ae5728020bd.tar.gz
compiler: add cli arg for output gallery index
GitHub: closes #143
Diffstat (limited to 'compiler/app')
-rw-r--r--compiler/app/Main.hs8
1 files changed, 8 insertions, 0 deletions
diff --git a/compiler/app/Main.hs b/compiler/app/Main.hs
index 404de4b..a4b6ae2 100644
--- a/compiler/app/Main.hs
+++ b/compiler/app/Main.hs
@@ -39,6 +39,7 @@ data ViewerConfig = ViewerConfig
39data Options = Options 39data Options = Options
40 { inputDir :: FilePath 40 { inputDir :: FilePath
41 , outputDir :: FilePath 41 , outputDir :: FilePath
42 , outputIndex :: FilePath
42 , galleryConfig :: FilePath 43 , galleryConfig :: FilePath
43 , rebuilAll :: Bool 44 , rebuilAll :: Bool
44 , cleanOutput :: Bool 45 , cleanOutput :: Bool
@@ -59,6 +60,12 @@ options = Options
59 &= name "output-dir" 60 &= name "output-dir"
60 &= explicit 61 &= explicit
61 &= help "Generated gallery output path (default=./out)" 62 &= help "Generated gallery output path (default=./out)"
63 , outputIndex = ""
64 &= typFile
65 &= name "x"
66 &= name "output-index"
67 &= explicit
68 &= help "Generated gallery index output path (default=$output-dir/index.json)"
62 , galleryConfig = "" 69 , galleryConfig = ""
63 &= typFile 70 &= typFile
64 &= name "g" 71 &= name "g"
@@ -110,6 +117,7 @@ main =
110 (galleryConfig opts) 117 (galleryConfig opts)
111 (inputDir opts) 118 (inputDir opts)
112 (galleryOutputDir opts) 119 (galleryOutputDir opts)
120 (outputIndex opts)
113 [outputDir opts] 121 [outputDir opts]
114 (rebuilAll opts) 122 (rebuilAll opts)
115 (cleanOutput opts) 123 (cleanOutput opts)