diff options
author | Ekaitz Zarraga <ekaitz@elenq.tech> | 2023-10-01 22:55:15 +0200 |
---|---|---|
committer | Ekaitz Zarraga <ekaitz@elenq.tech> | 2023-10-02 21:48:41 +0200 |
commit | 809afa9b76fcf9920dacd9bd54655d1517594f1c (patch) | |
tree | f0f5f7b1ca67bb31b7f594057997fde49676452e /neocities | |
parent | 0c9bdf55858ceec7d0752c405e1980ed680252eb (diff) |
cli: simple tabular output for info command
Diffstat (limited to 'neocities')
-rw-r--r-- | neocities/cli.scm | 6 |
1 files changed, 5 insertions, 1 deletions
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) |