diff options
Diffstat (limited to '')
-rwxr-xr-x | main.scm | 21 |
1 files changed, 11 insertions, 10 deletions
@@ -64,24 +64,25 @@ (define option-spec `((output (single-char #\o) (required? #f) - (value #t)) - (help (single-char #\h)) + (value #t) + (description "Target directory for output files" (br) + "Defaults to " (i "$PWD") ".")) + (help (single-char #\h) + (description "Print this help")) (config-dir (required? #f) - (value #t)) - (quiet (value #f)))) + (value #t) + (description "Defaults to " (i "$XDG_CONFIG_DIR/rss-filter"))) + (quiet (value #f) + (description "Supress info output")))) -(define (display-help) - (format #t "Usage: ~a [--config-dir conf-dir] [--output /tmp/output]~%" - (car (command-line)))) - (define (display-no-config config-dir) (format #t "Configuration directory [~a] doesn't exist, or is unreadable~%" config-dir)) (define (main args) - (define opts (getopt-long args option-spec)) + (define opts (getopt-long args ((@ (calp util options) getopt-opt) option-spec))) (define output-directory (option-ref opts 'output ".")) (define config-dir @@ -92,7 +93,7 @@ (define quiet? (option-ref opts 'quiet #f)) (when (option-ref opts 'help #f) - (display-help) + ((@ (calp util options) print-arg-help) option-spec) (exit 0)) (unless (file-exists? config-dir) |