Streamline command-line options.

This commit is contained in:
Dominik Pantůček 2023-04-01 18:48:39 +02:00
parent 8d514783a0
commit 6ac3281a5c

View file

@ -75,27 +75,30 @@ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
(print license-text) (print license-text)
(exit 0)) (exit 0))
"" ""
"Test" "Configuration options:"
""
(-members (dir) "Members base directory" (*members-directory* dir)) (-members (dir) "Members base directory" (*members-directory* dir))
(-context (n) "Member-File parser Error Context (lines)" (*member-file-context* (string->number n))) (-context (n) "Member-File parser Error Context (lines)" (*member-file-context* (string->number n)))
(-month (YYYY-MM) "Specify current month"
(*current-month* (string->month YYYY-MM)))
(-tstyle (style) "Use given table style: debug, ascii, unicode"
(*table-border-style* (string->symbol style)))
""
"Query options:"
(-mi (id) "Specify member by id" (-member-id- (string->number id))) (-mi (id) "Specify member by id" (-member-id- (string->number id)))
(-mn (nick) "Specify member by nick" (-member-nick- nick)) (-mn (nick) "Specify member by nick" (-member-nick- nick))
""
"Actions:"
(-info () "Print information" (-info () "Print information"
(-needs-bank- #t) (-needs-bank- #t)
(-action- 'print-info)) (-action- 'print-info))
(-stats (file:gnuplot-data) "Get stats for all months" (-stats (file:gnuplot-data) "Get stats for all months"
(-action- 'print-stats) (-action- 'print-stats)
(-fname- file:gnuplot-data)) (-fname- file:gnuplot-data))
(-month (YYYY-MM) "Specify current month"
(*current-month* (string->month YYYY-MM)))
(-print () "Print given member file" (-print () "Print given member file"
(-action- 'print-member-file)) (-action- 'print-member-file))
(-tests () "Run self-tests upon startup" (-run-tests?- #t)) (-tests () "Run self-tests upon startup" (-run-tests?- #t))
(-idstats () "Returns information about available member ids" (-action- 'print-idstats)) (-idstats () "Returns information about available member ids" (-action- 'print-idstats))
(-genid () "Generates random member id" (-action- 'genid)) (-genid () "Generates random member id" (-action- 'genid))
(-tstyle (style) "Use given table style: debug, ascii, unicode"
(*table-border-style* (string->symbol style)))
(-gencards (file:cards file:desfires) "Generates brmdoor-compatible card files" (-gencards (file:cards file:desfires) "Generates brmdoor-compatible card files"
(-action- 'gencards) (-action- 'gencards)
(-fname- (list file:cards file:desfires))) (-fname- (list file:cards file:desfires)))
@ -103,13 +106,13 @@ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
(-fees () "Prints fees table" (-fees () "Prints fees table"
(-needs-bank- #t) (-needs-bank- #t)
(-action- 'fees)) (-action- 'fees))
(-repl () "Start repl with everything loaded"
(-needs-bank- #t)
(-action- 'repl))
(-genweb (dir) "Generate static web files" (-genweb (dir) "Generate static web files"
(-needs-bank- #t) (-needs-bank- #t)
(-web-dir- dir) (-web-dir- dir)
(-action- 'genweb)) (-action- 'genweb))
(-repl () "Start REPL with everything loaded"
(-needs-bank- #t)
(-action- 'repl))
) )
;; Run tests ;; Run tests