Add codex docs.

This commit is contained in:
Kyle 2015-08-30 14:02:41 -07:00
parent 3859117b99
commit 778c9dd04b
4 changed files with 93 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
docs/build

13
docs/example.lisp Normal file
View File

@ -0,0 +1,13 @@
* (let ((stream (flexi-streams:make-in-memory-output-stream)))
(binary:write-u32 stream 1024)
(binary:write-u32 stream 1024 :endian :big)
(format t "Stream contents: ~A~%"
(flexi-streams:get-output-stream-sequence stream)))
#(0 4 0 0 0 0 4 0)
NIL
* (let ((stream (flexi-streams:make-in-memory-input-stream #(0 4 0 0 0 0 4 0))))
(format t "Read ~A~%" (binary:read-u32 stream))
(format t "Read ~A~%" (binary:read-u32 stream :endian :big)))
Read 1024
Read 1024
NIL

7
docs/manifest.lisp Normal file
View File

@ -0,0 +1,7 @@
(:docstring-markup-format :scriba
:systems (:binary)
:documents ((:title "Binary"
:authors ("Kyle Isom")
:output-format (:type :multi-html
:template :minima)
:sources ("manual.scr"))))

72
docs/manual.scr Normal file
View File

@ -0,0 +1,72 @@
@begin(section)
@title(Index)
@b(binary) contains functions for reading and writing integers from
binary streams
@begin(deflist)
@term(Source)
@begin(def)
The source code may be obtained from
@link[uri="https://github.com/kisom/binary/"](Github).
@end(def)
@term(Setup and Usage)
@begin(def)
@b(binary) requires
@link[uri="https://quicklisp.org/"](Quicklisp). The repository should
be cloned into the @c(local-projects) directory under the Quicklisp
home.
To use @b(kutils), either add it to the @c(:depends-on) section of
your project's @c(.asd), or @c(ql:quickload :kutils).
@end(def)
@term(License)
@begin(def)
@b(binary) is released under the
@link[uri="https://raw.githubusercontent.com/kisom/binary/master/LICENSE"](MIT)
license.
@end(def)
@end(deflist)
@end(section)
@begin(section)
@title(Overview)
The @b(binary) package was written to parse and serialise certain
network messages while working on implementing a client library for a
certain protocol in Common Lisp.
@code(@include[path=example.lisp]())
@end(section)
@begin(section)
@title(API Reference)
@cl:with-package[name="binary"](
@cl:doc(function read-U8)
@cl:doc(function read-U16)
@cl:doc(function read-U32)
@cl:doc(function read-U64)
@cl:doc(function read-I8)
@cl:doc(function read-I16)
@cl:doc(function read-I32)
@cl:doc(function read-I64)
@cl:doc(function write-U8)
@cl:doc(function write-U16)
@cl:doc(function write-U32)
@cl:doc(function write-U64)
@cl:doc(function write-I8)
@cl:doc(function write-I16)
@cl:doc(function write-I32)
@cl:doc(function write-I64))
@end(section)