From 80bf9816c6e35bf7ffcc1e4349d5abf056c4df7f Mon Sep 17 00:00:00 2001 From: Colin Okay Date: Sun, 13 Mar 2022 11:22:21 -0500 Subject: updating helptexts; drafts-file function --- app/app.lisp | 23 +++++------------------ lib/state.lisp | 4 ++++ 2 files changed, 9 insertions(+), 18 deletions(-) diff --git a/app/app.lisp b/app/app.lisp index d2dd902..ea11a5e 100644 --- a/app/app.lisp +++ b/app/app.lisp @@ -19,22 +19,9 @@ (in-package :oneliners.cli.app) ;;; VERSION -(defparameter +ol-version+ "0.6.0") +(defparameter +ol-version+ "0.7.0") ;;; HELP TEXTS -(defparameter +invite-help-text+ - " -New contributor accounts are added to the your oneliners server by -redeeming invite tokens. - -When the --redeem option is passed, the ARGS section is expected to be -three items long, and is interpreted as TOKEN USERNAME PASSWORD. E.g.: - - ol --redeem PHONEYTOKEN c00lhacker my1337pw - -Would attempt to make a new user named c00lhacker with password -my1337pw.") - (defparameter +oneliners-variables-help-text+ " Oneliners may contain variables. There are positional variables and @@ -48,7 +35,7 @@ number, which must 1 or greater. For example: The #1 and #2 are a positional variables. You might call the above like - ol --run 8 Doofus Tuesday + ol run 8 Doofus Tuesday Assuming that the above oneliner has ID 8, then \"Hello Doofus, Happy Tuesday\" would print to the console. @@ -61,7 +48,7 @@ letters, numbers, or the symbol _. For example: The #name and #thing are named variables. You might call the above like so: - ol --run 3 name=Goober thing='sock in the nose' + ol run 3 name=Goober thing='sock in the nose' Which should print \"Hello Goober you get a sock in the nose\". @@ -91,7 +78,7 @@ export EDITOR=/usr/bin/zile (text :contents "Search for oneliners that have been tagged with all of TERMS.") (text :contents "E.g. `ol search grep awk`") (text :contents " ") - (text :contents "Options include:") + (text :contents "Options:") (lispobj :long-name "limit" :argument-type :optional :argument-name "NUMBER" @@ -111,7 +98,7 @@ export EDITOR=/usr/bin/zile (text :contents "IDENTIFIER should either be the name or the unique numeric ID of a oneliner.") (text :contents "E.g. `ol run demo foo bar` # run \"demo\" with args \"foo\" and \"bar\"") (text :contents " ") - (text :contents "Options include:") + (text :contents "Options:") (lispobj :long-name "timeout" :argument-type :optional :argument-name "SECONDS" diff --git a/lib/state.lisp b/lib/state.lisp index 0f69ff3..a156d59 100644 --- a/lib/state.lisp +++ b/lib/state.lisp @@ -63,6 +63,10 @@ "Returns the pathname holding the location of the cache." (merge-pathnames ".cache/oneliners.cache" (user-homedir-pathname))) +(defun drafts-file () + "Returns the pathame holding the location of the oneliner drafts file." + (merge-pathnames ".cache/oneliners.drafts" (user-homedir-pathname))) + (defun wipe-cache () "Deletes the cache, if present." (uiop:delete-file-if-exists (cached-oneliners-file))) -- cgit v1.2.3