From 5367781f0c7fd1ce274492ba91895fef9d44dab3 Mon Sep 17 00:00:00 2001 From: pacien Date: Sun, 5 Jan 2020 10:43:48 +0100 Subject: add manual --- compiler/app/Main.hs | 10 +++++----- compiler/readme.md | 10 ++++++++-- 2 files changed, 13 insertions(+), 7 deletions(-) (limited to 'compiler') diff --git a/compiler/app/Main.hs b/compiler/app/Main.hs index 24d8aad..319e984 100644 --- a/compiler/app/Main.hs +++ b/compiler/app/Main.hs @@ -41,29 +41,29 @@ data Options = Options options = Options { inputDir = "./" &= typDir - &= explicit &= name "i" &= name "input-dir" + &= explicit &= help "Gallery source directory (default=./)" , outputDir = "./out" &= typDir - &= explicit &= name "o" &= name "output-dir" + &= explicit &= help "Generated gallery output path (default=./out)" , rebuilAll = False - &= explicit &= name "r" &= name "rebuild-all" + &= explicit &= help "Invalidate cache and recompile everything" , withViewer = False - &= explicit &= name "w" &= name "with-viewer" + &= explicit &= help "Include the static web viewer in the output" } - &= summary ("ldgallery v" ++ (showVersion version) ++ " - a static gallery generator with tags") + &= summary ("ldgallery v" ++ (showVersion version) ++ " - a static web gallery generator with tags") &= program "ldgallery" &= help "Compile a gallery" &= helpArg [explicit, name "h", name "help"] diff --git a/compiler/readme.md b/compiler/readme.md index 5ffe924..e18b026 100644 --- a/compiler/readme.md +++ b/compiler/readme.md @@ -1,8 +1,9 @@ # ldgallery-compiler + ## Build -Building this project requires the [stack] tool. +Building the _ldgallery compiler_ requires the [stack] tool. [stack]: https://haskellstack.org/ @@ -10,5 +11,10 @@ Within the project's directory, use * `stack setup` to setup the development environment and compiler. * `stack build` to compile the project. -* or `stack build --fast --file-watch --pedantic` to automatically compile on file change. +* or `stack build --fast --file-watch` to automatically compile on file change. * `stack exec ldgallery-compiler-exe -- --help` to run the compiled program (and displaying its help text for instance). + + +### Embedded viewer + +In order to allow the `ldgallery` command line tool to generate a full gallery which includes the _viewer_, a compiled version of the web app must be placed under `./data/viewer`. The `--with-viewer` flag will otherwise not be functional. -- cgit v1.2.3