Update for the latest Declt.
[clon.git] / doc / generate.cl
blob509aa6cdb61a53d76de8442a25fc1554a9fef91b
1 ;;; generate.cl --- Clon reference manual generation script
3 ;; Copyright (C) 2010, 2011, 2012 Didier Verna
5 ;; Author: Didier Verna <didier@lrde.epita.fr>
6 ;; Maintainer: Didier Verna <didier@lrde.epita.fr>
8 ;; This file is part of Clon.
10 ;; Permission to use, copy, modify, and distribute this software for any
11 ;; purpose with or without fee is hereby granted, provided that the above
12 ;; copyright notice and this permission notice appear in all copies.
14 ;; THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
15 ;; WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
16 ;; MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
17 ;; ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
18 ;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
19 ;; ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
20 ;; OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
23 ;;; Commentary:
25 ;; Contents management by FCM version 0.1.
28 ;;; Code:
30 (require :asdf)
32 (defconstant +introduction+
33 "@macro clon
34 @t{Clon}
35 @end macro
37 @macro cmdline
38 command-line
39 @end macro
41 @macro CmdLine
42 Command-Line
43 @end macro
45 @macro cl
46 Common-Lisp
47 @end macro
49 @macro tty
50 @t{tty}
51 @end macro
53 @macro etc
54 @i{etc.}
55 @end macro
57 @macro pxenduserref{node}
58 @ifinfo
59 @pxref{\\node\\, , , clon-enduser, The Clon End-User Manual}
60 @end ifinfo
61 @ifnotinfo
62 @pxref{\\node\\, , , enduser, The Clon End-User Manual}
63 @end ifnotinfo
64 @end macro
66 @macro pxuserref{node}
67 @ifinfo
68 @pxref{\\node\\, , , clon-user, The Clon User Manual}
69 @end ifinfo
70 @ifnotinfo
71 @pxref{\\node\\, , , user, The Clon User Manual}
72 @end ifnotinfo
73 @end macro
75 @clon{} is a library for managing @cmdline{} options in standalone @cl{}
76 applications. It provides a unified option syntax with both short and
77 long names, automatic completion of partial names and automatic
78 retrieval/conversion of option arguments from the @cmdline{}, associated
79 environment variables, fallback or default values. @clon{} comes with a
80 set of extensible option types (switches, paths, strings @etc{}).
81 @clon{} also provides automatic generation and formatting of help
82 strings, with support for highlighting on @tty{}'s through ISO/IEC 6429
83 SGR. This formatting is customizable through @emph{themes}.
85 Depending on the target audience, @clon{} stands for either ``The
86 @CmdLine{} Options Nuker'' or ``The @cl{} Options Nuker''. @clon{} also
87 has a recursive acronym: ``@clon{} Likes Options Nuking'', and a reverse
88 one: ``Never Omit to Link with @clon{}''. Other possible expansions of
89 the acronym are still being investigated.
91 This is the @clon{} reference manual, and as such, it is not meant to be
92 read. It may help you find sleep in case of insomnia though. @clon{}
93 comes with two human-readable manuals:
94 @itemize @bullet
95 @item
96 the ``end-user manual'' (@pxenduserref{Top}) is for the @clon{}
97 @emph{end-user}, that is, the user of an application powered by @clon{}.
98 It describes how to use the @cmdline{} of clonified@footnote{An
99 application using @clon{} for its @cmdline{} option management is said to
100 be @emph{clonified}. It is also possible to say @emph{clonfiscated}.
101 However, we advise against using @emph{clonistified}. The term
102 @emph{clonificated} is also considered bad style, and the use of
103 @emph{clonificationated} is strictly prohibited.} applications and how to
104 customize @clon{}'s output. Everybody should read this manual first.
105 @item
106 the ``user manual'' (@pxenduserref{Top}) is for the @clon{} @emph{user},
107 that is, the developer of a @cl{} application who wants to use @clon{} for
108 @cmdline{} option management. It describes how to clonify your application
109 and extend the library with your own option types.
110 @end itemize"
111 "The reference manual's introductory text.")
113 (asdf:operate 'asdf:load-op :com.dvlsoft.declt)
115 (if (and (second sb-ext:*posix-argv*)
116 (string= (second sb-ext:*posix-argv*) "--web"))
117 (com.dvlsoft.declt:declt :com.dvlsoft.clon
118 :library-name "Clon"
119 :texi-file "webreference.texi"
120 ;; but we don't care
121 :info-file "clon-webreference"
122 :introduction +introduction+
123 :license :bsd
124 :copyright-date "2010, 2011, 2012")
125 (com.dvlsoft.declt:declt :com.dvlsoft.clon
126 :library-name "Clon"
127 :texi-file "reference.texi"
128 :info-file "clon-reference"
129 :introduction +introduction+
130 :license :bsd
131 :copyright-date "2010, 2011, 2012"
132 :hyperlinks t))
134 (sb-ext:quit)
137 ;;; generate.cl ends here