
The "racket" directory contains a pared-back version of the repository, roughly. The "pkgs" directory everything else in the repository, but organized into packages. original commit: b2ebb0a28bf8136e75cd98316c22fe54c30eacb2
20 lines
524 B
Racket
20 lines
524 B
Racket
#lang scheme/base
|
|
|
|
(require "search.rkt" scheme/cmdline scheme/list scheme/string
|
|
raco/command-name)
|
|
|
|
;; Minimal command-line arguments, the query string can contain all
|
|
;; kinds of magic.
|
|
(command-line
|
|
#:program (short-program+command-name)
|
|
#:handlers
|
|
(lambda (_ . ts)
|
|
(if (null? ts)
|
|
(send-main-page)
|
|
(perform-search (string-append* (add-between ts " ")))))
|
|
'("search-terms")
|
|
(lambda (help-str)
|
|
(display help-str)
|
|
(display " See the search page for the syntax of queries\n")
|
|
(exit 0)))
|