summaryrefslogtreecommitdiff
path: root/2025/ocaml/lib/presentation
diff options
context:
space:
mode:
authorDJ O'Leary <dijitol@proton.me>2025-11-29 20:08:11 +0100
committerDJ O'Leary <dijitol@proton.me>2025-11-29 20:09:11 +0100
commit87277098e997661f432be56c27f4b54d51aa9306 (patch)
tree83846830e5102120ef298e8ad9a552b30203fdc6 /2025/ocaml/lib/presentation
parent0bf49c4ec799445350c60a96a754e44ac15a2268 (diff)
chore: use updated template
Diffstat (limited to '2025/ocaml/lib/presentation')
-rw-r--r--2025/ocaml/lib/presentation/cli.ml15
-rw-r--r--2025/ocaml/lib/presentation/dune15
2 files changed, 30 insertions, 0 deletions
diff --git a/2025/ocaml/lib/presentation/cli.ml b/2025/ocaml/lib/presentation/cli.ml
new file mode 100644
index 0000000..c306ad2
--- /dev/null
+++ b/2025/ocaml/lib/presentation/cli.ml
@@ -0,0 +1,15 @@
+open Cmdliner
+open Cmdliner.Term.Syntax
+
+let logger () =
+ let env = Cmd.Env.info "LOG_LEVEL" in
+ let+ level = Infrastructure.Logger.CLI_Logger.parse_level ~env
+ and+ style_renderer = Fmt_cli.style_renderer () in
+ Infrastructure.Logger.CLI_Logger.configure_logger ~level ;
+ Fmt_tty.setup_std_outputs ?style_renderer () ;
+ let result_code = 0 in
+ result_code
+
+let cmd = Cmd.v (Cmd.info "tool") @@ logger ()
+
+let run () = Cmd.eval' cmd
diff --git a/2025/ocaml/lib/presentation/dune b/2025/ocaml/lib/presentation/dune
new file mode 100644
index 0000000..a37ca0c
--- /dev/null
+++ b/2025/ocaml/lib/presentation/dune
@@ -0,0 +1,15 @@
+(library
+ (name presentation)
+ (libraries
+ application
+ domain
+ infrastructure
+ cmdliner
+ fmt.cli)
+ (inline_tests)
+ (preprocess
+ (pps
+ ppx_deriving.show
+ ppx_deriving.eq
+ ppx_deriving.ord
+ ppx_expect)))