(html (head (title "sph-lib (sph cli)") (link (@ (rel "stylesheet") (type "text/css") (href "/css/sph.css"))) (meta (@ (name "viewport") (content "width=device-width,initial-scale=1"))) #f) (body () (div (@ (class top)) (nav (a (@ (href "/")) "start") ", " (a (@ (href "/feed.xml")) "feed")) "") (div (@ (class "middle")) (div (@ (class mtime) (title "last modification time of the current page")) "2023-04-05") (section (h1 "(sph cli)") (div (p "create command-line interfaces") (p "part of " (a (@ (href "../../sph-lib.html")) "sph-lib")) (#f (section (@ (class "library-name")) (h1 "module name") (p "(sph cli)")) (section (@ (class "library-exports")) (h1 "exported bindings") (div (div (@ (class "doc-bindings")) (div (@ (id "doc-b-" "cli-command-match") (class "doc-b")) (div (span (@ (class "type")) "procedure") ": " (span (@ (class "name")) "cli-command-match") " " (span (@ (class "first-sig")) "arguments commands-spec ->")) (div (@ (class "rest-sig")) (div "list list -> false/any")) "") (div (@ (id "doc-b-" "cli-create") (class "doc-b")) (div (span (@ (class "type")) "procedure") ": " (span (@ (class "name")) "cli-create") " " (span (@ (class "first-sig")) "config ... ->")) "" (div (@ (class "description")) (("::" (br) "#:version string/(integer ...)" (br) "#:about string/procedure:{-> string}" (br) "#:description string" (br) "#:usage string" (br) "#:usage-arguments string" (br) "#:arguments (string ...)" (br) "#:null-arguments (string ....)" (br) "#:missing-arguments-handler procedure:{symbol any ...}" (br) "#:unsupported-option-handler procedure:{symbol srfi-37-option option-name ...}" (br) "#:command-handler procedure:{list:(symbol ...):command-name list:rest-arguments -> any}" (br) "#:commands commands-spec" (br) "#:command-options option-spec" (br) "#:options (option-spec ...)" (br) "option-spec ..." (br) "->" (br) "procedure:{(string ...) -> list:alist:((symbol . any) ...):parsed-arguments}" (br) "" (br) "# description" (br) "null-arguments: arguments to use when no arguments have been given to the cli, for example (list \\\"--help\\\")" (br) "commands-options: options shared between commands" (br) "commands: specify sub-commands that are recognised as leading keywords in the program arguments. with options or handler procedures" (br) "command-handler: command-handler called for all commands (after individual command handlers)" (br) "options: specify long, short and unnamed options" (br) "# data-structures" (br) "custom-processor: custom handler for option values. procedure:args-fold-processor:{opt matched-name any result ->}" (br) "input-type-names: symbol:string/number/integer" (br) "option-spec: (symbol/list:name/pattern #:names character/string/(character/string ...) #:required? boolean" (br) " #:value-required? boolean #:value-optional? boolean #:type symbol #:description string #:processor procedure:custom-processor)" (br) "pattern: (symbol symbol/ellipsis:... ...)" (br) "commands-spec: (((string:command-name ...) procedure:{command arguments}/[cli-create-argument ...]) ...)." (br) "more documentation and examples can be found on http://sph.mn/computer/software/sph-lib/cli.html")))) (div (@ (id "doc-b-" "sph-cli-description") (class "doc-b")) (div (span (@ (class "type")) "variable") ": " (span (@ (class "name")) "sph-cli-description")) "" "")))))))) ()))