aboutsummaryrefslogtreecommitdiff
path: root/build-app.lisp
diff options
context:
space:
mode:
Diffstat (limited to 'build-app.lisp')
-rw-r--r--build-app.lisp28
1 files changed, 22 insertions, 6 deletions
diff --git a/build-app.lisp b/build-app.lisp
index 5d4f069..c95d163 100644
--- a/build-app.lisp
+++ b/build-app.lisp
@@ -56,10 +56,18 @@ my1337pw.")
(flag :long-name "add"
:description "Intaractively add a oneliner and update the wiki.")
(flag :long-name "update"
- :description "Interactively edit a oneliner and update the wiki."))
+ :description "Interactively edit a oneliner and update the wiki.")
+ (flag :long-name "flag"
+ :description "Flag a oneliner for review.")
+ (flag :long-name "unflag"
+ :description "If you have admin priviliges, unflag a oneliner.")
+ (flag :long-name "lock"
+ :description "If you have admin priviliges, lock a oneliner from being edited.")
+ (flag :long-name "unlock"
+ :description "If you have admin priviliges, unlock a oneliner."))
(group (:header "Access" :hidden t)
(flag :long-name "login"
- :description "Attempt to login to your contributor account. ARGS are interpreted as USERNAME PASSWORD. Success will return ab API token, writing it automatically into your config file.")
+ :description "Attempt to login to your contributor account. ARGS are interpreted as USERNAME PASSWORD.")
(flag :long-name "revoke"
:description "Revoke your own access token."))
(group (:header "Invites" :hidden t)
@@ -117,10 +125,18 @@ than the users."
(arguments
;; when the first argument is a number, try run a oneliner
(a:when-let (hist-number (parse-integer (first arguments) :junk-allowed t))
- (if (getopt :long-name "flag")
- (format t "TBD: going to flag a command~%") ;(cli::flag-item hist-number)
- (format t "TBD: Going to run command ~a with arguments ~a~%"
- hist-number (rest arguments)))
+ (cond
+ ((getopt :long-name "flag")
+ (cli::flag-item hist-number))
+ ((getopt :long-name "unflag")
+ (cli::unflag-item hist-number))
+ ((getopt :long-name "lock")
+ (cli::lock-item hist-number))
+ ((getopt :long-name "unlock")
+ (cli::unlock-item hist-number))
+ (t
+ (format t "TBD: Going to run command ~a with arguments ~a~%"
+ hist-number (rest arguments))))
(uiop:quit))
;; otherwise search for oneliners
(cli::search-for-oneliners arguments