quicksearch

API Reference

quicksearch

Quicksearch searches CL library, and outputs results at REPL.

QUICKSEARCH

  • Variable *USER-AGENT*
    (format nil "quicksearch/~a (~a ~a; ~a; ~a; ~a)"
            quicksearch::*quicksearch-version* (lisp-implementation-type)
            (lisp-implementation-version) (software-type) (software-version)
            quicksearch::*quicksearch-webpage*)
    This value tells the server who is requested (i.e. User-Agent header value). If you are embedding Quicksearch in a larger application, you should change the value of *USER-AGENT* to your application name and URL.
  • Function QUICKSEARCH (search-word &key (?web t) (?description nil) (?url nil) (?cut-off 50) (?quicklisp t) (?cliki t) (?github t) (?bitbucket t))
    Search for CL projects with `search-word' in Quicklisp, Cliki, GitHub and BitBucket. `search-word' must be a string, number or symbol (symbol will be automatically converted into downcase-string). Keywords: * If `?web' is NIL, it does not search in Cliki, GitHub and BitBucket. * If `?quicklisp' is NIL, it does not search in Quicklisp (also `?cliki', `?github', `?bitbucket'). * At least one search-space must be specified. * If `?description' is T, it displays project's descriptions (except for Quicklisp-search). * If `?url' is T, it display project's url. * `?cut-off' is the max number of printing repositories each space. Note: * keyword `?cut-off' controls only printing results, nothing to do with the maximum number of fetching repositories (see. function CONFIG documentation). * About #\Space in `search-word': In case `search-word' contains #\Space, Quicklisp-search is OR-search, whereas Cliki-search, GitHub-, BitBucket- is AND-search. e.g. (quicksearch "foo bar") Quicklisp-search for "foo" OR "bar", Cliki-search, GitHub-, BitBucket- for "foo" AND "bar".
  • Function CONFIG (&key ((maximum-columns-of-description max-cols) 80 max-cols-supplied?) ((maximum-number-of-fetching-repositories max-repos) 50 max-repos-supplied?) (cache-size 4 cache-size-supplied?) (clear-cache? nil clear-cache-supplied?) (threading? t threading-supplied?) (quicklisp-verbose? nil quicklisp-verbose-supplied?))
    Function CONFIG customizes printing, fetching or caching. If CONFIG is called with no keyword, then it sets default values. Keywords: * `:maximum-columns-of-description' (default 80) The value must be a plus integer bigger than 5. If the length of description-string is bigger than this value, then output of description is inserted newline for easy to see. * `:maximum-number-of-fetching-repositories' (default 50) This value controls the number of fetching repositories. The value must be a plus integer. Increasing this value, the number of fetching repositories increases, but also space & time does. * `:cache-size' The value must be a plus integer (default 4). This value is the number of stored previous search-results. Increasing this value, the number of caching results increases, but also space does. * `:clear-cache?' The value must be a boolean (default NIL). If value is T, then clear all caches. * `:threading?' The value must be a boolean (default T). If value is NIL, then QUICKSEARCH becomes not to use threads for searching. Note: Currently on SBCL (1.1.8), threads are part of the default build on x86[-64] Linux only. Other platforms (x86[-64] Darwin (Mac OS X), x86[-64] FreeBSD, x86 SunOS (Solaris), and PPC Linux) experimentally supports threads and must be explicitly enabled at build-time. For more details, please see [SBCL manual](http://www.sbcl.org/manual/index.html#Threading). * `:quicklisp-verbose?' The value must be a boolean (default NIL). If value is T, then outputs version of quicklisp and whether library had installed your local. Example: CL-REPL> (qs:config :QUICKLISP-VERBOSE? t) CL-REPL> (qs:? "json" :q) SEARCH-RESULTS: "json" Quicklisp: 2013-04-20 ;<- quicklisp version !cl-json ;<- if library has been installed via quicklisp, print prefix "!". !cl-json.test com.gigamonkeys.json ;<- if not, none. json-template st-json T Note: * If you would prefer permanent configuration, for example, add codes something like the following in the CL init file. In `.sbclrc` for SBCL, `ccl-init.lisp` for CCL: (ql:quickload :quicksearch) (qs:config :maximum-columns-of-description 50 :maximum-number-of-fetching-repositories 20 :cache-size 10 :threading? nil :quicklisp-verbose? t)
  • Function ? (search-word &rest options)
    ? is abbreviation wrapper for function QUICKSEARCH. `search-word' must be a string, number or symbol. `options' must be a non-negative integer (as Cut-Off) and/or some keywords which consists of some Option-Chars. Options: * Cut-Off: * The max number of printing results (default is 50). * Option-Chars: * d, D -- output Description * u, U -- output URL * q, Q -- search in Quicklisp * c, C -- search in Cliki * g, G -- search in GitHub * b, B -- search in Bitbucket Note: * Option-Char is idempotent (e.g. :dd <=> :d). * If `options' contains more than 2 Cut-Offs, only last one is applyed. * The order of Option-Chars is nothing to do with output (e.g. :du <=> :ud). * The order of `options' is nothing to do with output (except for some Cut-Offs). * If no search-space is specified, all spaces are specified (e.g. :d <=> :dqcgb). * If at most one search-space is specified, then others are not specified. Examples: (? "crypt") <=> (quicksearch "crypt" :?description nil :?url nil :?cut-off 50 :?quicklisp t :?cliki t :?github t :?bitbucket t) (? "crypt" :du 10) <=> (quicksearch "crypt" :?description T :?url T :?cut-off 10 :?quicklisp t :?cliki t :?github t :?bitbucket t) (? "crypt" 20 :g :d) <=> (quicksearch "crypt" :?description T :?url nil :?cut-off 20 :?quicklisp nil :?cliki nil :?github T :?bitbucket nil)