diff options
author | Arun Isaac | 2022-06-25 14:30:55 +0530 |
---|---|---|
committer | Arun Isaac | 2022-06-25 14:34:31 +0530 |
commit | 6fa422bf6b5307d488c3428ecf24da237b339295 (patch) | |
tree | 5b0573492dd0e94136d29ce497658114bf7e09dd /bin | |
parent | 8b735e1a5b1023c465dd1ed3d0fff86b15529023 (diff) | |
download | tissue-6fa422bf6b5307d488c3428ecf24da237b339295.tar.gz tissue-6fa422bf6b5307d488c3428ecf24da237b339295.tar.lz tissue-6fa422bf6b5307d488c3428ecf24da237b339295.zip |
bin: Do not print issue number.
* bin/tissue (print-issue, print-issue-to-gemtext): Do not accept
issue number argument.
(tissue-list): Do not pass issue number argument to print-issue and
print-issue-to-gemtext.
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/tissue | 30 |
1 files changed, 13 insertions, 17 deletions
@@ -81,8 +81,8 @@ to run tissue." (match (command-line) ((program _ ...) program))) -(define (print-issue issue-number issue) - "Print ISSUE with number ISSUE-NUMBER." +(define (print-issue issue) + "Print ISSUE." (let ((number-of-posts (length (issue-posts issue)))) (display (colorize-string (issue-title issue) 'MAGENTA 'UNDERLINE)) ;; Highlight keywords containing "bug" or "critical" as whole @@ -115,8 +115,7 @@ to run tissue." " posts]"))) (newline) (display (string-append - (colorize-string (string-append "#" (number->string issue-number)) 'CYAN) - " opened " + "opened " (colorize-string (human-date-string (issue-created-date issue)) 'CYAN) " by " (colorize-string (issue-creator issue) 'CYAN))) @@ -136,8 +135,8 @@ to run tissue." " tasks done"))) (newline))) -(define (print-issue-to-gemtext issue-number issue) - "Print ISSUE with number ISSUE-NUMBER to gemtext." +(define (print-issue-to-gemtext issue) + "Print ISSUE to gemtext." (let ((number-of-posts (length (issue-posts issue)))) (format #t "# ~a" (issue-title issue)) (unless (null? (issue-keywords issue)) @@ -151,8 +150,7 @@ to run tissue." (when (> number-of-posts 1) (format #t " [~a posts]" number-of-posts)) (newline) - (format #t "~a opened ~a by ~a" - issue-number + (format #t "opened ~a by ~a" (human-date-string (issue-created-date issue)) (issue-creator issue)) (when (> number-of-posts 1) @@ -194,19 +192,17 @@ List issues. invalid-operand '((format . text))))) (format #t "~%total ~a~%" - (list-transduce (compose (tenumerate 1) - (tfilter (match-lambda - ((_ . issue) - (and (issue-open? issue) - (or (not (assq 'assigned args)) - (member (assq-ref args 'assigned) - (issue-assigned issue))))))) + (list-transduce (compose (tfilter (lambda (issue) + (and (issue-open? issue) + (or (not (assq 'assigned args)) + (member (assq-ref args 'assigned) + (issue-assigned issue)))))) (tlog (match-lambda* - ((_ (index . issue)) + ((_ issue) ((case (assq-ref args 'format) ((text) print-issue) ((gemtext) print-issue-to-gemtext)) - index issue))))) + issue))))) rcount (issues))))))) |