X-Git-Url: https://code.consxy.com/gitweb/gitweb.cgi?p=sheep;a=blobdiff_plain;f=README.md;h=3d8714a02b839d29ea44e9f1a01de76502703095;hp=c059be9e2b54a1ba891c95a59475855899a86a93;hb=1ba7b00;hpb=e9d1b7da236295700286b7564960d84f9c5f0dbe diff --git a/README.md b/README.md index c059be9..3d8714a 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,72 @@ # Common Lisp Document Generator -Enforcement of documentation guidelines for my Common Lisp Projects, as well as conversion to markdown for github repositories. +Enforcement of documentation guidelines for my Common Lisp Projects, as well as conversion to markdown for my github repositories. + +I wish I had aspirations for this being some standard that someone else might follow, but realistically I'm just irritated at my own laziness with regard to documentation, so I wrote a solution. The forceful nature of the validator is really just because I didn't want to write a smarter parser. As an added bonus, all the docs now look the same when I look at them in the repl, so that's kind of nice. + +## Usage + +See the [wiki](https://github.com/frankduncan/docgen/wiki) for usage information (generated by this package). + +To see how that page was created, take a look at bin/generatedocs.sh + +## Package documentation + +Packages are documented by sections broken up by one empty line, with the first section limited to 120 characters. + +## Structure/Condition documentation + +Requirements are the same as the package + +## Function documentation + +Functions should follow the template: + +```` +FUNC PATH => RESULT + + RESULT: SUCCESS-RESULTS | FAILURE-RESULT + SUCCESS-RESULTS: SUCCESS-RESULT* + SUCCESS-RESULT: (:success FILENAME) + FAILURE-RESULT: (:failure FILENAME MSG) + +ARGUMENTS AND VALUES: + + PATH: a pathname + FILENAME: the file this func was run on + MSG: a string containing the failure message + +DESCRIPTION: + + FUNC runs all the things against a file located at PATH and returns + as soon as the first func error is found. + +EXAMPLES: + + (func #P\"path/to/file.lisp\" t) => (:success \"path/to/file.lisp\") + (func #P\"path/to/error.lisp\" nil) => (:failure \"path/to/error.lisp\" \"Error msg\") +```` + +There are four sections to each function definition: + +### Header section + +Arguments should all be upper case, but &rest, &optional, and &key should be lower case. Arguments are seperated by a space. + +Results should also be upper case, and in the case of values, separated by commas. + +Types can be further elucidated by providing more information either as a list of options seperated by pipes, a tuple contained in parens, or a list denoted by an * + +### Arguments and values section: + +All the types that weren't broken down into subtypes must be explained. The form is type name in all upper case, a colon, then a description. That description can have upper case type names in it which will then get italicized later. + +### Description + +Descriptins should be indented two spaces, and not longer than 120 characters wide. Like the arguments and values, upper cased types will be italicized later. + +### Examples + +This section is optional. + +Examples are of the form: example-code => example result