aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorColin Okay <okay@toyful.space>2022-02-21 16:24:06 -0600
committerColin Okay <okay@toyful.space>2022-02-21 16:24:06 -0600
commit81d8b86cad053a3bb1f4563cc4fa3b90e0302e15 (patch)
tree10e19de9fb5b17db086f153c3f66e0bd6fafe1fe /src
parent2dd1e60e52cb7871467b1aade5c74c6bdd21b3aa (diff)
providing runstyle to --add
Diffstat (limited to 'src')
-rw-r--r--src/lib.lisp15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/lib.lisp b/src/lib.lisp
index 750dfea..c6801df 100644
--- a/src/lib.lisp
+++ b/src/lib.lisp
@@ -154,14 +154,19 @@ the directories that appear in the value of that variable."
(ppcre:split " +" (prompt "(e.g. foo bar goo): ")))))
(explanation
(when (y-or-n-p "Provide an explanation?")
- (string-from-editor))))
+ (string-from-editor)))
+ (runstyle
+ (if (y-or-n-p "Is GUI, TUI, or requires further input?")
+ "MANUAL"
+ "AUTO")))
(api:request-with
(:host (host)
:body (jonathan:to-json
(list :oneliner oneliner
:tags tags
:brief brief
- :explanation explanation))
+ :explanation explanation
+ :runstyle runstyle))
:content-type "application/json")
(api:post--oneliner :token (api-token))
(format t "Added~%"))))
@@ -208,14 +213,16 @@ the directories that appear in the value of that variable."
(print results output)))
(defun print-oneliner-result-for-user (number oneliner)
- (format t "~3a~a~a: ~a"
+ (format t "~3a~a~a~a: ~a"
number
(if (getf oneliner :isflagged)
"⚠" " ")
(if (getf oneliner :islocked)
"🔒" " ")
+ (if (equalp "manual" (getf oneliner :runstyle))
+ "📋" " ")
(getf oneliner :brief))
- (format t "~% ~a~%~%" (getf oneliner :oneliner)))
+ (format t "~% ~a~%~%" (getf oneliner :oneliner)))
(defun search-for-oneliners (terms limit not-flagged-p)