adopt/usage/index.html @ ed07090456a5
cl-netpbm: Update site.
| author | Steve Losh <steve@stevelosh.com> |
|---|---|
| date | Sat, 23 Feb 2019 14:36:33 -0500 |
| parents | bcc463ff154f |
| children | 9918f80ae953 |
<!DOCTYPE html> <html> <head> <meta charset="utf-8"/> <title>Usage / Adopt</title> <link rel="stylesheet" href="../_dmedia/tango.css"/> <link rel="stylesheet/less" type="text/css" href="../_dmedia/style.less"/> <script src="../_dmedia/less.js" type="text/javascript"> </script> </head> <body class="content"> <div class="wrap"> <header><h1><a href="..">Adopt</a></h1></header> <div class="markdown"> <h1 id="usage"><a href="">Usage</a></h1><p>Adopt is a simple library for parsing UNIX-style command line arguments in Common Lisp. It was made because none of the other libraries did what I needed.</p> <div class="toc"> <ul> <li><a href="#package">Package</a></li> <li><a href="#interfaces">Interfaces</a></li> <li><a href="#parsing">Parsing</a></li> <li><a href="#options">Options</a></li> <li><a href="#short-and-long-options">Short and Long Options</a></li> <li><a href="#initial-value">Initial Value</a></li> <li><a href="#reduce">Reduce</a></li> <li><a href="#usage-printing">Usage Printing</a></li> </ul></div> <h2 id="package">Package</h2> <p>All core Adopt functions and macros are in the <code>adopt</code> package. You can <code>:use</code> that if you really want to, but it's probably clearer to use namespaced <code>adopt:…</code> symbols.</p> <h2 id="interfaces">Interfaces</h2> <p>define-interface and usage. nothing else.</p> <h2 id="parsing">Parsing</h2> <p><code>parse-options</code> with a bare-bones interface.</p> <h2 id="options">Options</h2> <p>talk about the option arguments.</p> <h2 id="short-and-long-options">Short and Long Options</h2> <p>short versus long arguments. 1+ is required.</p> <h2 id="initial-value">Initial Value</h2> <p>at this point it's just a default</p> <h2 id="reduce">Reduce</h2> <p>talk about reducers. mention argparse's:</p> <p><code>store_const</code> is <code>(constantly x)</code></p> <p><code>store</code> is <code>#'latest</code></p> <p><code>store_true</code> is <code>(constantly t)</code></p> <p><code>store_false</code> is <code>(constantly nil)</code></p> <p><code>append</code> is <code>append1</code></p> <p><code>append_const</code> is <code>(rcurry #'append1 x)</code></p> <p><code>count</code> is <code>1+</code> with an <code>initial-value</code> of <code>0</code>.</p> <p>need to figure out <code>help</code> and <code>version</code>.</p> <h2 id="usage-printing">Usage Printing</h2> <p>It's <code>(print-usage interface)</code>.</p> </div> <footer><p><i>Made with Lisp and love by <a href="http://stevelosh.com/">Steve Losh</a>.</i></p> <p><a href="http://rochestermade.com" title="Rochester Made"><img src="http://rochestermade.com/media/images/rochester-made-dark-on-light.png" alt="Rochester Made" title="Rochester Made"/></a></p> <script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-15328874-3', 'auto'); ga('send', 'pageview'); </script></footer> </div> </body> </html>