From 81d8b86cad053a3bb1f4563cc4fa3b90e0302e15 Mon Sep 17 00:00:00 2001 From: Colin Okay Date: Mon, 21 Feb 2022 16:24:06 -0600 Subject: providing runstyle to --add --- src/lib.lisp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'src/lib.lisp') 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) -- cgit v1.2.3