Skip to content

Commit 6aa33d1

Browse files
committed
Better docs
1 parent 58011db commit 6aa33d1

File tree

5 files changed

+47
-16
lines changed

5 files changed

+47
-16
lines changed

build-docs.ros

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/bin/sh
2+
#|-*- mode:lisp -*-|#
3+
#|
4+
exec ros -R +Q -- $0 "$@"
5+
|#
6+
(progn ;;init forms
7+
(ros:ensure-asdf)
8+
;;; https://github.com/ocicl/ocicl.git
9+
#-ocicl
10+
(when (probe-file #P"./ocicl/ocicl-runtime.lisp")
11+
(load #P"./ocicl/ocicl-runtime.lisp"))
12+
(asdf:initialize-source-registry
13+
`(:source-registry
14+
:ignore-inherited-configuration
15+
(:directory ,(uiop:getcwd))))
16+
(asdf:load-system "codex")
17+
)
18+
19+
(defpackage :ros.script.build-docs.3943893088
20+
(:use :cl))
21+
(in-package :ros.script.build-docs.3943893088)
22+
23+
(defun main (&rest argv)
24+
(declare (ignorable argv))
25+
(codex:document "com.djha-skin.cliff"))
26+
;;; vim: set ft=lisp lisp:

docs/api-reference.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
<h1 class="doc-title">CLIFF: Command Line Interface Functional Framework</h1>
4343
<article id="article" data-section="api-reference">
4444
<aside>
45-
<ol class="toc"><li><a href="overview.html" data-node="overview">Overview</a></li><li><a href="tutorial.html" data-node="tutorial">Tutorial</a><ol><li><a href="tutorial.html#install" data-node="install">Install</a></li><li><a href="tutorial.html#up-and-running" data-node="up-and-running">Up and Running</a></li><li><a href="tutorial.html#open-world-configuration" data-node="open-world-configuration">Open World Configuration</a></li><li><a href="tutorial.html#the-option-tower" data-node="the-option-tower">The Option Tower</a></li><li><a href="tutorial.html#add-a-default-function" data-node="add-a-default-function">Add a Default Function</a></li><li><a href="tutorial.html#string-conversion" data-node="string-conversion">String Conversion</a></li><li><a href="tutorial.html#provide-command-line-aliases" data-node="provide-command-line-aliases">Provide Command-Line Aliases</a></li><li><a href="tutorial.html#override-default-output" data-node="override-default-output">Override Default Output</a></li><li><a href="tutorial.html#add-subcommands" data-node="add-subcommands">Add Subcommands</a></li><li><a href="tutorial.html#add-more-help-documentation" data-node="add-more-help-documentation">Add More Help Documentation</a></li><li><a href="tutorial.html#wrap-up" data-node="wrap-up">Wrap-up</a></li></ol></li><li><a href="api-reference.html" data-node="api-reference">API Reference</a><ol><li><a href="api-reference.html#com.djhaskin.cliff" data-node="com.djhaskin.cliff"><code>com.djhaskin.cliff</code></a><ol><li><a href="0-overview.html" data-node="0-overview">Overview</a></li><li><a href="the-options-tower.html" data-node="the-options-tower">The Options Tower</a><ol><li><a href="configuration-files.html" data-node="configuration-files">Configuration Files</a></li><li><a href="environment-variables.html" data-node="environment-variables">Environment Variables</a></li><li><a href="command-line-arguments.html" data-node="command-line-arguments">Command Line Arguments</a></li><li><a href="the-setup-function.html" data-node="the-setup-function">The Setup Function</a></li></ol></li><li><a href="determining-the-action-function.html" data-node="determining-the-action-function">Determining the Action Function</a></li><li><a href="the-help-page.html" data-node="the-help-page">The Help Page</a></li><li><a href="execution.html" data-node="execution">Execution</a></li><li><a href="error-handling.html" data-node="error-handling">Error Handling</a></li><li><a href="goals-and-discussion.html" data-node="goals-and-discussion">Goals and Discussion</a></li></ol></li><li><a href="api-reference.html#com.djhaskin.cliff-errors" data-node="com.djhaskin.cliff-errors"><code>com.djhaskin.cliff/errors</code></a></li></ol></li></ol>
45+
<ol class="toc"><li><a href="overview.html" data-node="overview">Overview</a></li><li><a href="tutorial.html" data-node="tutorial">Tutorial</a><ol><li><a href="tutorial.html#install" data-node="install">Install</a></li><li><a href="tutorial.html#up-and-running" data-node="up-and-running">Up and Running</a></li><li><a href="tutorial.html#open-world-configuration" data-node="open-world-configuration">Open World Configuration</a></li><li><a href="tutorial.html#the-options-tower" data-node="the-options-tower">The Options Tower</a></li><li><a href="tutorial.html#add-a-default-function" data-node="add-a-default-function">Add a Default Function</a></li><li><a href="tutorial.html#string-conversion" data-node="string-conversion">String Conversion</a></li><li><a href="tutorial.html#provide-command-line-aliases" data-node="provide-command-line-aliases">Provide Command-Line Aliases</a></li><li><a href="tutorial.html#override-default-output" data-node="override-default-output">Override Default Output</a></li><li><a href="tutorial.html#add-subcommands" data-node="add-subcommands">Add Subcommands</a></li><li><a href="tutorial.html#add-more-help-documentation" data-node="add-more-help-documentation">Add More Help Documentation</a></li><li><a href="tutorial.html#wrap-up" data-node="wrap-up">Wrap-up</a></li></ol></li><li><a href="api-reference.html" data-node="api-reference">API Reference</a><ol><li><a href="api-reference.html#com.djhaskin.cliff" data-node="com.djhaskin.cliff"><code>com.djhaskin.cliff</code></a><ol><li><a href="0-overview.html" data-node="0-overview">Overview</a></li><li><a href="1-the-options-tower.html" data-node="1-the-options-tower">The Options Tower</a><ol><li><a href="configuration-files.html" data-node="configuration-files">Configuration Files</a></li><li><a href="environment-variables.html" data-node="environment-variables">Environment Variables</a></li><li><a href="command-line-arguments.html" data-node="command-line-arguments">Command Line Arguments</a></li><li><a href="the-setup-function.html" data-node="the-setup-function">The Setup Function</a></li></ol></li><li><a href="determining-the-action-function.html" data-node="determining-the-action-function">Determining the Action Function</a></li><li><a href="the-help-page.html" data-node="the-help-page">The Help Page</a></li><li><a href="execution.html" data-node="execution">Execution</a></li><li><a href="error-handling.html" data-node="error-handling">Error Handling</a></li><li><a href="discussion.html" data-node="discussion">Discussion</a></li></ol></li><li><a href="api-reference.html#com.djhaskin.cliff-errors" data-node="com.djhaskin.cliff-errors"><code>com.djhaskin.cliff/errors</code></a></li></ol></li></ol>
4646
</aside>
4747
<main class="codex-section">
4848
<header>
@@ -62,7 +62,7 @@ <h2 class="section-title">API Reference</h2>
6262
corresponding to the subcommand as given in <code class="codex-param">subcommand-functions</code>
6363
will be called. Expects that function to return a results map, with at least
6464
the <code>:status</code> key set to one of the values listed in the <code>*exit-codes*</code>
65-
map.</p><p> </p><p> </p><h2 id="the-options-tower">The Options Tower</h2><p> </p><h3 id="configuration-files">Configuration Files</h3><p> The function first builds, in successive steps, the options table which will
65+
map.</p><p> </p><p> </p><h2 id="1-the-options-tower">The Options Tower</h2><p> </p><h3 id="configuration-files">Configuration Files</h3><p> The function first builds, in successive steps, the options table which will
6666
be passed to the function in question.</p><p> It starts with the options hash table given by the <code class="codex-param">defaults</code>
6767
parameter.</p><p> The function next examines the given <code class="codex-param">environment-variables</code>,
6868
which should be given as an alist with keys as variable names and values as
@@ -196,7 +196,7 @@ <h2 class="section-title">API Reference</h2>
196196
<code class="codex-param">suppress-output</code> is given as <code>t</code>.</p><p> <code>execute-program</code> then returns two values: the numeric exit code
197197
corresponding to the exit status computed as described above, and the newly
198198
constructed result map containing the error information.</p><p> </p><p>
199-
</p><h2 id="goals-and-discussion">Goals and Discussion</h2><p> Command line tools necessarily need to do a lot of I/O. <code>execute-program</code>
199+
</p><h2 id="discussion">Discussion</h2><p> Command line tools necessarily need to do a lot of I/O. <code>execute-program</code>
200200
attempts to encapsulate much of this I/O while providing
201201
<a href="https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html">clean
202202
architecture</a> by default. Ideally, <code>execute-program</code> should enable an

docs/manual.scr

+2-3
Original file line numberDiff line numberDiff line change
@@ -286,13 +286,12 @@ other programs.
286286
@end(section)
287287

288288
@begin(section)
289-
@title(The Option Tower)
289+
@title(The Options Tower)
290290

291291
CLIFF gathers options for the calling code tool (in this case @c(calc)) from
292292
configuration files, environment variables, and command-line flags. It merges
293293
what it finds from various sources into one single, nested hash table. The
294-
various sources comprise what we will call the Option Tower.
295-
294+
various sources comprise what we will call the Options Tower.
296295

297296
Let's add something from a configuration file now. CLIFF looks in the present
298297
working directory, as well as an OS-dependent, home-based location, which is

docs/overview.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
<h1 class="doc-title">CLIFF: Command Line Interface Functional Framework</h1>
4343
<article id="article" data-section="overview">
4444
<aside>
45-
<ol class="toc"><li><a href="overview.html" data-node="overview">Overview</a></li><li><a href="tutorial.html" data-node="tutorial">Tutorial</a><ol><li><a href="install.html" data-node="install">Install</a></li><li><a href="up-and-running.html" data-node="up-and-running">Up and Running</a></li><li><a href="open-world-configuration.html" data-node="open-world-configuration">Open World Configuration</a></li><li><a href="the-option-tower.html" data-node="the-option-tower">The Option Tower</a></li><li><a href="add-a-default-function.html" data-node="add-a-default-function">Add a Default Function</a></li><li><a href="string-conversion.html" data-node="string-conversion">String Conversion</a></li><li><a href="provide-command-line-aliases.html" data-node="provide-command-line-aliases">Provide Command-Line Aliases</a></li><li><a href="override-default-output.html" data-node="override-default-output">Override Default Output</a></li><li><a href="add-subcommands.html" data-node="add-subcommands">Add Subcommands</a></li><li><a href="add-more-help-documentation.html" data-node="add-more-help-documentation">Add More Help Documentation</a></li><li><a href="wrap-up.html" data-node="wrap-up">Wrap-up</a></li></ol></li><li><a href="api-reference.html" data-node="api-reference">API Reference</a><ol><li><a href="com.djhaskin.cliff.html" data-node="com.djhaskin.cliff"><code>com.djhaskin.cliff</code></a><ol><li><a href="0-overview.html" data-node="0-overview">Overview</a></li><li><a href="the-options-tower.html" data-node="the-options-tower">The Options Tower</a><ol><li><a href="configuration-files.html" data-node="configuration-files">Configuration Files</a></li><li><a href="environment-variables.html" data-node="environment-variables">Environment Variables</a></li><li><a href="command-line-arguments.html" data-node="command-line-arguments">Command Line Arguments</a></li><li><a href="the-setup-function.html" data-node="the-setup-function">The Setup Function</a></li></ol></li><li><a href="determining-the-action-function.html" data-node="determining-the-action-function">Determining the Action Function</a></li><li><a href="the-help-page.html" data-node="the-help-page">The Help Page</a></li><li><a href="execution.html" data-node="execution">Execution</a></li><li><a href="error-handling.html" data-node="error-handling">Error Handling</a></li><li><a href="goals-and-discussion.html" data-node="goals-and-discussion">Goals and Discussion</a></li></ol></li><li><a href="com.djhaskin.cliff-errors.html" data-node="com.djhaskin.cliff-errors"><code>com.djhaskin.cliff/errors</code></a></li></ol></li></ol>
45+
<ol class="toc"><li><a href="overview.html" data-node="overview">Overview</a></li><li><a href="tutorial.html" data-node="tutorial">Tutorial</a><ol><li><a href="install.html" data-node="install">Install</a></li><li><a href="up-and-running.html" data-node="up-and-running">Up and Running</a></li><li><a href="open-world-configuration.html" data-node="open-world-configuration">Open World Configuration</a></li><li><a href="the-options-tower.html" data-node="the-options-tower">The Options Tower</a></li><li><a href="add-a-default-function.html" data-node="add-a-default-function">Add a Default Function</a></li><li><a href="string-conversion.html" data-node="string-conversion">String Conversion</a></li><li><a href="provide-command-line-aliases.html" data-node="provide-command-line-aliases">Provide Command-Line Aliases</a></li><li><a href="override-default-output.html" data-node="override-default-output">Override Default Output</a></li><li><a href="add-subcommands.html" data-node="add-subcommands">Add Subcommands</a></li><li><a href="add-more-help-documentation.html" data-node="add-more-help-documentation">Add More Help Documentation</a></li><li><a href="wrap-up.html" data-node="wrap-up">Wrap-up</a></li></ol></li><li><a href="api-reference.html" data-node="api-reference">API Reference</a><ol><li><a href="com.djhaskin.cliff.html" data-node="com.djhaskin.cliff"><code>com.djhaskin.cliff</code></a><ol><li><a href="0-overview.html" data-node="0-overview">Overview</a></li><li><a href="1-the-options-tower.html" data-node="1-the-options-tower">The Options Tower</a><ol><li><a href="configuration-files.html" data-node="configuration-files">Configuration Files</a></li><li><a href="environment-variables.html" data-node="environment-variables">Environment Variables</a></li><li><a href="command-line-arguments.html" data-node="command-line-arguments">Command Line Arguments</a></li><li><a href="the-setup-function.html" data-node="the-setup-function">The Setup Function</a></li></ol></li><li><a href="determining-the-action-function.html" data-node="determining-the-action-function">Determining the Action Function</a></li><li><a href="the-help-page.html" data-node="the-help-page">The Help Page</a></li><li><a href="execution.html" data-node="execution">Execution</a></li><li><a href="error-handling.html" data-node="error-handling">Error Handling</a></li><li><a href="discussion.html" data-node="discussion">Discussion</a></li></ol></li><li><a href="com.djhaskin.cliff-errors.html" data-node="com.djhaskin.cliff-errors"><code>com.djhaskin.cliff/errors</code></a></li></ol></li></ol>
4646
</aside>
4747
<main class="codex-section">
4848
<header>

0 commit comments

Comments
 (0)