Skip to content

Commit

Permalink
Document using atdoc.
Browse files Browse the repository at this point in the history
  • Loading branch information
luismbo committed Jan 4, 2012
1 parent ba15bcb commit fae92b7
Show file tree
Hide file tree
Showing 5 changed files with 272 additions and 55 deletions.
28 changes: 3 additions & 25 deletions README
@@ -1,27 +1,5 @@
trivial-garbage is a simple library that provides a portable API to
finalizers, weak hash-tables and weak pointers.
trivial-garbage provides a portable API to finalizers, weak hash-tables and
weak pointers on all major implementations of the Common Lisp programming
language.

It is placed in the public domain with absolutely no warranty.

The various bits of funcionality (finalizers, weak pointers, etc...)
are mutually independent. Feel free to copy whatever bits you find
useful into your own program.

Documentation is generated with the code below and is available at
<http://cliki.net/trivial-garbage>.

(asdf:oos 'asdf:load-op :trivial-garbage)
(require :sb-introspect)

(let ((syms nil))
(do-external-symbols (sym :trivial-garbage)
(push sym syms))
(flet ((snd (sym) (string-downcase (symbol-name sym))))
(setq syms (sort syms #'string< :key #'snd))
(dolist (sym syms)
(format t "<p>&mdash; Function: <strong>tg:~A</strong>" (snd sym))
(format t "~{ <var>~A</var>~}</p>~%"
(loop for arg in (sb-introspect:function-arglist sym) collect
(if (listp arg) (mapcar #'snd arg) (snd arg))))
(format t "<blockquote><p>~A</p></blockquote>~%~%"
(documentation sym 'function)))))
178 changes: 178 additions & 0 deletions doc/index.css
@@ -0,0 +1,178 @@
/* based on atdoc's orange-sans.css */

div.sidebar {
float: right;
min-width: 15%;
padding: 0pt 5pt 5pt 5pt;
font-family: verdana, arial;
}

a {
text-decoration: none;
color: #ee8500;
/*
border-bottom: 1px dotted black;
border-top: 1px solid white;
border-left: 1px solid white;
border-right: 1px solid white;
padding-top: 1px;
padding-bottom: 1px;
*/
}

.nonlink {
border-bottom: 1px solid white;
border-top: 1px solid white;
border-left: 1px solid white;
border-right: 1px solid white;
padding-top: 1px;
padding-bottom: 1px;
}

.sidebar a {
border-top: 1px solid #eeeeee;
border-left: 1px solid #eeeeee;
border-right: 1px solid #eeeeee;
}

/*
a:hover {
color: #000000;
border: 1px solid black;
}
*/

#headerlink {
border: none;
}

#headerlink:hover {
border: none;
}

body {
color: #000000;
background-color: #ffffff;
margin-top: 2em;
margin-right: 10em;
margin-left: 10em;
font-family: helvetica, verdana, arial;
}

.main {
margin-top: 20px;
margin-left: 40px;
}

.padded {
padding-left: 30px;
}

.padded h1,h2 {
margin-left: -30px;
}

h1 {
color: #ee8500;
font-size: 22pt;
}

h3 {
color: #000000;
border-bottom: 2px solid #ff9500;
margin-left: -3px;
padding-left: 3px;
padding-top: 2em;
}

h4 {
}

.grau {
padding-top: 1em;
}

.code {
border: solid 1px #d0d0d0;
padding: 1em;
margin-right: 10%;
}

.indent {
/*margin-left: 20px;
padding-bottom: 1em;*/
}

.def {
padding: 1px 1px 1px 1px;
margin-bottom: 1px;
font-weight: bold;
margin-right: 40px;
}

.nomargin {
margin-bottom: 0;
margin-top: 0;
}

.noindent {
margin-left: -30px;
padding-bottom: 1em;
}

#header {
margin-right: 22px;
/*border-bottom: 1px solid black;*/
font-family: verdana, arial;
font-size: 18pt;
padding-bottom: 1px;
}

pre {
background-color: #eeeeee;
border: solid 1px #d0d0d0;
padding: 1em;
margin-right: 10%;
}
#sp-package-list {
/* ... */
}

#sp-about-packages {
/* ... */
}

.sp-lambda-list {
background-color: #f4f4f4;
padding: 3px 3px 3px 3px;
}

.sp-definition {
border: 1px solid #cccccc;
padding: 3px 3px 3px 3px;
}

.sp-definition-body {
padding-left: 2em;
padding-right: 2em;
padding-top: 0.5em;
padding-bottom: 1em;
}

.sp-definition-body ul {
margin-top: 0;
margin-bottom: 0;
}

.sp-return {
}

.sph3 {
padding-top: 1em;
font-weight: bold;
}

#about-package-legend { display: none }
#contents { display: none }
.function-details-legend { display: none }
#heading2 { display: none }
14 changes: 14 additions & 0 deletions gendocs.lisp
@@ -0,0 +1,14 @@
(in-package :cl-user)

(asdf:load-system :atdoc)

(let* ((base (asdf:component-pathname (asdf:find-system :trivial-garbage)))
(output-directory (merge-pathnames "doc/" base))
(css-file (merge-pathnames "doc/index.css" base)))
(ensure-directories-exist output-directory)
(atdoc:generate-html-documentation '(:trivial-garbage)
output-directory
:single-page-p t
:heading "Trivial Garbage"
:index-title "Trivial Garbage"
:css css-file))
2 changes: 0 additions & 2 deletions trivial-garbage.asd
Expand Up @@ -28,5 +28,3 @@
(sys (eql (find-system :trivial-garbage-tests))))
(operate 'load-op :trivial-garbage-tests)
(funcall (find-symbol (string '#:do-tests) '#:rtest)))

;; vim: ft=lisp et

0 comments on commit fae92b7

Please sign in to comment.