From 121b1328324b5eb77a19c1d2f6080482bd4e07fa Mon Sep 17 00:00:00 2001 From: Ekaitz Zarraga Date: Tue, 19 Aug 2025 22:38:50 +0200 Subject: html: WIP: Add html output command --- cook/cli.scm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'cook/cli.scm') 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)) -- cgit v1.2.3