quicksearch

https://github.com/tkych/quicksearch.git

git clone 'https://github.com/tkych/quicksearch.git'

(ql:quickload :quicksearch)
17

Last modified: 2014-04-13 12:00:30 tkych

Version: 0.01.04 (beta)

Quicksearch

Quicksearch is a search-engine-interface for Common Lisp. The goal of Quicksearch is to find the CL library quickly. For example, if you will find the library about json, just type (qs:? 'json) at REPL.

The function quicksearch searches for CL projects in Quicklisp, Cliki, GitHub and BitBucket, then outputs results in REPL. The function ? is abbreviation wrapper for quicksearch.

Depends-on

Installation

cl-test-grid results:

Auto:
  1. CL-REPL> (ql:quickload :quicksearch)
Manual:
  1. SHELL$ git clone https://github.com/tkych/quicksearch.git
  2. CL-REPL> (push #p"/path-to-quicksearch/quicksearch/" asdf:*central-registry*)
  3. CL-REPL> (ql:quickload :quicksearch) or (asdf:load-system :quicksearch)

Examples

Null result:
CL-REPL> (qs:? "supercalifragilisticexpialidocious") ;<=> (qs:quicksearch "supercalifragilisticexpialidocious")
NIL
Simple search:
CL-REPL> (qs:? "crypt") ;<=> (qs:quicksearch "crypt")

SEARCH-RESULTS: "crypt"

 Quicklisp
  crypt

 Cliki
  ARC4
  JARW
  VLM_on_Linux

 GitHub
  cl-crypt
  cl-crypto
  cl-crypto
  cryptography
  cryptoschool
  Cryptopsaras
T
Description:
CL-REPL> (qs:? 'Crypt :d) ;<=> (qs:quicksearch 'Crypt :?description t)

SEARCH-RESULTS: "crypt"
=======================

 Quicklisp
 ---------
  crypt
      http://quickdocs.org/cl-crypt/

 Cliki
 -----
  ARC4
      A Common Lisp implementation of ARC4, a Cryptography code, can be found on
      the
  JARW
      Dr John AR Williams' utilities
  VLM_on_Linux
      Instructions for running the Symbolics VLM virtual machine on Linux

 GitHub
 ------
  cl-crypt
      Common-Lisp implementation of unix crypt function
  cl-crypto
      A common lisp package of ciphers, public-key algorithms, etc.
  cl-crypto
      Pure lisp crypto, written from specs
  cryptography
      implementations of ciphers for cryptography class
  cryptoschool
      Lisp files related to the cryptography class being taught by Ben Warner
  Cryptopsaras
      Reads files generated by Acinonyx.
T
URL, Space, Cutoff:
CL-REPL> (qs:? "crypt" :ug 4) ;<=> (qs:quicksearch "crypt"
                              ;                    :?url t :?cut-off 4
                              ;                    :?quicklisp nil :?cliki nil :?bitbucket nil)

SEARCH-RESULTS: "crypt"
=======================

 GitHub
 ------
  cl-crypt
      https://github.com/renard/cl-crypt
  cl-crypto
      https://github.com/bgs100/cl-crypto
  cl-crypto
      https://github.com/billstclair/cl-crypto
  cryptography
      https://github.com/MorganBauer/cryptography
  .......> 2
T
Config:
CL-REPL> (qs:? 'lisp-koans :du 1) ;<=> (qs:quicksearch 'lisp-koans
                                  ;                    :?description t :?url t :?cut-off 1)

SEARCH-RESULTS: "lisp-koans"
============================

 GitHub
 ------
  lisp-koans
      https://github.com/google/lisp-koans
      Common Lisp Koans is a language learning exercise in the same vein as the
      ruby koans, python koans and others.   It is a port of the prior koans
      with some modifications to highlight lisp-specific features.  Structured
      as ordered groups of broken unit tests, the project guides the learner
      progressively through many Common Lisp language features.
  .......> 4
T

CL-REPL> (qs:config :maximum-columns-of-description 50)
Current maximum columns of description: 50
T

CL-REPL> (qs:? 'lisp-koans :du 1)

SEARCH-RESULTS: "lisp-koans"
============================

 GitHub
 ------
  lisp-koans
      https://github.com/google/lisp-koans
      Common Lisp Koans is a language learning
      exercise in the same vein as the ruby koans,
      python koans and others.   It is a port of
      the prior koans with some modifications to
      highlight lisp-specific features.
      Structured as ordered groups of broken unit
      tests, the project guides the learner
      progressively through many Common Lisp
      language features.
  .......> 4
T

Reference Manual

[function] QUICKSEARCH search-word &key ?web ?description ?url ?cut-off ?quicklisp ?cliki ?github ?bitbucket

QUICKSEARCH searches 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:
Note:

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] ? 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.

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)
Options:
Note:

[function] CONFIG &key maximum-columns-of-description maximum-number-of-fetching-repositories cache-size clear-cache? threading? quicklisp-verbose?

Function CONFIG customizes printing, fetching or caching.

Keywords:

Note: Currently in 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.

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 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 config, 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 2
           :threading? nil
           :quicklisp-verbose? t)

[special variable] *USER-AGENT*

*user-agent* 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.

TODO

Author, License, Copyright