diff options
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)) |