Hyperdoc is a hypertext documentation support system for Common Lisp, licensed under a MIT-style license.
The interface is by no means cast in iron yet, so critical input on hyperdoc-devel@common-lisp.net is welcome, as are #lisp flames.
Hyperdoc provides mapping from package-name, symbol-name, and documentation-type triplets to URLS. This is intended for use by interactive environments, so that user can get documentation for a library at the click of a symbol. The mappings are also cached in a simple SEXP-format, so that Emacs based environments can use them even if not connected to a lisp, or if the package in question is not present in the image.
Currently, to support Hyperdoc a package must provide two things:
Return an URI string relative to *hyperdoc-base-uri*, that points to the documentation for symbol.
An URI string used as the default base for documentation. (Users may/should override this locally.)
Example, a simple mapping provided by a library:
(in-package :foo)
(defvar *hyperdoc-base-uri* "http://www.example.com/foo/doc/")
(defun hyperdoc-lookup (symbol type)
(let ((type (intern (string type)))
(name (string-downcase (string symbol))))
(cond ((and (eq 'function type) (fboundp symbol))
(concatenate 'string "dictionary.html#fun_" name))
((and (eq 'variable type) (boundp symbol))
(concatenate 'string "dictionary.html#var_" name)))))
And using it from the client side:
;;; Lookup of a known type.
CL-USER> (hyperdoc:lookup "FOO" "BAR" 'function)
"http://www.example.com/foo/doc/dictionary.html#fun_bar"
;;; Lookup all types (two match). The intention is that the UI layer
;;; should provide the user a choise between the possible alternatives
;;; to resolve ambiguiety.
CL-USER> (hyperdoc:lookup "FOO" "BAR")
(("VARIABLE" . "http://www.example.com/foo/doc/dictionary.html#var_bar")
("FUNCTION" . "http://www.example.com/foo/doc/dictionary.html#fun_bar"))
;;; Lookup all types (single match). Where there is no ambiguiety, the
;;; only match is returned.
CL-USER> (hyperdoc:lookup "FOO" "*QUUX*")
"http://www.example.com/foo/doc/dictionary.html#var_*quux*"
Hyperdoc is currently available via anonymous CVS and ViewCVS only.