diff options
author | Ekaitz Zarraga <ekaitz@elenq.tech> | 2025-08-19 22:38:50 +0200 |
---|---|---|
committer | Ekaitz Zarraga <ekaitz@elenq.tech> | 2025-08-19 22:40:48 +0200 |
commit | 121b1328324b5eb77a19c1d2f6080482bd4e07fa (patch) | |
tree | d7eb0991f3eaa35dbcc4eda46006c379ced5b787 /cook/cli.scm | |
parent | 252a4f525210d1b5a0dca71c337695a117c06156 (diff) |
html: WIP: Add html output command
Diffstat (limited to 'cook/cli.scm')
-rw-r--r-- | cook/cli.scm | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/cook/cli.scm b/cook/cli.scm index 1b5db87..f912a89 100644 --- a/cook/cli.scm +++ b/cook/cli.scm @@ -1,5 +1,6 @@ (import (cook parse-internals) (cook debug) + (cook html) (chibi) (chibi app) (chibi config) @@ -15,6 +16,11 @@ (let ((recipe (parse-cook (file->string recipe-file)))) (display (cook->list recipe)))) +(define (html-cook cfg spec recipe-file) + (let ((recipe (parse-cook (file->string recipe-file)))) + (display (recipe->html recipe)) + (newline))) + (run-application `(cook "Cooklang recipe tool" @@ -22,6 +28,7 @@ (help boolean (#\h ) "show this help")) (or (help "Show this help" () (,app-help-command)) - (read "Read recipe in the terminal" () (,read-cook recipe))) + (read "Read recipe in the terminal" () (,read-cook recipe)) + (html "Display recipe in HTML format" () (,html-cook recipe))) (,cook files ...)) (command-line)) |