summaryrefslogtreecommitdiff
path: root/neocities
diff options
context:
space:
mode:
authorEkaitz Zarraga <ekaitz@elenq.tech>2023-10-01 22:55:15 +0200
committerEkaitz Zarraga <ekaitz@elenq.tech>2023-10-02 21:48:41 +0200
commit809afa9b76fcf9920dacd9bd54655d1517594f1c (patch)
treef0f5f7b1ca67bb31b7f594057997fde49676452e /neocities
parent0c9bdf55858ceec7d0752c405e1980ed680252eb (diff)
cli: simple tabular output for info command
Diffstat (limited to 'neocities')
-rw-r--r--neocities/cli.scm6
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)