Separate help texts from help command
This commit is contained in:
parent
99e7d7e303
commit
a664f8f6e8
1 changed files with 13 additions and 4 deletions
17
clark.lisp
17
clark.lisp
|
@ -5,6 +5,15 @@
|
||||||
(defvar *db* nil
|
(defvar *db* nil
|
||||||
"The database connection.")
|
"The database connection.")
|
||||||
|
|
||||||
|
(defconstant *helps*
|
||||||
|
'(("add" "Add a bookmark to the database"
|
||||||
|
"add <url> <name> <description> [<tags> ...]")
|
||||||
|
("help" "Display this help and exit"
|
||||||
|
"help")
|
||||||
|
("version" "Output version information and exit"
|
||||||
|
"version"))
|
||||||
|
"Help texts for commands.")
|
||||||
|
|
||||||
(defconstant *version* "0.1.0"
|
(defconstant *version* "0.1.0"
|
||||||
"Clark's version.")
|
"Clark's version.")
|
||||||
|
|
||||||
|
@ -56,10 +65,10 @@ The result contains the url and the name of the bookmark."
|
||||||
" clark add <url> <name> <description> [<tags> ...]~%"
|
" clark add <url> <name> <description> [<tags> ...]~%"
|
||||||
"~%"
|
"~%"
|
||||||
"Possible commands:~%"
|
"Possible commands:~%"
|
||||||
"~%"
|
"~%"))
|
||||||
"add Add a bookmark to the database~%"
|
(map nil (lambda (hlp)
|
||||||
"help Display this help and exit~%"
|
(destructuring-bind (name short long) hlp
|
||||||
"version Output version information and exit~%")))
|
(format t " ~7A ~A~%" name short))) *helps*))
|
||||||
|
|
||||||
(defun insert-bookmark (url name description)
|
(defun insert-bookmark (url name description)
|
||||||
"Insert URL, NAME and DESCRIPTION into the bookmark table."
|
"Insert URL, NAME and DESCRIPTION into the bookmark table."
|
||||||
|
|
Loading…
Reference in a new issue