From 809afa9b76fcf9920dacd9bd54655d1517594f1c Mon Sep 17 00:00:00 2001 From: Ekaitz Zarraga Date: Sun, 1 Oct 2023 22:55:15 +0200 Subject: cli: simple tabular output for info command --- neocities/cli.scm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/neocities/cli.scm b/neocities/cli.scm index adfdfa5..066ecfd 100644 --- a/neocities/cli.scm +++ b/neocities/cli.scm @@ -49,7 +49,11 @@ (exit 1)) (let-values (((response body) (neocities-info %api))) (if (neocities-success? body) - (display (assoc-ref body "info")) ;; TODO Display in table + (format #t "~:{~a: ~a~&~}" + (map (lambda (el) (list (car el) (cdr el))) + (let ((info (assoc-ref body "info"))) + (assoc-set! info "tags" + (string-join (vector->list (assoc-ref info "tags")) ", "))))) (format (current-error-port) "~A~&" (assoc-ref body "message"))))) (define (neocities-cmd-delete args) -- cgit v1.2.3