Commits

Greg Slepak committed df5b1ea Merge

merged changes from marc

  • Participants
  • Parent commits 4b2bbaa, acdfd1f

Comments (0)

Files changed (18)

File example-site/dragonfly-framework/.htaccess

-Options -indexes
-
-<Files ~ "\.lsp$">
-Order allow,deny
-Deny from all
-</Files>

File example-site/dragonfly-framework/config.lsp

 ; Do not modify the two lines below!
 (env "_" "") (delete '_) ; make sure this isn't defined!
-(dolist (pair (env)) (constant (global (sym (first pair))) (last pair)))
+(dolist (x (env)) (constant (global (sym (upper-case (first x)))) (last x)))
 
 ; NOTE: the paths, including folders, shouldn't have slashes on the ends!
 
 (constant 'PARTIALS_PATH (string DOCUMENT_ROOT "/views/partials"))
 ; setting a default view (sans file extension)
 (constant 'DEFAULT_VIEW "welcome")
-; convenience for using 'display-view', as well as static route matching
+; used by 'display-view' to save you keystrokes and by the static routing.
 (constant 'VIEW_EXTENSION ".html")
 
 ;===============================================================================
 ; to the path, which is bound to the '_' symbol). If one of them matches a file,
 ; the entire route matches and the file is passed through the template evaluator,
 ; otherwise it will not match and defer to the other handler(s).
-; Note that these expressions can be used to do more than just match URLs...
+; Note that these expressions can be used to do more than just match URLs.
 (constant 'STATIC_TRANSFORMATIONS '(
 	(string DOCUMENT_ROOT "/" _ "/index.html")
 	(begin (set 'viewname _) (string VIEWS_PATH "/" _))
 ; RESTful Route Configuration
 ;===============================================================================
 
-; set to nil to disable REST handling
+; set to nil to disable the RESTful handler
 (constant 'ENABLE_RESTFUL_HANDLER true)
 ; location of RESTful resources
 (constant 'RESOURCES_PATH (string DOCUMENT_ROOT "/resources"))

File example-site/dragonfly-framework/docs/dragonfly.lsp.html

 			link="#376590" vlink="#551A8B" alink="#ffAA28">
 <blockquote>
 <center><h1>dragonfly.lsp</h1></center>
-<p><a href="index.html">Module index</a></p> Copyright (c) 2009 Marc Hildmann
-<br/><br/>
- Permission is hereby granted, free of charge, to any person obtaining
- a copy of this software and associated documentation files (the
- "Software"), to deal in the Software without restriction, including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to
- permit persons to whom the Software is furnished to do so, subject to
- the following conditions:
-<br/><br/>
- The above copyright notice and this permission notice shall be
- included in all copies or substantial portions of the Software.
+<p><a href="index.html">Module index</a></p><br/><br/><br/><h2>Module:&nbsp;dragonfly.lsp</h2><p>The heart of Dragonfly - A newLISP web framework for rapid web development.</p>
+<b>Version: </b>0.50<br/>
+<b>Author: </b>Greg Slepak, Marc Hildmann (Team Dragonfly 2009)<br/>
+<b>Location: </b><a href="http://code.google.com/p/dragonfly-newlisp/">http://code.google.com/p/dragonfly-newlisp/</a><br/>
+ <br>This file is the main entry-point of the Dragonfly framework and
+ contains several important functions, as well as the default route
+ definitions. The functions here are in the <tt>Dragonfly</tt> context (alias <tt>DF</tt>),
+ which is the context your static files will be evaluated in by default.
+ Therefore all of the functions here can be called in your templates without
+ needing to be context-qualified.
+ <br><br>Dragonfly's design is very simple, you can actually read through its
+ source in very little time to get a great understanding of exactly how
+ it works, and to get an idea of what sorts of tricks you can do to
+ customize it to your liking (remember, newLISP is <em>extremely</em> dynamic!).
+ <h3>The <tt>listener</tt> function</h3>
+ The <tt>listener</tt> function is called in <tt>index.cgi</tt>. It is the function that
+ kicks everything off by looping through the available routes, finding a
+ match, running it, sending the output to the browser, and then exiting.
+ <br><br>Before all of that, the very *first* thing it does is load the
+ plugins in the <tt>dragonfly-framework/plugins-active</tt> folder, giving them
+ an opportunity to do any special customization that they might require.
+ <h3>Environment Variables</h3>
+ At the very top of the <tt>config.lsp</tt> file there is the following line:
+ <pre> (dolist (x (env)) (constant (global (sym (upper-case (first x)))) (last x)))</pre>
+ This line simply loops through every environment variable and makes a
+ global symbol out of it. This makes it extremely simple to access environment
+ variables, simply type their name! If you prefer PHP-style, you can
+ access them through the <tt>$SERVER</tt> function (simply a synonym for <tt>env</tt>).
+ <br><br>To access any web parameters, files, and cookies use the functions <tt>$GET</tt>, <tt>$POST</tt>,
+ <tt>$FILES</tt>, and <tt>$COOKIES</tt>, respectively. See <tt>Request.lsp</tt> for more information.
+ <h3>Routes</h3>
+ <p>Routes are FOOP objects inheriting from the Route class. They should have the <tt>Route.</tt> prefix.
+ Currently they only need to support two functions: <tt>matches?</tt> and <tt>run</tt>.</p>
+ <p>The listener loops through the available routes and calls <tt>matches?</tt> on them
+ with no arguments. The route must decide, based on any data available to it,
+ whether or not it to return a non-nil value from <tt>matches?</tt>.</p>
+ Here, for example, is the <tt>matches?</tt> function for <tt>Route.Resource</tt>:
+ <pre> (define (matches?)
+     (when (regex {^([a-z]\w+)(/([a-z]\w+))?(/(\d+))?(\.([a-z]+))?} QUERY_STRING 1)
+         (set 'resource_name $1 'resource_action $3 'resource_id $5 'response_format $7)
+         (file? (set 'path (DF:resource-path resource_name)))
+     )
+ )
+ </pre>
+ There are two default routes: <tt>Route.Static</tt> and <tt>Route.Resource</tt>. See the
+ documentation on the example-site and in <tt>config.lsp</tt> for more information on
+ what they do.
+ <h3>Resources</h3>
+ <tt>Route.Resource</tt> handles URLs that refer to RESTful resources, represented as FOOP objects
+ deriving from the <tt>Resource</tt> class. The resources reside in the <tt>RESOURCES_PATH</tt> as .lsp files.
+ The URL scheme works in a similar manner to twitter's RESTful API:
+ <pre>http://mysite.com/<em>resource</em>[/<em>action</em>][/<em>id</em>][.<em>response_format</em>][?get paramters...]</pre>
+ <tt>resource</tt> maps to a context name in a special way. First <tt>Resource.</tt> is prepended
+ to the name, then the underscores are removed and the name is written in title case.
+ The <tt>resource</tt> may only have the letters A-Z (lowercase or uppercase), 0-9, the underscore,
+ and it must begin with a letter.
+ <br/><pre> my_resource => Resource.MyResource</pre>
+ The name also maps to a real file located in <tt>RESOURCES_PATH</tt> by appending ".lsp" to the name:
+ <br/><pre> my_resource => load file: RESOURCES_PATH/my_resource.lsp</pre>
+ If <tt>resource</tt> implements <tt>action</tt>, then that function is called.
+ Like <tt>resource</tt>, <tt>action</tt> may only contain letters, numbers, and the underscore.
+ If no <tt>action</tt> is specified, then the resource's default function is called instead.
+ <p>The optional paramters <tt>id</tt> and <tt>response_format</tt> are passed in to the function
+ as parameters (in that order).</p>
+ <p><tt>id</tt> may only contain numbers, and <tt>response_format</tt> may only contain letters.</p>
+ <h3>Plugins</h3>
+ There are two types of plugins, those in the <tt>plugins-active</tt> folder, and those
+ in the <tt>plugins-inactive</tt> folder. The ones in the former are loaded when <tt>listener</tt>
+ is called, prior to running the routes. Every .lsp file in the <tt>plugins-active</tt> folder
+ is loaded at that point, so you'll only want your most frequently used files in there.
+ <p>A good example of an active plugin is a custom route. Defining a custom route consists
+ of two basic steps: creating your <tt>Route</tt> "subclass", and adding an instance of
+ it to <tt>Dragonfly:dragonfly-routes</tt>. Take a look at how it's done in the source of
+ <tt>dragonfly.lsp</tt> for more info.</p>
+ <p>Inactive plugins are simply those that should be loaded on a "need to use" basis.
+ Most plugins will probably fall into this category. Use <tt>Dragonfly:activate-plugin</tt>
+ to load them. All plugins are loaded exactly once, no matter how many times
+ <tt>activate-plugin</tt> is called on them.</p>
 
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 
-<a href="dragonfly.lsp.src.html">source</a><br/><br/><h2>Module:&nbsp;Dragonfly</h2><b>Author: </b>Marc Hildmann <marc.hildmann@gmail.com><br/>
-<b>Version: </b>0.12<br/>
-<b>Location: </b><a href="http://code.google.com/p/dragonfly-newlisp/">http://code.google.com/p/dragonfly-newlisp/</a><br/>
-<p>A newLISP web framework for rapid web development</p>
-<br/><br/>
-<br/><br/>
- set constants for Dragonfly
 
- init symbols for Dragonfly listener
+
+
 
 
 
 
 <br/><br/><center>- &sect; -</center><br/>
-<a name="Dragonfly_listener"></a><h3><font color=#CC0000>Dragonfly:listener</font></h3>
-<b>syntax: (<font color=#CC0000>Dragonfly:listener</font>)</b><br/>
- <p>The Dragonfly listener parses the QUERY STRING
- for the specified template and action.</p>
+<a name="_STDOUT"></a><h3><font color=#CC0000>STDOUT</font></h3>
+<b>syntax: STDOUT</b><br/>
+ This is the buffer that contains the content that will get written
+ to STDOUT if no errors are thrown. <tt>MAIN:print</tt> and <tt>MAIN:println</tt>
+ are globally overridden to write to this buffer.
+ Normally you should never need to modify this variable, however it is
+ documented for reference's sake.
+
+
+
+
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="Dragonfly_activate-plugin"></a><h3><font color=#CC0000>Dragonfly:activate-plugin</font></h3>
+<b>syntax: (<font color=#CC0000>Dragonfly:activate-plugin</font> <em>str-plugin-name</em> [<em>str-plugin-name-2</em> ...])</b><br/>
+<b>parameter: </b><em>str-plugin-name</em> - The name of the plugin to load, without the ".lsp" extension.<br/>
+ <br>Loads (once only) a the named plugin from the <tt>plugins-inactive</tt> folder.
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="Dragonfly_web-root"></a><h3><font color=#CC0000>Dragonfly:web-root</font></h3>
+<b>syntax: (<font color=#CC0000>Dragonfly:web-root</font> <em>str-path</em>)</b><br/>
+<b>parameter: </b><em>str-path</em> - Path relative to the folder containing <tt>index.cgi</tt>.<br/>
+ <p>This function is quite handy for making working links when your <tt>index.cgi</tt> file
+ is not in <tt>DOCUMENT_ROOT</tt> but a subfolder of it.</p>
+<b>example:</b><blockquote><pre> ; index.cgi is located in /home/user/site.com/examples-site
+ ; Users visit http://www.site.com/example-site
+ (web-root "about") =&gt; "/example-site/about"
+ (web-root "/foo") =&gt; "/example-site/foo"</pre></blockquote>
+<br/><br/><center>- &sect; -</center><br/>
+<a name="Dragonfly_view-path"></a><h3><font color=#CC0000>Dragonfly:view-path</font></h3>
+<b>syntax: (<font color=#CC0000>Dragonfly:view-path</font> <em>str-view-name</em>)</b><br/>
+<b>parameter: </b><em>str-view-name</em> - Name of view in <tt>VIEWS_PATH</tt>, without any extension.<br/>
+ <br>Returns the absolute path to the view as a string, appending <tt>VIEW_EXTENSION</tt> if necessary.
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="Dragonfly_partial-path"></a><h3><font color=#CC0000>Dragonfly:partial-path</font></h3>
+<b>syntax: (<font color=#CC0000>Dragonfly:partial-path</font> <em>str-partial-name</em>)</b><br/>
+ <br>Just like <tt>view-path</tt>, except for partials in <tt>PARTIALS_PATH</tt>.
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="Dragonfly_resource-path"></a><h3><font color=#CC0000>Dragonfly:resource-path</font></h3>
+<b>syntax: (<font color=#CC0000>Dragonfly:resource-path</font> <em>str-resource-name</em>)</b><br/>
+ <br>Similar to <tt>view-path</tt>, except for resources in <tt>RESOURCES_PATH</tt>.
+ Don't include the .lsp extension.
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="Dragonfly_include"></a><h3><font color=#CC0000>Dragonfly:include</font></h3>
+<b>syntax: (<font color=#CC0000>Dragonfly:include</font>)</b><br/>
+ <br>Like <tt>display-file</tt> but does not pass the file through <tt>eval-template</tt>.
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="Dragonfly_display-file"></a><h3><font color=#CC0000>Dragonfly:display-file</font></h3>
+<b>syntax: (<font color=#CC0000>Dragonfly:display-file</font>)</b><br/>
+ <br>String-concats its arguments and displays the file
+ at that path after passing it through <tt>eval-template</tt>.
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="Dragonfly_display-partial"></a><h3><font color=#CC0000>Dragonfly:display-partial</font></h3>
+<b>syntax: (<font color=#CC0000>Dragonfly:display-partial</font> <em>str-partial-name</em>)</b><br/>
+ Displays the partial named <em>str-partial-name</em> using <tt>display-file</tt> and <tt>partial-path</tt>.
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="Dragonfly_display-view"></a><h3><font color=#CC0000>Dragonfly:display-view</font></h3>
+<b>syntax: (<font color=#CC0000>Dragonfly:display-view</font> <em>str-view-name</em>)</b><br/>
+ Displays the view named <em>str-view-name</em> using <tt>display-file</tt> and <tt>view-path</tt>.
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="Dragonfly_display-error"></a><h3><font color=#CC0000>Dragonfly:display-error</font></h3>
+<b>syntax: (<font color=#CC0000>Dragonfly:display-error</font> <em>int-error-code</em>)</b><br/>
+ <br>Sends the <em>int-error-code</em> and, if it exists, displays the view named
+ <em>int-error-code</em> using <tt>display-view</tt>. Otherwise, displays the built-in error
+ template <tt>Dragonfly:ERROR_TEMPLATE</tt>.
 <br/><br/>
+ If an error is thrown with <tt>throw-error</tt>, this is automatically called
+ with an <em>int-error-code</em> of 500 (Internal Server Error).
+
 <br/><br/><center>- &sect; -</center><br/>
-<a name="Dragonfly_benchmark-start"></a><h3><font color=#CC0000>Dragonfly:benchmark-start</font></h3>
-<b>syntax: (<font color=#CC0000>Dragonfly:benchmark-start</font>)</b><br/>
- <p>Sets the start point for benchmarking.</p>
+<a name="Dragonfly_eval-template"></a><h3><font color=#CC0000>Dragonfly:eval-template</font></h3>
+<b>syntax: (<font color=#CC0000>Dragonfly:eval-template</font> <em>str</em> [<em>ctx</em>])</b><br/>
+<b>parameter: </b><em>str</em> - A string containing the template.<br/>
+<b>parameter: </b><em>ctx</em> - Optional. Represents the context the template is evaluted in. Defaults to Dragonfly.<br/>
+ <br>newLISP code in the template between the <tt>OPEN_TAG</tt> and <tt>CLOSE_TAG</tt> (see <tt>config.lsp</tt>) is
+ evaluated, and the result, along with the text outside of the "code islands" will be sent if no errors occur.
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="Dragonfly_die"></a><h3><font color=#CC0000>Dragonfly:die</font></h3>
+<b>syntax: (<font color=#CC0000>Dragonfly:die</font>)</b><br/>
+ <br>String-concats its arguments, logs them as an error via <tt>log-err</tt>, and calls
+ <tt>throw-error</tt> with the same string.
 <br/><br/>
-<br/><br/><center>- &sect; -</center><br/>
-<a name="Dragonfly_benchmark-end"></a><h3><font color=#CC0000>Dragonfly:benchmark-end</font></h3>
-<b>syntax: (<font color=#CC0000>Dragonfly:benchmark-end</font>)</b><br/>
- <p>Sets the end point for benchmarking and calculates the result in milliseconds plus
- some information about memory usage.</p>
-<br/><br/>
-<br/><br/><center>- &sect; -</center><br/>
-<a name="Dragonfly_debugging"></a><h3><font color=#CC0000>Dragonfly:debugging</font></h3>
-<b>syntax: (<font color=#CC0000>Dragonfly:debugging</font>)</b><br/>
- <p>Writes some debug information to the screen. Requires Web.lsp module for POST and GET information.</p>
-<br/><br/>
-<br/><br/><center>- &sect; -</center><br/>
-<a name="Dragonfly_template"></a><h3><font color=#CC0000>Dragonfly:template</font></h3>
-<b>syntax: (<font color=#CC0000>Dragonfly:template</font> <em>template</em>)</b><br/>
-<b>parameter: </b><em>template</em> - name of template<br/>
- <p>Evaluates the template and returns it.</p>
-<br/><br/>
-<br/><br/><center>- &sect; -</center><br/>
-<a name="Dragonfly_partial"></a><h3><font color=#CC0000>Dragonfly:partial</font></h3>
-<b>syntax: (<font color=#CC0000>Dragonfly:partial</font> <em>template</em>)</b><br/>
-<b>parameter: </b><em>template</em> - name of partial template<br/>
- <p>Evaluates the partial template and returns it.</p>
-<br/><br/>
-<br/><br/><center>- &sect; -</center><br/>
-<a name="Dragonfly_css"></a><h3><font color=#CC0000>Dragonfly:css</font></h3>
-<b>syntax: (<font color=#CC0000>Dragonfly:css</font> <em>css-media</em> <em>css-location</em>)</b><br/>
-<b>parameter: </b><em>css-media</em> - a string containing screen or print<br/>
-<b>parameter: </b><em>css-location</em> - the location of your stylesheet<br/>
- <p>Writes a standard stylesheet HTML tag.</p>
-<br/><br/>
-<br/><br/><center>- &sect; -</center><br/>
-<a name="Dragonfly_meta"></a><h3><font color=#CC0000>Dragonfly:meta</font></h3>
-<b>syntax: (<font color=#CC0000>Dragonfly:meta</font> <em>meta-name</em> <em>meta-content</em>)</b><br/>
-<b>parameter: </b><em>meta-name</em> - a string containing the meta-name<br/>
-<b>parameter: </b><em>meta-content</em> - a string containing the meta content<br/>
- <p>Writes a standard meta HTML tag.</p>
-<br/><br/>
-<br/><br/><center>- &sect; -</center><br/>
-<a name="Dragonfly_rss"></a><h3><font color=#CC0000>Dragonfly:rss</font></h3>
-<b>syntax: (<font color=#CC0000>Dragonfly:rss</font> <em>rss-title</em> <em>rss-location</em>)</b><br/>
-<b>parameter: </b><em>rss-title</em> - a string containing the rss title<br/>
-<b>parameter: </b><em>rss-location</em> - a string containing the rss location<br/>
- <p>Writes a standard RSS HTML tag.</p>
-<br/><br/>
-<br/><br/><center>- &sect; -</center><br/>
-<a name="Dragonfly_script"></a><h3><font color=#CC0000>Dragonfly:script</font></h3>
-<b>syntax: (<font color=#CC0000>Dragonfly:script</font> <em>script-location</em>)</b><br/>
-<b>parameter: </b><em>script-location</em> - a string containing the script location<br/>
- <p>Writes a standard script HTML tag.</p>
-<br/><br/>
-<br/><br/><center>- &sect; -</center><br/>
-<a name="Dragonfly_meta-iphone"></a><h3><font color=#CC0000>Dragonfly:meta-iphone</font></h3>
-<b>syntax: (<font color=#CC0000>Dragonfly:meta-iphone</font>)</b><br/>
- <p>Detects the iPhone and writes an apropiate META tag.</p>
-<br/><br/>
-<br/><br/><center>- &sect; -</center><br/>
-<a name="Dragonfly_compare-lists"></a><h3><font color=#CC0000>Dragonfly:compare-lists</font></h3>
-<b>syntax: (<font color=#CC0000>Dragonfly:compare-lists</font> <em>list1</em> <em>list2</em>)</b><br/>
-<b>parameter: </b><em>list1</em> - list number 1<br/>
-<b>parameter: </b><em>list2</em> - list number 2<br/>
- <p>Compares two lists and return the score of same and same position. This is a function by cormullion.</p>
-<br/><br/>
-<br/><br/><center>- &sect; -</center><br/>
-<a name="Dragonfly_google-analytics"></a><h3><font color=#CC0000>Dragonfly:google-analytics</font></h3>
-<b>syntax: (<font color=#CC0000>Dragonfly:google-analytics</font> <em>analytics-id</em>)</b><br/>
-<b>parameter: </b><em>analytics-id</em> - enter the specified id provided by Google Analytics, e.g. UA-123456-7<br/>
- <p>Writes the Google Analytics tracking code.</p>
-<br/><br/>
-<br/><br/><center>- &sect; -</center><br/>
-<a name="Dragonfly_todays-date-german"></a><h3><font color=#CC0000>Dragonfly:todays-date-german</font></h3>
-<b>syntax: (<font color=#CC0000>Dragonfly:todays-date-german</font> including actual time)</b><br/>
- <p>Writes todays date including time in german localization</p>
-<br/><br/>
-<br/><br/><center>- &sect; -</center><br/>
-<a name="Dragonfly_time-now"></a><h3><font color=#CC0000>Dragonfly:time-now</font></h3>
-<b>syntax: (<font color=#CC0000>Dragonfly:time-now</font>)</b><br/>
- <p>Writes the actual time</p>
-<br/><br/>
-<br/><br/><center>- &sect; -</center><br/>
-<a name="Dragonfly_image"></a><h3><font color=#CC0000>Dragonfly:image</font></h3>
-<b>syntax: (<font color=#CC0000>Dragonfly:image</font> <em>image_name</em> <em>image_url</em>, <em>options</em>)</b><br/>
-<b>parameter: </b><em>image_name</em> - a string containing the image alternative title<br/>
-<b>parameter: </b><em>image_url</em> - a string containing the url<br/>
-<b>parameter: </b><em>options</em> - optional settings like class, rel, width, height ...<br/>
- <p>Writes a standard HTML image.</p>
-<br/><br/>
-<br/><br/><center>- &sect; -</center><br/>
-<a name="Dragonfly_link_to"></a><h3><font color=#CC0000>Dragonfly:link_to</font></h3>
-<b>syntax: (<font color=#CC0000>Dragonfly:link_to</font> <em>link_name</em> <em>link_url</em>)</b><br/>
-<b>parameter: </b><em>link_name</em> - a string containing the link's name<br/>
-<b>parameter: </b><em>link_url</em> - a string containing the url<br/>
- <p>Writes a standard HTML link</p>
-<br/><br/>
-<br/><br/><center>- &sect; -</center><br/>
-<a name="Dragonfly_link_mailto"></a><h3><font color=#CC0000>Dragonfly:link_mailto</font></h3>
-<b>syntax: (<font color=#CC0000>Dragonfly:link_mailto</font> <em>link_name</em> <em>options</em>)</b><br/>
-<b>parameter: </b><em>name</em> - a string containing the link's name<br/>
-<b>parameter: </b><em>options</em> - a string containing the url<br/>
- <p>Writes a standard HTML mailto link</p>
-<br/><br/>
-<br/><br/><center>- &sect; -</center><br/>
-<a name="Dragonfly_form_open"></a><h3><font color=#CC0000>Dragonfly:form_open</font></h3>
-<b>syntax: (<font color=#CC0000>Dragonfly:form_open</font> <em>form_action</em> <form_method)</b><br/>
-<b>parameter: </b><em>name</em> - a string containing the form action<br/>
-<b>parameter: </b><em>name</em> - a string containing the form submit method POST/GET<br/>
- <p>Writes a standard form open element</p>
-<br/><br/>
-<br/><br/><center>- &sect; -</center><br/>
-<a name="Dragonfly_form_textfield"></a><h3><font color=#CC0000>Dragonfly:form_textfield</font></h3>
-<b>syntax: (<font color=#CC0000>Dragonfly:form_textfield</font> <em>form_name</em>)</b><br/>
-<b>parameter: </b><em>name</em> - a string containing the text field name<br/>
- <p>Writes a standard form field with size <tt>30</tt></p>
-<br/><br/>
-<br/><br/><center>- &sect; -</center><br/>
-<a name="Dragonfly_form_submit"></a><h3><font color=#CC0000>Dragonfly:form_submit</font></h3>
-<b>syntax: (<font color=#CC0000>Dragonfly:form_submit</font> <em>form_value</em>)</b><br/>
-<b>parameter: </b><em>value</em> - a string containing the value for the submit button<br/>
- <p>Writes a standard form submit button.</p>
-<br/><br/>
-<br/><br/><center>- &sect; -</center><br/>
-<a name="Dragonfly_form_hidden"></a><h3><font color=#CC0000>Dragonfly:form_hidden</font></h3>
-<b>syntax: (<font color=#CC0000>Dragonfly:form_hidden</font> <em>form_name</em> <em>form_value</em>)</b><br/>
-<b>parameter: </b><em>form_name</em> - a string containing the name for the hidden field<br/>
-<b>parameter: </b><em>form_value</em> - a string containing the value for the hidden field<br/>
- <p>Writes a standard form hidden field.</p>
-<br/><br/>
-<br/><br/><center>- &sect; -</center><br/>
-<a name="Dragonfly_form_close"></a><h3><font color=#CC0000>Dragonfly:form_close</font></h3>
-<b>syntax: (<font color=#CC0000>Dragonfly:form_close</font>)</b><br/>
- <p>Writes a form close tag</p>
-<br/><br/>
-<br/><br/><center>- &sect; -</center><br/>
-<a name="Dragonfly_form_generate-from-columns"></a><h3><font color=#CC0000>Dragonfly:form_generate-from-columns</font></h3>
-<b>syntax: (<font color=#CC0000>Dragonfly:form_generate-from-columns</font> <em>tablename</em>)</b><br/>
- <p>Generates a form including input field from the given table.
- The form uses POST Method and refers to itself. It includes one hidden
- field called dragonfly_form, to detect form submit.
- </p>
-<br/><br/>
-<br/><br/><center>- &sect; -</center><br/>
-<a name="Dragonfly_table_open"></a><h3><font color=#CC0000>Dragonfly:table_open</font></h3>
-<b>syntax: (<font color=#CC0000>Dragonfly:table_open</font> <em>head_elements</em>)</b><br/>
-<b>parameter: </b><em>head_elements</em> - a list containing the table head<br/>
- <p>Writes a standard table open element including a head, generated from a list.</p>
-<br/><br/>
-<br/><br/><center>- &sect; -</center><br/>
-<a name="Dragonfly_table_data"></a><h3><font color=#CC0000>Dragonfly:table_data</font></h3>
-<b>syntax: (<font color=#CC0000>Dragonfly:table_data</font> <em>table_elements</em>)</b><br/>
-<b>parameter: </b><em>table_elements</em> - a list containing all table elements (row by row, from left to right), including empty cells<br/>
- <p>Writes the table data generated from a list.</p>
-<br/><br/>
-<br/><br/><center>- &sect; -</center><br/>
-<a name="Dragonfly_table_footer"></a><h3><font color=#CC0000>Dragonfly:table_footer</font></h3>
-<b>syntax: (<font color=#CC0000>Dragonfly:table_footer</font> <em>table_footer_text</em>)</b><br/>
-<b>parameter: </b><em>table_footer_text</em> - a string containing the table footer text<br/>
- <p>Writes a standard table footer with number of colspan generated from the last table-head.</p>
-<br/><br/>
-<br/><br/><center>- &sect; -</center><br/>
-<a name="Dragonfly_table_close"></a><h3><font color=#CC0000>Dragonfly:table_close</font></h3>
-<b>syntax: (<font color=#CC0000>Dragonfly:table_close</font>)</b><br/>
- <p>Writes a standard table close element.</p>
-<br/><br/>
-<br/><br/><center>- &sect; -</center><br/>
-<a name="Dragonfly_show-database"></a><h3><font color=#CC0000>Dragonfly:show-database</font></h3>
-<b>syntax: (<font color=#CC0000>Dragonfly:show-database</font>)</b><br/>
- <p>Writes some information about the currently used nldb</p>
-<br/><br/>
-<br/><br/><center>- &sect; -</center><br/>
-<a name="Dragonfly_sqlite-open"></a><h3><font color=#CC0000>Dragonfly:sqlite-open</font></h3>
-<b>syntax: (<font color=#CC0000>Dragonfly:sqlite-open</font> <em>databasename</em>)</b><br/>
-<b>parameter: </b><em>databasename</em> - string containing the database name<br/>
- <p>Open the SQLite database or creates it, if it does not exist.</p>
-<br/><br/>
-<br/><br/><center>- &sect; -</center><br/>
-<a name="Dragonfly_sqlite-tables"></a><h3><font color=#CC0000>Dragonfly:sqlite-tables</font></h3>
-<b>syntax: (<font color=#CC0000>Dragonfly:sqlite-tables</font>)</b><br/>
- <p>Shows the existing tables in the current database.</p>
-<br/><br/>
-<br/><br/><center>- &sect; -</center><br/>
-<a name="Dragonfly_sqlite-columns"></a><h3><font color=#CC0000>Dragonfly:sqlite-columns</font></h3>
-<b>syntax: (<font color=#CC0000>Dragonfly:sqlite-columns</font>)</b><br/>
- <p>Shows the existing columns in a given table.</p>
-<br/><br/>
-<br/><br/><center>- &sect; -</center><br/>
-<a name="Dragonfly_twitter-search"></a><h3><font color=#CC0000>Dragonfly:twitter-search</font></h3>
-<b>syntax: (<font color=#CC0000>Dragonfly:twitter-search</font> <em>keyword</em>)</b><br/>
-<b>parameter: </b><em>keyword</em> - string containing the keyword for search<br/>
- <p>Writes the results of the search in nice speech bubbles.</p>
-<br/><br/>
+<b>see: </b>Dragonfly:display-error<br/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 
 <br/><br/><center>- &part; -</center><br/>
 <center><font face='Arial' size='-2' color='#444444'>

File example-site/dragonfly-framework/docs/dragonfly.lsp.src.html

-<!DOCTYPE HTML PUBLIC "4.01 Transitional"><html><title>Dragonfly</title><body><pre>
-<font color='#555555'>;; Copyright (c) 2009 Marc Hildmann</font>
-<font color='#555555'>;;</font>
-<font color='#555555'>;; Permission is hereby granted, free of charge, to any person obtaining</font>
-<font color='#555555'>;; a copy of this software and associated documentation files (the</font>
-<font color='#555555'>;; "Software"), to deal in the Software without restriction, including</font>
-<font color='#555555'>;; without limitation the rights to use, copy, modify, merge, publish,</font>
-<font color='#555555'>;; distribute, sublicense, and/or sell copies of the Software, and to</font>
-<font color='#555555'>;; permit persons to whom the Software is furnished to do so, subject to</font>
-<font color='#555555'>;; the following conditions:</font>
-<font color='#555555'>;;</font>
-<font color='#555555'>;; The above copyright notice and this permission notice shall be</font>
-<font color='#555555'>;; included in all copies or substantial portions of the Software.</font>
-
-<font color='#555555'>;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,</font>
-<font color='#555555'>;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF</font>
-<font color='#555555'>;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND</font>
-<font color='#555555'>;; NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE</font>
-<font color='#555555'>;; LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION</font>
-<font color='#555555'>;; OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION</font>
-<font color='#555555'>;; WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</font>
-
-<font color='#555555'>#!/usr/bin/newlisp</font>
-
-<font color='#555555'>;; <font color='#308080'>@module</font> Dragonfly</font>
-<font color='#555555'>;; <font color='#308080'>@author</font> Marc Hildmann &lt;marc.hildmann@gmail.com&gt;</font>
-<font color='#555555'>;; <font color='#308080'>@version</font> 0.12</font>
-<font color='#555555'>;; <font color='#308080'>@location</font> http://code.google.com/p/dragonfly-newlisp/</font>
-<font color='#555555'>;; <font color='#308080'>@description</font> A newLISP web framework for rapid web development</font>
-<font color='#555555'>;; </font>
-<font color='#555555'>;;</font>
-
-<font color='#555555'>;===============================================================================</font>
-<font color='#555555'>; !Loading used modules and defining new context</font>
-<font color='#555555'>;===============================================================================</font>
-
-<font color='#AA0000'>(</font><font color='#0000AA'>load</font> <font color='#008800'>"./modules/sqlite3.lsp"</font><font color='#AA0000'>)</font>
-
-<font color='#AA0000'>(</font><font color='#0000AA'>context</font> 'Dragonfly<font color='#AA0000'>)</font>
-
-<font color='#555555'>;; set constants for Dragonfly</font>
-<font color='#AA0000'>(</font><font color='#0000AA'>constant</font> 'DOCUMENT_ROOT <font color='#AA0000'>(</font><font color='#0000AA'>env</font> <font color='#008800'>"DOCUMENT_ROOT"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
-<font color='#AA0000'>(</font><font color='#0000AA'>constant</font> 'host <font color='#AA0000'>(</font><font color='#0000AA'>env</font> <font color='#008800'>"HTTP_HOST"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
-<font color='#AA0000'>(</font><font color='#0000AA'>constant</font> 'useragent <font color='#AA0000'>(</font><font color='#0000AA'>env</font> <font color='#008800'>"HTTP_USER_AGENT"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
-<font color='#AA0000'>(</font><font color='#0000AA'>constant</font> 'server <font color='#AA0000'>(</font><font color='#0000AA'>env</font> <font color='#008800'>"SERVER_SOFTWARE"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
-<font color='#AA0000'>(</font><font color='#0000AA'>constant</font> 'programfiles <font color='#AA0000'>(</font><font color='#0000AA'>env</font> <font color='#008800'>"PROGRAMFILES"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
-<font color='#AA0000'>(</font><font color='#0000AA'>constant</font> 'proxy <font color='#AA0000'>(</font><font color='#0000AA'>env</font> <font color='#008800'>"HTTP_PROXY"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
-
-<font color='#555555'>;; init symbols for Dragonfly listener</font>
-<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'templatename <font color='#008800'>""</font><font color='#AA0000'>)</font>
-<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'action <font color='#008800'>""</font><font color='#AA0000'>)</font>
-
-
-<font color='#555555'>;===============================================================================</font>
-<font color='#555555'>; !Base Functions</font>
-<font color='#555555'>;===============================================================================</font>
-
-
-<font color='#555555'>;; <font color='#308080'>@syntax</font> (Dragonfly:listener)</font>
-<font color='#555555'>;; &lt;p&gt;The Dragonfly listener parses the QUERY STRING</font>
-<font color='#555555'>;; for the specified template and action.&lt;/p&gt;</font>
-<font color='#555555'>;;</font>
-<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>listener<font color='#AA0000'>)</font>	
-
-		<font color='#555555'>;; output HTML header</font>
-		<font color='#AA0000'>(</font>Web:header <font color='#008800'>"Content-Type"</font> <font color='#008800'>"text/html"</font><font color='#AA0000'>)</font>
-		<font color='#AA0000'>(</font>Web:send-headers<font color='#AA0000'>)</font>
-		
-		<font color='#AA0000'>(</font><font color='#0000AA'>if</font> <font color='#AA0000'>(</font><font color='#0000AA'>empty?</font> <font color='#AA0000'>(</font><font color='#0000AA'>env</font> <font color='#008800'>"QUERY_STRING"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
-			<font color='#555555'>;; if there is no query show default template		</font>
-			<font color='#AA0000'>(</font>Dragonfly:template <font color='#008800'>"welcome"</font><font color='#AA0000'>)</font>				
-		<font color='#AA0000'>)</font> 
-			
-		<font color='#555555'>;; else there must be a string which we'll parse	</font>
-		<font color='#555555'>;; Regex for parsing templatename and action</font>
-		<font color='#AA0000'>(</font><font color='#0000AA'>constant</font> 'regex-querystring <font color='#008800'>"(.*)/(.*)"</font><font color='#AA0000'>)</font>			
-		<font color='#AA0000'>(</font><font color='#0000AA'>regex</font> regex-querystring <font color='#AA0000'>(</font><font color='#0000AA'>env</font> <font color='#008800'>"QUERY_STRING"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
-		<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'templatename $1<font color='#AA0000'>)</font>
-		<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'action $2<font color='#AA0000'>)</font>
-		<font color='#AA0000'>(</font>Dragonfly:template templatename<font color='#AA0000'>)</font>										
-			
-<font color='#AA0000'>)</font>
-
-<font color='#555555'>;; <font color='#308080'>@syntax</font> (Dragonfly:benchmark-start)</font>
-<font color='#555555'>;; &lt;p&gt;Sets the start point for benchmarking.&lt;/p&gt;</font>
-<font color='#555555'>;; </font>
-<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>benchmark-start<font color='#AA0000'>)</font>
-	<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'microtime-start <font color='#AA0000'>(</font><font color='#0000AA'>time-of-day</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
-<font color='#AA0000'>)</font>
-
-<font color='#555555'>;; <font color='#308080'>@syntax</font> (Dragonfly:benchmark-end)</font>
-<font color='#555555'>;; &lt;p&gt;Sets the end point for benchmarking and calculates the result in milliseconds plus</font>
-<font color='#555555'>;; some information about memory usage.&lt;/p&gt;</font>
-<font color='#555555'>;; </font>
-<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>benchmark-result<font color='#AA0000'>)</font>
-
-  	<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'mem_cells_bytes <font color='#AA0000'>(</font><font color='#0000AA'>*</font> <font color='#AA0000'>(</font><font color='#0000AA'>sys-info</font> <font color='#665500'>0</font><font color='#AA0000'>)</font> <font color='#665500'>16</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
-  	<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'mem_cells_kilobytes <font color='#AA0000'>(</font><font color='#0000AA'>/</font> mem_cells_bytes <font color='#665500'>1024</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
-
-  	<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'mem_cells-constant_bytes <font color='#AA0000'>(</font><font color='#0000AA'>*</font> <font color='#AA0000'>(</font><font color='#0000AA'>sys-info</font> <font color='#665500'>1</font><font color='#AA0000'>)</font> <font color='#665500'>16</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
-  	<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'mem_cells-constant_kilobytes <font color='#AA0000'>(</font><font color='#0000AA'>/</font> mem_cells-constant_bytes <font color='#665500'>1024</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
-  	<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'mem_cells-constant_megabytes <font color='#AA0000'>(</font><font color='#0000AA'>/</font> mem_cells-constant_kilobytes <font color='#665500'>1024</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
-
-  	<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'mem_symbols_bytes <font color='#AA0000'>(</font><font color='#0000AA'>*</font> <font color='#AA0000'>(</font><font color='#0000AA'>sys-info</font> <font color='#665500'>2</font><font color='#AA0000'>)</font> <font color='#665500'>32</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
-  	<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'mem_symbols_kilobytes <font color='#AA0000'>(</font><font color='#0000AA'>/</font> mem_symbols_bytes <font color='#665500'>1024</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
-
-    <font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'mem_total_usage <font color='#AA0000'>(</font><font color='#0000AA'>+</font> mem_cells_kilobytes mem_symbols_kilobytes<font color='#AA0000'>)</font><font color='#AA0000'>)</font>
-  
-	<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'microtime-end <font color='#AA0000'>(</font><font color='#0000AA'>time-of-day</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
-	<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'execution-time-milliseconds <font color='#AA0000'>(</font><font color='#0000AA'>-</font> microtime-end microtime-start<font color='#AA0000'>)</font><font color='#AA0000'>)</font>
-	<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'execution-time-seconds <font color='#AA0000'>(</font><font color='#0000AA'>div</font> execution-time-milliseconds <font color='#665500'>1000</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
-	<font color='#AA0000'>(</font><font color='#0000AA'>println</font> <font color='#008800'>"&lt;div id='dragonfly_benchmark'>Rendered in "</font>execution-time-milliseconds<font color='#008800'>" milliseconds. Used "</font>mem_total_usage<font color='#008800'>" KB.&lt;br/&gt;&lt;div id='dragonfly_logo'>&lt;a href='http://code.google.com/p/dragonfly-newlisp/'>&amp;mdash&#059;()o Dragonfly &lt;span class='dragonfly_uppercase'>web framework&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;"</font><font color='#AA0000'>)</font>
-<font color='#AA0000'>)</font>
-
-<font color='#555555'>;; <font color='#308080'>@syntax</font> (Dragonfly:debugging)</font>
-<font color='#555555'>;; &lt;p&gt;Writes some debug information to the screen. Requires Web.lsp module for POST and GET information.&lt;/p&gt;</font>
-<font color='#555555'>;; </font>
-<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>debugging<font color='#AA0000'>)</font>
-
-  <font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'mem_cells_bytes <font color='#AA0000'>(</font><font color='#0000AA'>*</font> <font color='#AA0000'>(</font><font color='#0000AA'>sys-info</font> <font color='#665500'>0</font><font color='#AA0000'>)</font> <font color='#665500'>16</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
-  <font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'mem_cells_kilobytes <font color='#AA0000'>(</font><font color='#0000AA'>/</font> mem_cells_bytes <font color='#665500'>1024</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
-
-  <font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'mem_cells-constant_bytes <font color='#AA0000'>(</font><font color='#0000AA'>*</font> <font color='#AA0000'>(</font><font color='#0000AA'>sys-info</font> <font color='#665500'>1</font><font color='#AA0000'>)</font> <font color='#665500'>16</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
-  <font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'mem_cells-constant_kilobytes <font color='#AA0000'>(</font><font color='#0000AA'>/</font> mem_cells-constant_bytes <font color='#665500'>1024</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
-  <font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'mem_cells-constant_megabytes <font color='#AA0000'>(</font><font color='#0000AA'>/</font> mem_cells-constant_kilobytes <font color='#665500'>1024</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
-
-  <font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'mem_symbols_bytes <font color='#AA0000'>(</font><font color='#0000AA'>*</font> <font color='#AA0000'>(</font><font color='#0000AA'>sys-info</font> <font color='#665500'>2</font><font color='#AA0000'>)</font> <font color='#665500'>32</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
-  <font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'mem_symbols_kilobytes <font color='#AA0000'>(</font><font color='#0000AA'>/</font> mem_symbols_bytes <font color='#665500'>1024</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
-
-  <font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'mem_total_usage <font color='#AA0000'>(</font><font color='#0000AA'>+</font> mem_cells_kilobytes mem_symbols_kilobytes<font color='#AA0000'>)</font><font color='#AA0000'>)</font>
-
-
-
-  <font color='#AA0000'>(</font><font color='#0000AA'>println</font> "
-	&lt;div id='dragonfly_debug' style='border:1px dotted #00aeef<font color='#555555'>; width:700px; padding:8px; margin-top:20px;' ></font>
-	&lt;h2&gt;Dragonfly DEBUG information&lt;/h2&gt;
-	&lt;h3&gt;HOST&lt;/h3&gt;<font color='#008800'>"host"</font>
-	&lt;h3&gt;DOCUMENT ROOT&lt;/h3&gt;<font color='#008800'>"DOCUMENT_ROOT"</font>
-	&lt;h3&gt;Windows Programfiles&lt;/h3&gt;<font color='#008800'>"programfiles"</font>
-	&lt;h3&gt;QUERY&lt;/h3&gt;<font color='#008800'>"</font>QUERY_STRING<font color='#008800'>"</font>
-	&lt;h3&gt;TEMPLATENAME&lt;/h3&gt;<font color='#008800'>"templatename"</font>
-	&lt;h3&gt;ACTION&lt;/h3&gt;<font color='#008800'>"action"</font>
-	&lt;h3&gt;USER-AGENT&lt;/h3&gt;<font color='#008800'>"useragent"</font>
-	&lt;h3&gt;Proxy&lt;/h3&gt;<font color='#008800'>"proxy"</font>
-	&lt;h3&gt;SERVER&lt;/h3&gt;<font color='#008800'>"server"</font>
-	&lt;h3&gt;POST&lt;/h3&gt;<font color='#008800'>"Web:POST"</font>
-	&lt;h3&gt;GET&lt;/h3&gt;<font color='#008800'>"Web:GET"</font>
-	&lt;h3&gt;System information&lt;/h3&gt;
-	&lt;ul&gt;
-		&lt;li&gt;Total memory usage: <font color='#008800'>"mem_total_usage"</font> KB&lt;/li&gt;	
-		&lt;li&gt;Number of Lisp Cells <font color='#AA0000'>(</font><font color='#665500'>16</font> bytes per cell<font color='#AA0000'>)</font><font color='#0000AA'>:</font> <font color='#008800'>"(sys-info 0)"</font>&lt;/li&gt;
-		&lt;li&gt;Memory used by Lisp Cells: <font color='#008800'>"mem_cells_kilobytes"</font> KB&lt;/li&gt;
-		&lt;li&gt;Maximum number of Lisp cells constant: <font color='#008800'>"(sys-info 1)"</font>&lt;/li&gt;
-		&lt;li&gt;Maximum memory used by Lisp cells constant: <font color='#008800'>"mem_cells-constant_megabytes"</font> MB&lt;/li&gt;
-		&lt;li&gt;Number of <font color='#0000AA'>symbols</font> <font color='#AA0000'>(</font><font color='#665500'>32</font> bytes per symbol<font color='#AA0000'>)</font><font color='#0000AA'>:</font> <font color='#008800'>"(sys-info 2)"</font>&lt;/li&gt;
-		&lt;li&gt;Memory used by symbols: <font color='#008800'>"mem_symbols_kilobytes"</font> KB&lt;/li&gt;
-		&lt;li&gt;Evaluation/recursion level: <font color='#008800'>"(sys-info 3)"</font>&lt;/li&gt;
-		&lt;li&gt;Environment stack level: <font color='#008800'>"(sys-info 4)"</font>&lt;/li&gt;
-		&lt;li&gt;Maximum call stack constant: <font color='#008800'>"(sys-info 5)"</font>&lt;/li&gt;
-		&lt;li&gt;Pid of running newLISP process: <font color='#008800'>"(sys-info 6)"</font>&lt;/li&gt;
-		&lt;li&gt;Version number as an <font color='#0000AA'>integer</font> constant: <font color='#008800'>"(sys-info 7)"</font>&lt;/li&gt;
-		&lt;li&gt;Operating system constant: <font color='#008800'>"(sys-info 8)"</font>&lt;/li&gt;
-		&lt;li&gt;Used <font color='#0000AA'>symbols</font> in Dragonfly: &lt;pre&gt;<font color='#008800'>"(symbols 'Dragonfly)"</font>&lt;/pre&gt;&lt;/li&gt;
-		&lt;li&gt;Last system error: <font color='#008800'>"(sys-error)"</font>&lt;/li&gt;
-	&lt;/ul&gt;
-	
-	&lt;/div&gt;"<font color='#AA0000'>)</font>
-<font color='#AA0000'>)</font>
-
-
-<font color='#555555'>;; <font color='#308080'>@syntax</font> (Dragonfly:template &lt;template&gt;)</font>
-<font color='#555555'>;; <font color='#308080'>@param</font> &lt;template&gt; name of template</font>
-<font color='#555555'>;; &lt;p&gt;Evaluates the template and returns it.&lt;/p&gt;</font>
-<font color='#555555'>;; </font>
-<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>template template<font color='#AA0000'>)</font>
-	<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'path-to-templates <font color='#008800'>"./templates/"</font><font color='#AA0000'>)</font>	
-	<font color='#555555'>;;(println path-to-templates)</font>
-  	<font color='#AA0000'>(</font><font color='#0000AA'>push</font> template path-to-templates <font color='#665500'>-1</font><font color='#AA0000'>)</font>
-  	<font color='#AA0000'>(</font>Web:eval-template <font color='#AA0000'>(</font><font color='#0000AA'>read-file</font> path-to-templates<font color='#AA0000'>)</font><font color='#AA0000'>)</font>
-<font color='#AA0000'>)</font>
-
-<font color='#555555'>;; <font color='#308080'>@syntax</font> (display-partial &lt;template&gt;)</font>
-<font color='#555555'>;; <font color='#308080'>@param</font> &lt;template&gt; name of partial template</font>
-<font color='#555555'>;; &lt;p&gt;Evaluates the partial template and returns it.&lt;/p&gt;</font>
-<font color='#555555'>;; </font>
-<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>partial template<font color='#AA0000'>)</font>
-	<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'path-to-partials <font color='#008800'>"./templates/partials/"</font><font color='#AA0000'>)</font>	
-  	<font color='#AA0000'>(</font><font color='#0000AA'>push</font> template path-to-partials <font color='#665500'>-1</font><font color='#AA0000'>)</font>
-  	<font color='#AA0000'>(</font>Web:eval-template <font color='#AA0000'>(</font><font color='#0000AA'>read-file</font> path-to-partials<font color='#AA0000'>)</font><font color='#AA0000'>)</font>
-<font color='#AA0000'>)</font>
-
-
-<font color='#555555'>;; <font color='#308080'>@syntax</font> (Dragonfly:css &lt;css-media&gt; &lt;css-location&gt;)</font>
-<font color='#555555'>;; <font color='#308080'>@param</font> &lt;css-media&gt; a string containing screen or print</font>
-<font color='#555555'>;; <font color='#308080'>@param</font> &lt;css-location&gt; the location of your stylesheet</font>
-<font color='#555555'>;; &lt;p&gt;Writes a standard stylesheet HTML tag.&lt;/p&gt;</font>
-<font color='#555555'>;; </font>
-<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>css css-media css-location<font color='#AA0000'>)</font>
-  <font color='#AA0000'>(</font><font color='#0000AA'>print</font> <font color='#008800'>"&lt;link rel='stylesheet' type='text/css' media='"</font>css-media<font color='#008800'>"' href='"</font>css-location<font color='#008800'>"' /&gt;"</font><font color='#AA0000'>)</font>
-<font color='#AA0000'>)</font>
-
-<font color='#555555'>;; <font color='#308080'>@syntax</font> (Dragonfly:meta &lt;meta-name&gt; &lt;meta-content&gt;)</font>
-<font color='#555555'>;; <font color='#308080'>@param</font> &lt;meta-name&gt; a string containing the meta-name</font>
-<font color='#555555'>;; <font color='#308080'>@param</font> &lt;meta-content&gt; a string containing the meta content</font>
-<font color='#555555'>;; &lt;p&gt;Writes a standard meta HTML tag.&lt;/p&gt;</font>
-<font color='#555555'>;; </font>
-<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>meta meta-name meta-content<font color='#AA0000'>)</font>
-  <font color='#AA0000'>(</font><font color='#0000AA'>print</font> <font color='#008800'>"&lt;meta name='"</font>meta-name<font color='#008800'>"' content='"</font>meta-content<font color='#008800'>"' /&gt;"</font><font color='#AA0000'>)</font>
-<font color='#AA0000'>)</font>
-
-<font color='#555555'>;; <font color='#308080'>@syntax</font> (Dragonfly:rss &lt;rss-title&gt; &lt;rss-location&gt;)</font>
-<font color='#555555'>;; <font color='#308080'>@param</font> &lt;rss-title&gt; a string containing the rss title</font>
-<font color='#555555'>;; <font color='#308080'>@param</font> &lt;rss-location&gt; a string containing the rss location</font>
-<font color='#555555'>;; &lt;p&gt;Writes a standard RSS HTML tag.&lt;/p&gt;</font>
-<font color='#555555'>;; </font>
-<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>rss rss-title rss-location<font color='#AA0000'>)</font>
-  <font color='#AA0000'>(</font><font color='#0000AA'>print</font> <font color='#008800'>"&lt;link rel='alternate' type='application/rss+xml' title='"</font>rss-title<font color='#008800'>"' href='"</font>rss-location<font color='#008800'>"' /&gt;"</font><font color='#AA0000'>)</font>
-<font color='#AA0000'>)</font>
-
-<font color='#555555'>;; <font color='#308080'>@syntax</font> (Dragonfly:script &lt;script-location&gt;)</font>
-<font color='#555555'>;; <font color='#308080'>@param</font> &lt;script-location&gt; a string containing the script location</font>
-<font color='#555555'>;; &lt;p&gt;Writes a standard script HTML tag.&lt;/p&gt;</font>
-<font color='#555555'>;; </font>
-<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>script script-location<font color='#AA0000'>)</font>
-  <font color='#AA0000'>(</font><font color='#0000AA'>print</font> <font color='#008800'>"&lt;script type='text/javascript' src='"</font>script-location<font color='#008800'>"'>&lt;/script&gt;"</font><font color='#AA0000'>)</font>
-<font color='#AA0000'>)</font>
-
-<font color='#555555'>;; <font color='#308080'>@syntax</font> (Dragonfly:meta-iphone)</font>
-<font color='#555555'>;; &lt;p&gt;Detects the iPhone and writes an apropiate META tag.&lt;/p&gt;</font>
-<font color='#555555'>;; </font>
-<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>meta-iphone<font color='#AA0000'>)</font>
-  <font color='#AA0000'>(</font><font color='#0000AA'>print</font> <font color='#008800'>"&lt;meta name='viewport' content='width=320, user-scalable=no' /&gt;"</font><font color='#AA0000'>)</font>
-<font color='#AA0000'>)</font>
-
-
-
-<font color='#555555'>;; <font color='#308080'>@syntax</font> (Dragonfly:compare-lists &lt;list1&gt; &lt;list2&gt;)</font>
-<font color='#555555'>;; <font color='#308080'>@param</font> &lt;list1&gt; list number 1</font>
-<font color='#555555'>;; <font color='#308080'>@param</font> &lt;list2&gt; list number 2</font>
-<font color='#555555'>;; &lt;p&gt;Compares two lists and return the score of same and same position. This is a function by cormullion.&lt;/p&gt;</font>
-<font color='#555555'>;;</font>
-<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>compare-lists list1 list2<font color='#AA0000'>)</font>
-	<font color='#AA0000'>(</font><font color='#0000AA'>print</font> <font color='#008800'>"Comparing "</font> list1 <font color='#008800'>" and "</font> list2 <font color='#008800'>" ..."</font><font color='#AA0000'>)</font>
-	<font color='#AA0000'>(</font><font color='#0000AA'>print</font> <font color='#008800'>" "</font><font color='#AA0000'>(</font><font color='#0000AA'>first</font> <font color='#AA0000'>(</font><font color='#0000AA'>count</font> '<font color='#AA0000'>(</font><font color='#0000AA'>true</font><font color='#AA0000'>)</font> <font color='#AA0000'>(</font><font color='#0000AA'>map</font> <font color='#0000AA'>=</font> list1 list2<font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font> <font color='#008800'>" elements are the same and in the same position."</font><font color='#AA0000'>)</font>
-<font color='#AA0000'>)</font>
-
-<font color='#555555'>;; <font color='#308080'>@syntax</font> (Dragonfly:google-analytics &lt;analytics-id&gt;)</font>
-<font color='#555555'>;; <font color='#308080'>@param</font> &lt;analytics-id&gt; enter the specified id provided by Google Analytics, e.g. UA-123456-7</font>
-<font color='#555555'>;; &lt;p&gt;Writes the Google Analytics tracking code.&lt;/p&gt;</font>
-<font color='#555555'>;;</font>
-<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>google-analytics analytics-id<font color='#AA0000'>)</font>
-	<font color='#AA0000'>(</font><font color='#0000AA'>print</font> "
-	&lt;script type=&#092;&#034;text/javascript&#092;&#034;>
-		var gaJsHost <font color='#0000AA'>=</font> <font color='#AA0000'>(</font><font color='#AA0000'>(</font>&#092;&#034;https:&#092;&#034; == document.location.protocol<font color='#AA0000'>)</font> ? &#092;&#034;https://ssl.&#092;&#034; <font color='#0000AA'>:</font> &#092;&#034;http://www.&#092;&#034;<font color='#AA0000'>)</font><font color='#555555'>;</font>
-		document.write<font color='#AA0000'>(</font>unescape<font color='#AA0000'>(</font>&#092;&#034;%3Cscript src='&#092;&#034; <font color='#0000AA'>+</font> gaJsHost <font color='#0000AA'>+</font> &#092;&#034;google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E&#092;&#034;<font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#555555'>;</font>
-		&lt;/script&gt;
-		&lt;script type=&#092;&#034;text/javascript&#092;&#034;>
-		try {
-			var pageTracker <font color='#0000AA'>=</font> _gat._getTracker<font color='#AA0000'>(</font>&#092;&#034;<font color='#008800'>"analytics-id"</font>&#092;&#034;<font color='#AA0000'>)</font><font color='#555555'>;</font>
-			pageTracker._trackPageview<font color='#AA0000'>(</font><font color='#AA0000'>)</font><font color='#555555'>;</font>
-		} <font color='#0000AA'>catch</font><font color='#AA0000'>(</font>err<font color='#AA0000'>)</font> <font color='#008800'>{}</font>
-	&lt;/script&gt;				
-	"<font color='#AA0000'>)</font>
-<font color='#AA0000'>)</font>
-
-
-
-<font color='#555555'>;===============================================================================</font>
-<font color='#555555'>; !Date Functions</font>
-<font color='#555555'>;===============================================================================</font>
-
-<font color='#555555'>;; <font color='#308080'>@syntax</font> (Dragonfly:todays-date-german including actual time)</font>
-<font color='#555555'>;; &lt;p&gt;Writes todays date including time in german localization&lt;/p&gt;</font>
-<font color='#555555'>;; </font>
-<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>todays-date-german<font color='#AA0000'>)</font>
-	<font color='#AA0000'>(</font><font color='#0000AA'>set-locale</font> <font color='#008800'>"de_DE"</font><font color='#AA0000'>)</font>
-	<font color='#AA0000'>(</font><font color='#0000AA'>print</font> <font color='#AA0000'>(</font><font color='#0000AA'>date</font> <font color='#AA0000'>(</font><font color='#0000AA'>date-value</font><font color='#AA0000'>)</font> <font color='#665500'>0</font> <font color='#008800'>"%A, den %d. %B %Y um %H:%M:%S Uhr"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
-<font color='#AA0000'>)</font>
-
-<font color='#555555'>;; <font color='#308080'>@syntax</font> (Dragonfly:time-now)</font>
-<font color='#555555'>;; &lt;p&gt;Writes the actual time&lt;/p&gt;</font>
-<font color='#555555'>;; </font>
-<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>time-now<font color='#AA0000'>)</font>
-	<font color='#AA0000'>(</font><font color='#0000AA'>print</font> <font color='#AA0000'>(</font><font color='#0000AA'>date</font> <font color='#AA0000'>(</font><font color='#0000AA'>date-value</font><font color='#AA0000'>)</font> <font color='#665500'>0</font> <font color='#008800'>"%H:%M:%S"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
-<font color='#AA0000'>)</font>
-
-
-<font color='#555555'>;===============================================================================</font>
-<font color='#555555'>; !Image Functions</font>
-<font color='#555555'>;===============================================================================</font>
-
-<font color='#555555'>;; <font color='#308080'>@syntax</font> (Dragonfly:image &lt;image_name&gt; &lt;image_url&gt;, &lt;options&gt;)</font>
-<font color='#555555'>;; <font color='#308080'>@param</font> &lt;image_name&gt; a string containing the image alternative title</font>
-<font color='#555555'>;; <font color='#308080'>@param</font> &lt;image_url&gt; a string containing the url</font>
-<font color='#555555'>;; <font color='#308080'>@param</font> &lt;options&gt; optional settings like class, rel, width, height ...</font>
-<font color='#555555'>;; &lt;p&gt;Writes a standard HTML image.&lt;/p&gt;</font>
-<font color='#555555'>;; </font>
-<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>image image-name image-url, image-options<font color='#AA0000'>)</font>
-  <font color='#AA0000'>(</font><font color='#0000AA'>print</font> <font color='#008800'>"&lt;img src='"</font>image-url<font color='#008800'>"' alt='"</font>image-name<font color='#008800'>"' title='"</font>image-name<font color='#008800'>"' border='0' "</font>image-options<font color='#008800'>" /&gt;"</font><font color='#AA0000'>)</font>
-<font color='#AA0000'>)</font>
-
-
-<font color='#555555'>;===============================================================================</font>
-<font color='#555555'>; !Link Functions</font>
-<font color='#555555'>;===============================================================================</font>
-
-<font color='#555555'>;; <font color='#308080'>@syntax</font> (Dragonfly:link_to &lt;link_name&gt; &lt;link_url&gt;)</font>
-<font color='#555555'>;; <font color='#308080'>@param</font> &lt;link_name&gt; a string containing the link's name</font>
-<font color='#555555'>;; <font color='#308080'>@param</font> &lt;link_url&gt; a string containing the url</font>
-<font color='#555555'>;; &lt;p&gt;Writes a standard HTML link&lt;/p&gt;</font>
-<font color='#555555'>;; </font>
-<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>link_to link-name link-url<font color='#AA0000'>)</font>
-  <font color='#AA0000'>(</font><font color='#0000AA'>print</font> <font color='#008800'>"&lt;a href='"</font>link-url<font color='#008800'>"'>"</font>link-name<font color='#008800'>"&lt;/a&gt;"</font><font color='#AA0000'>)</font>
-<font color='#AA0000'>)</font>
-
-<font color='#555555'>;; <font color='#308080'>@syntax</font> (Dragonfly:link_mailto &lt;link_name&gt; &lt;options&gt;)</font>
-<font color='#555555'>;; <font color='#308080'>@param</font> &lt;name&gt; a string containing the link's name</font>
-<font color='#555555'>;; <font color='#308080'>@param</font> &lt;options&gt; a string containing the url</font>
-<font color='#555555'>;; &lt;p&gt;Writes a standard HTML mailto link&lt;/p&gt;</font>
-<font color='#555555'>;; </font>
-<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>link_mailto link-name link-url<font color='#AA0000'>)</font>
-  <font color='#AA0000'>(</font><font color='#0000AA'>print</font> <font color='#008800'>"&lt;a href='mailto:"</font>link-url<font color='#008800'>"'>"</font>link-name<font color='#008800'>"&lt;/a&gt;"</font><font color='#AA0000'>)</font>
-<font color='#AA0000'>)</font>
-
-
-<font color='#555555'>;===============================================================================</font>
-<font color='#555555'>; !Form Functions</font>
-<font color='#555555'>;===============================================================================</font>
-
-<font color='#555555'>;; <font color='#308080'>@syntax</font> (Dragonfly:form_open &lt;form_action&gt; &lt;form_method)</font>
-<font color='#555555'>;; <font color='#308080'>@param</font> &lt;name&gt; a string containing the form action</font>
-<font color='#555555'>;; <font color='#308080'>@param</font> &lt;name&gt; a string containing the form submit method POST/GET</font>
-<font color='#555555'>;; &lt;p&gt;Writes a standard form open element&lt;/p&gt;</font>
-<font color='#555555'>;; </font>
-<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>form-open form_action form_method<font color='#AA0000'>)</font>
-  <font color='#AA0000'>(</font><font color='#0000AA'>print</font> <font color='#008800'>"&lt;table&gt;&lt;form action='"</font>form_action<font color='#008800'>"' method='"</font>form_method<font color='#008800'>"'>"</font><font color='#AA0000'>)</font>
-<font color='#AA0000'>)</font>
-
-<font color='#555555'>;; <font color='#308080'>@syntax</font> (Dragonfly:form_textfield &lt;form_name&gt;)</font>
-<font color='#555555'>;; <font color='#308080'>@param</font> &lt;name&gt; a string containing the text field name</font>
-<font color='#555555'>;; &lt;p&gt;Writes a standard form field with size '30'&lt;/p&gt;</font>
-<font color='#555555'>;; </font>
-<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>form-textfield form_name<font color='#AA0000'>)</font>
-  <font color='#AA0000'>(</font><font color='#0000AA'>print</font> <font color='#008800'>"&lt;tr class='form_row'>&lt;td class='form_label'>&lt;label for='"</font>form_name<font color='#008800'>"'>"</font><font color='#AA0000'>(</font><font color='#0000AA'>title-case</font> form_name<font color='#AA0000'>)</font><font color='#008800'>"&lt;/label&gt;&lt;/td&gt;&lt;td class='form_input'>&lt;input id='"</font>form_name<font color='#008800'>"' name='"</font>form_name<font color='#008800'>"' size='30' type='text' /&gt;&lt;/td&gt;&lt;/tr&gt;"</font><font color='#AA0000'>)</font>
-<font color='#AA0000'>)</font>
-
-<font color='#555555'>;; <font color='#308080'>@syntax</font> (Dragonfly:form_submit &lt;form_value&gt;)</font>
-<font color='#555555'>;; <font color='#308080'>@param</font> &lt;value&gt; a string containing the value for the submit button</font>
-<font color='#555555'>;; &lt;p&gt;Writes a standard form submit button.&lt;/p&gt;</font>
-<font color='#555555'>;; </font>
-<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>form-submit form_value<font color='#AA0000'>)</font>
-  <font color='#AA0000'>(</font><font color='#0000AA'>print</font> <font color='#008800'>"&lt;tr class='form_row'>&lt;td class='form_label'>&amp;nbsp&#059;&lt;/td&gt;&lt;td class='form_input'>&lt;input id='commit' type='submit' value='"</font>form_value<font color='#008800'>"' /&gt;&lt;/td&gt;&lt;/tr&gt;"</font><font color='#AA0000'>)</font>
-<font color='#AA0000'>)</font>
-
-<font color='#555555'>;; <font color='#308080'>@syntax</font> (Dragonfly:form_hidden &lt;form_name&gt; &lt;form_value&gt;)</font>
-<font color='#555555'>;; <font color='#308080'>@param</font> &lt;form_name&gt; a string containing the name for the hidden field</font>
-<font color='#555555'>;; <font color='#308080'>@param</font> &lt;form_value&gt; a string containing the value for the hidden field</font>
-<font color='#555555'>;; &lt;p&gt;Writes a standard form hidden field.&lt;/p&gt;</font>
-<font color='#555555'>;; </font>
-<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>form-hidden form_name form_value<font color='#AA0000'>)</font>
-  <font color='#AA0000'>(</font><font color='#0000AA'>print</font> <font color='#008800'>"&lt;input type='hidden' name='"</font>form_name<font color='#008800'>"' value='"</font>form_value<font color='#008800'>"' /&gt;"</font><font color='#AA0000'>)</font>
-<font color='#AA0000'>)</font>
-
-<font color='#555555'>;; <font color='#308080'>@syntax</font> (Dragonfly:form_close)</font>
-<font color='#555555'>;; &lt;p&gt;Writes a form close tag&lt;/p&gt;</font>
-<font color='#555555'>;; </font>
-<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>form-close<font color='#AA0000'>)</font>
-  <font color='#AA0000'>(</font><font color='#0000AA'>print</font> <font color='#008800'>"&lt;/form&gt;&lt;/table&gt;"</font><font color='#AA0000'>)</font>
-<font color='#AA0000'>)</font>
-
-<font color='#555555'>;; <font color='#308080'>@syntax</font> (Dragonfly:form_generate-from-columns &lt;tablename&gt;)</font>
-<font color='#555555'>;; &lt;p&gt;Generates a form including input field from the given table.</font>
-<font color='#555555'>;; The form uses POST Method and refers to itself. It includes one hidden</font>
-<font color='#555555'>;; field called dragonfly_form, to detect form submit.</font>
-<font color='#555555'>;; &lt;/p&gt;</font>
-<font color='#555555'>;; </font>
-<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>form-generate-from-columns table<font color='#AA0000'>)</font>
-  <font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'columns <font color='#AA0000'>(</font>sql3:columns table<font color='#AA0000'>)</font><font color='#AA0000'>)</font>
-  <font color='#AA0000'>(</font><font color='#0000AA'>print</font> <font color='#008800'>"&lt;table&gt;&lt;form id='form_"</font>table<font color='#008800'>"' action='./?"</font>templatename<font color='#008800'>"/"</font>find<font color='#008800'>"' method='POST'>"</font><font color='#AA0000'>)</font>
-	<font color='#AA0000'>(</font><font color='#0000AA'>dolist</font> <font color='#AA0000'>(</font>column_name columns<font color='#AA0000'>)</font>
-		<font color='#AA0000'>(</font><font color='#0000AA'>print</font> <font color='#008800'>"&lt;tr class='form_row'>&lt;td class='form_label'>&lt;label for='"</font>column_name<font color='#008800'>"'>"</font><font color='#AA0000'>(</font><font color='#0000AA'>title-case</font> column_name<font color='#AA0000'>)</font><font color='#008800'>"&lt;/label&gt;&lt;/td&gt;&lt;td class='form_input'>&lt;input id='"</font>column_name<font color='#008800'>"' name='"</font>column_name<font color='#008800'>"' size='30' type='text' /&gt;&lt;/td&gt;&lt;/tr&gt;"</font><font color='#AA0000'>)</font>
-	<font color='#AA0000'>)</font>
-  <font color='#AA0000'>(</font><font color='#0000AA'>print</font> <font color='#008800'>"&lt;tr class='form_row'>&lt;td class='form_label'>&amp;nbsp&#059;&lt;/td&gt;&lt;td class='form_input'>&lt;input id='form_submit' type='submit' name='commit' value='Add' /&gt;&lt;/td&gt;&lt;/tr&gt;"</font><font color='#AA0000'>)</font>
-  <font color='#AA0000'>(</font><font color='#0000AA'>print</font> <font color='#008800'>"&lt;input type='hidden' name='databasetable' value='"</font>table<font color='#008800'>"' /&gt;"</font><font color='#AA0000'>)</font>
-  <font color='#AA0000'>(</font><font color='#0000AA'>print</font> <font color='#008800'>"&lt;/form&gt;&lt;/table&gt;"</font><font color='#AA0000'>)</font>
-<font color='#AA0000'>)</font>
-
-
-<font color='#555555'>;===============================================================================</font>
-<font color='#555555'>; !Table Functions</font>
-<font color='#555555'>;===============================================================================</font>
-
-<font color='#555555'>;; <font color='#308080'>@syntax</font> (Dragonfly:table_open &lt;head_elements&gt;)</font>
-<font color='#555555'>;; <font color='#308080'>@param</font> &lt;head_elements&gt; a list containing the table head</font>
-<font color='#555555'>;; &lt;p&gt;Writes a standard table open element including a head, generated from a list.&lt;/p&gt;</font>
-<font color='#555555'>;; </font>
-<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>table_open table_head_elements<font color='#AA0000'>)</font>
-  <font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'table_colspan table_head_elements<font color='#AA0000'>)</font> <font color='#555555'>;count of table_head_elements for defining a correct table-colspan</font>
-  <font color='#AA0000'>(</font><font color='#0000AA'>print</font> "
-	&lt;!-- BEGIN table -->
-	&lt;table&gt;
-	&lt;thead&gt;&lt;tr&gt;"
-		<font color='#AA0000'>(</font><font color='#0000AA'>dolist</font> <font color='#AA0000'>(</font>th-element table_head_elements<font color='#AA0000'>)</font>
-			<font color='#AA0000'>(</font><font color='#0000AA'>if</font> <font color='#AA0000'>(</font><font color='#0000AA'>=</font> $idx <font color='#665500'>0</font><font color='#AA0000'>)</font> <font color='#AA0000'>(</font><font color='#0000AA'>print</font> <font color='#008800'>"&lt;th class='table_firstcolumn'>"</font>th-element<font color='#008800'>"&lt;/th&gt;"</font><font color='#AA0000'>)</font> <font color='#AA0000'>(</font><font color='#0000AA'>print</font> <font color='#008800'>"&lt;th&gt;"</font>th-element<font color='#008800'>"&lt;/th&gt;"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
-		<font color='#AA0000'>)</font>
-	<font color='#008800'>"&lt;/tr&gt;&lt;/thead&gt;"</font>
-  <font color='#AA0000'>)</font>
-<font color='#AA0000'>)</font>
-
-<font color='#555555'>;; <font color='#308080'>@syntax</font> (Dragonfly:table_data &lt;table_elements&gt;)</font>
-<font color='#555555'>;; <font color='#308080'>@param</font> &lt;table_elements&gt; a list containing all table elements (row by row, from left to right), including empty cells</font>
-<font color='#555555'>;; &lt;p&gt;Writes the table data generated from a list.&lt;/p&gt;</font>
-<font color='#555555'>;; </font>
-
-<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>table_data table_elements<font color='#AA0000'>)</font>
-	<font color='#555555'>; initialize maximum length per row with offset -1, because counting starts at "0"	</font>
-	<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'rowlength <font color='#AA0000'>(</font><font color='#0000AA'>length</font> table_colspan<font color='#AA0000'>)</font><font color='#AA0000'>)</font>	
-	<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'rowlength <font color='#AA0000'>(</font><font color='#0000AA'>-</font> rowlength <font color='#665500'>1</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
-	<font color='#AA0000'>(</font><font color='#0000AA'>print</font> <font color='#008800'>"&lt;tbody&gt;"</font>
-			<font color='#AA0000'>(</font><font color='#0000AA'>dotimes</font> <font color='#AA0000'>(</font>i <font color='#665500'>1</font><font color='#AA0000'>)</font>
-				<font color='#AA0000'>(</font><font color='#0000AA'>dolist</font> <font color='#AA0000'>(</font>td-element table_elements<font color='#AA0000'>)</font>
-					<font color='#555555'>; here we do some modulo calculation to determine if a new row begins</font>
-					<font color='#AA0000'>(</font><font color='#0000AA'>if</font> <font color='#AA0000'>(</font><font color='#0000AA'>=</font> <font color='#AA0000'>(</font><font color='#0000AA'>mod</font> $idx <font color='#AA0000'>(</font><font color='#0000AA'>length</font> table_colspan<font color='#AA0000'>)</font><font color='#AA0000'>)</font> <font color='#665500'>0</font><font color='#AA0000'>)</font> <font color='#AA0000'>(</font><font color='#0000AA'>print</font> <font color='#008800'>"&lt;tr&gt;&lt;td class='table_firstcolumn'>"</font>td-element<font color='#008800'>"&lt;/td&gt;"</font><font color='#AA0000'>)</font> <font color='#AA0000'>(</font><font color='#0000AA'>print</font> <font color='#008800'>"&lt;td&gt;"</font>td-element<font color='#008800'>"&lt;/td&gt;"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
-					<font color='#AA0000'>(</font><font color='#0000AA'>if</font> <font color='#AA0000'>(</font><font color='#0000AA'>=</font> <font color='#AA0000'>(</font><font color='#0000AA'>mod</font> $idx <font color='#AA0000'>(</font><font color='#0000AA'>length</font> table_colspan<font color='#AA0000'>)</font><font color='#AA0000'>)</font> rowlength<font color='#AA0000'>)</font> <font color='#AA0000'>(</font><font color='#0000AA'>println</font> <font color='#008800'>"&lt;/tr&gt;"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
-				<font color='#AA0000'>)</font>
-			<font color='#AA0000'>)</font>	
-			<font color='#008800'>"&lt;/tbody&gt;"</font>
-  	<font color='#AA0000'>)</font>
-<font color='#AA0000'>)</font>
-
-<font color='#555555'>;; <font color='#308080'>@syntax</font> (Dragonfly:table_footer &lt;table_footer_text&gt;)</font>
-<font color='#555555'>;; <font color='#308080'>@param</font> &lt;table_footer_text&gt; a string containing the table footer text</font>
-<font color='#555555'>;; &lt;p&gt;Writes a standard table footer with number of colspan generated from the last table-head.&lt;/p&gt;</font>
-<font color='#555555'>;; </font>
-<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>table_footer table_footer_text<font color='#AA0000'>)</font>
-  <font color='#AA0000'>(</font><font color='#0000AA'>print</font> "
-	&lt;tfoot&gt;&lt;tr&gt;&lt;td class='table_foot' colspan='<font color='#008800'>"(length table_colspan)"</font>'><font color='#008800'>"table_footer_text"</font>&lt;/td&gt;&lt;/tr&gt;&lt;/tfoot&gt;"
-  <font color='#AA0000'>)</font>
-<font color='#AA0000'>)</font>
-
-<font color='#555555'>;; <font color='#308080'>@syntax</font> (Dragonfly:table_close)</font>
-<font color='#555555'>;; &lt;p&gt;Writes a standard table close element.&lt;/p&gt;</font>
-<font color='#555555'>;; </font>
-<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>table_close<font color='#AA0000'>)</font>
-  <font color='#AA0000'>(</font><font color='#0000AA'>print</font> <font color='#008800'>"&lt;/table&gt;&lt;!-- END table -->"</font><font color='#AA0000'>)</font>
-<font color='#AA0000'>)</font>
-
-
-<font color='#555555'>;===============================================================================</font>
-<font color='#555555'>; !nldb Wrapper for a pure newLISP Database (flat)</font>
-<font color='#555555'>;===============================================================================</font>
-
-<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>create-sampledatabase, databasename<font color='#AA0000'>)</font>
-	<font color='#AA0000'>(</font> <font color='#0000AA'>if</font> <font color='#AA0000'>(</font> <font color='#0000AA'>not</font> <font color='#AA0000'>(</font> <font color='#0000AA'>find</font> databasename <font color='#AA0000'>(</font> <font color='#0000AA'>directory</font> <font color='#AA0000'>)</font><font color='#AA0000'>)</font> <font color='#AA0000'>)</font> 
-	   <font color='#AA0000'>(</font> <font color='#0000AA'>begin</font>
-		 <font color='#AA0000'>(</font> nldb:create-table 'demo '<font color='#AA0000'>(</font> amount what where who datevalue <font color='#0000AA'>when</font> <font color='#AA0000'>)</font> <font color='#AA0000'>)</font> 
-	     <font color='#AA0000'>(</font> <font color='#0000AA'>set</font> 'financier_entry <font color='#AA0000'>(</font><font color='#0000AA'>list</font>  <font color='#008800'>"$10 "</font> <font color='#008800'>"Google AdWords"</font> <font color='#008800'>"Advertising"</font> <font color='#008800'>"Marc"</font> <font color='#AA0000'>(</font><font color='#0000AA'>date-value</font><font color='#AA0000'>)</font><font color='#AA0000'>(</font><font color='#0000AA'>date</font> <font color='#AA0000'>)</font> <font color='#AA0000'>)</font> <font color='#AA0000'>)</font>
-			<font color='#AA0000'>(</font><font color='#0000AA'>dotimes</font> <font color='#AA0000'>(</font>i <font color='#665500'>30</font><font color='#AA0000'>)</font>
-	     		<font color='#AA0000'>(</font> nldb:add-row 'demo  financier_entry <font color='#AA0000'>)</font>
-			<font color='#AA0000'>)</font>
-	     <font color='#AA0000'>(</font> nldb:save-db databasename <font color='#AA0000'>)</font>
-
-	   <font color='#AA0000'>)</font>
-	   <font color='#AA0000'>(</font>nldb:load-db databasename<font color='#AA0000'>)</font> <font color='#555555'>; else load existing database</font>
-	<font color='#AA0000'>)</font>
-<font color='#AA0000'>)</font>
-
-<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>create-database, databasename<font color='#AA0000'>)</font>
-	<font color='#AA0000'>(</font><font color='#0000AA'>if</font> <font color='#AA0000'>(</font><font color='#0000AA'>not</font> <font color='#AA0000'>(</font><font color='#0000AA'>find</font> databasename <font color='#AA0000'>(</font> <font color='#0000AA'>directory</font> <font color='#AA0000'>)</font><font color='#AA0000'>)</font> <font color='#AA0000'>)</font>
-		<font color='#AA0000'>(</font><font color='#0000AA'>begin</font>
-			<font color='#AA0000'>(</font>nldb:save-db databasename<font color='#AA0000'>)</font> <font color='#555555'>; creating database</font>
-		<font color='#AA0000'>)</font>
-		<font color='#AA0000'>(</font>nldb:load-db databasename<font color='#AA0000'>)</font> <font color='#555555'>; else load existing database</font>
-	<font color='#AA0000'>)</font>
-<font color='#AA0000'>)</font>
-
-<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>create-table, databasename tablename fields<font color='#AA0000'>)</font>
-	<font color='#AA0000'>(</font>nldb:load-db databasename<font color='#AA0000'>)</font>
-	<font color='#AA0000'>(</font>nldb:create-table 'tablename fields <font color='#AA0000'>)</font>
-	<font color='#AA0000'>(</font>nldb:save-db databasename<font color='#AA0000'>)</font>
-<font color='#AA0000'>)</font>
-
-<font color='#555555'>;; <font color='#308080'>@syntax</font> (Dragonfly:show-database)</font>
-<font color='#555555'>;; &lt;p&gt;Writes some information about the currently used nldb&lt;/p&gt;</font>
-<font color='#555555'>;;</font>
-<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>show-database<font color='#AA0000'>)</font>
-	<font color='#AA0000'>(</font><font color='#0000AA'>println</font> "
-	&lt;div id='dragonfly_database-information' style='border:1px dotted #00aeef<font color='#555555'>; width:700px; padding:8px; margin-top:20px;' ></font>
-	&lt;h2&gt;Database information&lt;/h2&gt;&lt;pre&gt;
-	"<font color='#AA0000'>)</font>
-	<font color='#AA0000'>(</font>nldb:show<font color='#AA0000'>)</font>
-	<font color='#AA0000'>(</font><font color='#0000AA'>println</font> <font color='#008800'>"&lt;/pre&gt;&lt;/div&gt;"</font><font color='#AA0000'>)</font>
-<font color='#AA0000'>)</font>
-
-
-<font color='#555555'>;===============================================================================</font>
-<font color='#555555'>; !sqlite3 Wrapper</font>
-<font color='#555555'>;===============================================================================</font>
-
-
-<font color='#555555'>;; <font color='#308080'>@syntax</font> (Dragonfly:sqlite-open &lt;databasename&gt;)</font>
-<font color='#555555'>;; <font color='#308080'>@param</font> &lt;databasename&gt; string containing the database name</font>
-<font color='#555555'>;; &lt;p&gt;Open the SQLite database or creates it, if it does not exist.&lt;/p&gt;</font>
-<font color='#555555'>;;</font>
-<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>sqlite-open databasename<font color='#AA0000'>)</font>
-	<font color='#555555'>;; close old connections</font>
-	<font color='#AA0000'>(</font>sql3:close<font color='#AA0000'>)</font>
-	
-	<font color='#AA0000'>(</font><font color='#0000AA'>if</font> <font color='#AA0000'>(</font>sql3:open databasename<font color='#AA0000'>)</font> 
-		<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'flashnotice <font color='#008800'>"Database was successfully opened or created."</font><font color='#AA0000'>)</font> 
-	<font color='#AA0000'>)</font> 	
-<font color='#AA0000'>)</font>
-
-<font color='#555555'>;; <font color='#308080'>@syntax</font> (Dragonfly:sqlite-tables)</font>
-<font color='#555555'>;; &lt;p&gt;Shows the existing tables in the current database.&lt;/p&gt;</font>
-<font color='#555555'>;;</font>
-<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>sqlite-tables<font color='#AA0000'>)</font> 
-	<font color='#AA0000'>(</font><font color='#0000AA'>println</font> "
-	&lt;div id='dragonfly_database-information' style='border:1px dotted #00aeef<font color='#555555'>; width:800px; padding:8px; margin-top:20px;margin-bottom:20px' ></font>
-	&lt;h2&gt;Existing tables in SQLite Database&lt;/h2&gt;&lt;pre&gt;
-	"
-	<font color='#AA0000'>(</font>sql3:tables<font color='#AA0000'>)</font>"
-	&lt;/pre&gt;&lt;/div&gt;"<font color='#AA0000'>)</font>
-<font color='#AA0000'>)</font>
-
-<font color='#555555'>;; <font color='#308080'>@syntax</font> (Dragonfly:sqlite-columns)</font>
-<font color='#555555'>;; &lt;p&gt;Shows the existing columns in a given table.&lt;/p&gt;</font>
-<font color='#555555'>;;</font>
-<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>sqlite-columns table<font color='#AA0000'>)</font> 
-	<font color='#AA0000'>(</font><font color='#0000AA'>println</font> "
-	&lt;div id='dragonfly_database-information' style='border:1px dotted #00aeef<font color='#555555'>; width:800px; padding:8px; margin-top:20px;margin-bottom:20px' ></font>
-	&lt;h2&gt;Existing columns in SQLite table &lt;i&gt;<font color='#008800'>"table"</font>&lt;/i&gt;&lt;/h2&gt;&lt;pre&gt;
-	"
-	<font color='#AA0000'>(</font>sql3:columns table<font color='#AA0000'>)</font>"
-	&lt;/pre&gt;&lt;/div&gt;"<font color='#AA0000'>)</font>
-<font color='#AA0000'>)</font>
-
-<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>sqlite-empty-table table<font color='#AA0000'>)</font> 
-	<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'query <font color='#AA0000'>(</font><font color='#0000AA'>append</font> <font color='#008800'>"DELETE FROM "</font>table<font color='#AA0000'>)</font><font color='#AA0000'>)</font>
-	<font color='#AA0000'>(</font>sql3:sql query<font color='#AA0000'>)</font>
-<font color='#AA0000'>)</font>
-
-<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>sqlite-query query<font color='#AA0000'>)</font> 
-	<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'sqlarray <font color='#AA0000'>(</font>sql3:sql query<font color='#AA0000'>)</font><font color='#AA0000'>)</font> <font color='#555555'>; results of query</font>
-	<font color='#555555'>;; close old connections</font>
-	<font color='#AA0000'>(</font>sql3:close<font color='#AA0000'>)</font>	
-<font color='#AA0000'>)</font>
-
-<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>sqlite-insert table values<font color='#AA0000'>)</font>
-	<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'query <font color='#AA0000'>(</font><font color='#0000AA'>append</font> <font color='#008800'>"INSERT INTO "</font>table<font color='#008800'>" VALUES ("</font>values<font color='#008800'>")"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
-	<font color='#AA0000'>(</font>sql3:sql query<font color='#AA0000'>)</font>
-<font color='#AA0000'>)</font>
-
-<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>sqlite-get-tabledata query<font color='#AA0000'>)</font> 
-	<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'sqlarray <font color='#AA0000'>(</font>sql3:sql query<font color='#AA0000'>)</font><font color='#AA0000'>)</font> <font color='#555555'>; results of query</font>
-	
-<font color='#AA0000'>)</font>
-
-<font color='#555555'>;===============================================================================</font>
-<font color='#555555'>; !twitter functions</font>
-<font color='#555555'>;===============================================================================</font>
-
-<font color='#555555'>;; <font color='#308080'>@syntax</font> (Dragonfly:twitter-search &lt;keyword&gt;)</font>
-<font color='#555555'>;; <font color='#308080'>@param</font> &lt;keyword&gt; string containing the keyword for search</font>
-<font color='#555555'>;; &lt;p&gt;Writes the results of the search in nice speech bubbles.&lt;/p&gt;</font>
-<font color='#555555'>;;</font>
-
-<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>twitter-search keyword rpp<font color='#AA0000'>)</font>
-  <font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'xml <font color='#AA0000'>(</font><font color='#0000AA'>get-url</font> <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"http://search.twitter.com/search.atom?rpp="</font>rpp<font color='#008800'>"&amp;q="</font>keyword<font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
-  <font color='#AA0000'>(</font><font color='#0000AA'>xml-type-tags</font> <font color='#0000AA'>nil</font> <font color='#0000AA'>nil</font> <font color='#0000AA'>nil</font> <font color='#0000AA'>nil</font><font color='#AA0000'>)</font> <font color='#555555'>; no extra tags</font>
-  <font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'sxml <font color='#AA0000'>(</font><font color='#0000AA'>xml-parse</font> xml <font color='#665500'>31</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font> <font color='#555555'>; turn on SXML options</font>
-  <font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'entry-index <font color='#AA0000'>(</font><font color='#0000AA'>ref-all</font> '<font color='#AA0000'>(</font>entry <font color='#0000AA'>*</font><font color='#AA0000'>)</font> sxml <font color='#0000AA'>match</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
-  <font color='#AA0000'>(</font><font color='#0000AA'>when</font> <font color='#AA0000'>(</font><font color='#0000AA'>empty?</font> entry-index<font color='#AA0000'>)</font>
-    <font color='#AA0000'>(</font><font color='#0000AA'>println</font> <font color='#008800'>"No entries found"</font><font color='#AA0000'>)</font>
-  <font color='#AA0000'>)</font>
-  <font color='#AA0000'>(</font><font color='#0000AA'>println</font> <font color='#008800'>"&lt;div id='twitter_search_results'>&lt;h3&gt;You searched for '"</font>keyword<font color='#008800'>"' and we found&lt;/h3&gt;"</font><font color='#AA0000'>)</font>
-  <font color='#AA0000'>(</font><font color='#0000AA'>dolist</font> <font color='#AA0000'>(</font>idx entry-index<font color='#AA0000'>)</font>
-	<font color='#AA0000'>(</font><font color='#0000AA'>println</font> <font color='#008800'>"&lt;div class='bubble'>&lt;blockquote&gt;&lt;p&gt;"</font><font color='#AA0000'>)</font>    
-	<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'entry <font color='#AA0000'>(</font>sxml idx<font color='#AA0000'>)</font><font color='#AA0000'>)</font>
-    <font color='#AA0000'>(</font><font color='#0000AA'>println</font> 
-				<font color='#AA0000'>(</font><font color='#0000AA'>lookup</font> 'title entry<font color='#AA0000'>)</font> 
-				<font color='#008800'>"&lt;/p&gt;&lt;/blockquote&gt;"</font>
-				<font color='#008800'>"&lt;cite&gt;&lt;strong&gt;"</font>
-				<font color='#AA0000'>(</font><font color='#0000AA'>lookup</font> '<font color='#AA0000'>(</font>author <font color='#0000AA'>name</font><font color='#AA0000'>)</font> entry <font color='#AA0000'>)</font> <font color='#008800'>"&lt;/strong&gt; on "</font> 
-			 	<font color='#AA0000'>(</font><font color='#0000AA'>lookup</font> 'published entry<font color='#AA0000'>)</font> <font color='#008800'>"&lt;/cite&gt;&lt;/div&gt;"</font><font color='#AA0000'>)</font>
-	<font color='#AA0000'>)</font>
-	<font color='#AA0000'>(</font><font color='#0000AA'>println</font> <font color='#008800'>"&lt;/div&gt;"</font><font color='#AA0000'>)</font>
-<font color='#AA0000'>)</font>
-
-<font color='#555555'>;===============================================================================</font>
-<font color='#555555'>; !SEO functions (just ideas - really alpha!!!)</font>
-<font color='#555555'>;===============================================================================</font>
-
-<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>clean-html<font color='#AA0000'>)</font>
-	<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'page <font color='#AA0000'>(</font><font color='#0000AA'>get-url</font> <font color='#008800'>"http://www.marchildmann.de/"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
-	<font color='#AA0000'>(</font><font color='#0000AA'>replace</font> <font color='#008800'>"<[^>]*>"</font> page <font color='#008800'>""</font> <font color='#665500'>0</font><font color='#AA0000'>)</font>
-	<font color='#AA0000'>(</font><font color='#0000AA'>println</font> page<font color='#AA0000'>)</font>
-<font color='#AA0000'>)</font>
-   
-<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>check-meta-description<font color='#AA0000'>)</font>
-	
-	<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'description "&lt;meta name=&#092;&#034;description&#092;&#034;`
-	      content=&#092;&#034;newLISP is a general purpose scripting language <font color='#0000AA'>for</font> developing web applications <font color='#0000AA'>and</font> programs in general <font color='#0000AA'>and</font> in the domains of artificial intelligence <font color='#AA0000'>(</font>AI<font color='#AA0000'>)</font> <font color='#0000AA'>and</font> statistics.&#092;&#034;>"<font color='#AA0000'>)</font>
-	<font color='#555555'>;;(println (regex "&lt;meta name=&#092;&#034;description&#092;&#034; content=&#092;&#034;(.*)&#092;&#034;>/i" "&lt;meta name=&#092;&#034;description&#092;&#034;`</font>
-	<font color='#555555'>;;	      content=&#092;&#034;newLISP is a general purpose scripting language for developing web applications and programs in general and in the domains of artificial intelligence (AI) and statistics.&#092;&#034;>"))</font>
-	<font color='#555555'>;;(println $0)</font>
-	<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'description-length <font color='#AA0000'>(</font><font color='#0000AA'>length</font> description<font color='#AA0000'>)</font><font color='#AA0000'>)</font>
-	<font color='#AA0000'>(</font><font color='#0000AA'>or</font>
-		<font color='#AA0000'>(</font><font color='#0000AA'>if</font> <font color='#AA0000'>(</font><font color='#0000AA'><</font> description-length <font color='#665500'>60</font><font color='#AA0000'>)</font> <font color='#AA0000'>(</font><font color='#0000AA'>println</font> <font color='#008800'>"Your meta description with "</font>description-length<font color='#008800'>" characters is too short."</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
-		<font color='#AA0000'>(</font><font color='#0000AA'>if</font> <font color='#AA0000'>(</font><font color='#0000AA'>></font> description-length <font color='#665500'>170</font><font color='#AA0000'>)</font> <font color='#AA0000'>(</font><font color='#0000AA'>println</font> <font color='#008800'>"Your meta description with "</font>description-length<font color='#008800'>" characters is too long."</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
-	<font color='#AA0000'>)</font>
-	<font color='#AA0000'>(</font><font color='#0000AA'>and</font>
-		<font color='#AA0000'>(</font><font color='#0000AA'>if</font> <font color='#AA0000'>(</font><font color='#0000AA'>>=</font> description-length <font color='#665500'>60</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
-		<font color='#AA0000'>(</font><font color='#0000AA'>if</font> <font color='#AA0000'>(</font><font color='#0000AA'><=</font> description-length <font color='#665500'>170</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
-		<font color='#AA0000'>(</font><font color='#0000AA'>println</font> <font color='#008800'>"Your meta description with "</font>description-length<font color='#008800'>" characters is ideal."</font><font color='#AA0000'>)</font>
-	<font color='#AA0000'>)</font>
-<font color='#AA0000'>)</font>
-
-<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>check-meta-keywords keywords<font color='#AA0000'>)</font>
-	
-	<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'number-keywords <font color='#AA0000'>(</font><font color='#0000AA'>length</font> keywords<font color='#AA0000'>)</font><font color='#AA0000'>)</font>
-	<font color='#AA0000'>(</font><font color='#0000AA'>or</font>
-		<font color='#AA0000'>(</font><font color='#0000AA'>if</font> <font color='#AA0000'>(</font><font color='#0000AA'><</font> number-keywords <font color='#665500'>5</font><font color='#AA0000'>)</font> <font color='#AA0000'>(</font><font color='#0000AA'>println</font> <font color='#008800'>"The number of meta-keywords "</font>number-keywords<font color='#008800'>" are too small."</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
-		<font color='#AA0000'>(</font><font color='#0000AA'>if</font> <font color='#AA0000'>(</font><font color='#0000AA'>></font> number-keywords <font color='#665500'>10</font><font color='#AA0000'>)</font> <font color='#AA0000'>(</font><font color='#0000AA'>println</font> <font color='#008800'>"The number of meta-keywords "</font>number-keywords<font color='#008800'>" are too much."</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
-	<font color='#AA0000'>)</font>
-	<font color='#AA0000'>(</font><font color='#0000AA'>and</font>
-		<font color='#AA0000'>(</font><font color='#0000AA'>if</font> <font color='#AA0000'>(</font><font color='#0000AA'>>=</font> number-keywords <font color='#665500'>5</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
-		<font color='#AA0000'>(</font><font color='#0000AA'>if</font> <font color='#AA0000'>(</font><font color='#0000AA'><=</font> number-keywords <font color='#665500'>10</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
-		<font color='#AA0000'>(</font><font color='#0000AA'>println</font> <font color='#008800'>"Your number of meta-keywords "</font>number-keywords<font color='#008800'>" are ideal."</font><font color='#AA0000'>)</font>
-	<font color='#AA0000'>)</font>
-<font color='#AA0000'>)</font>
-
-<font color='#555555'>;===============================================================================</font>
-<font color='#555555'>; !Google functions</font>
-<font color='#555555'>;===============================================================================</font>
-
-<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>google-results-domain domain<font color='#AA0000'>)</font>
-	<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'json <font color='#AA0000'>(</font><font color='#0000AA'>get-url</font> <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"http://ajax.googleapis.com/ajax/services/search/web?v=1.0&amp;q="</font>domain<font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
-	<font color='#AA0000'>(</font><font color='#0000AA'>begin</font>
-		<font color='#AA0000'>(</font><font color='#0000AA'>regex</font> <font color='#008800'>"&#092;&#034;estimatedResultCount&#092;&#034;:&#092;&#034;(.*)&#092;&#034;,"</font> json<font color='#AA0000'>)</font>
-		<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'erc $1<font color='#AA0000'>)</font>	
-	<font color='#AA0000'>)</font>
-<font color='#AA0000'>)</font>
-
-
-<font color='#AA0000'>(</font><font color='#0000AA'>context</font> MAIN<font color='#AA0000'>)</font>
-
-</pre><center><font face='Arial' size='-3' color='#666666'>syntax highlighting with <a href="http://newlisp.org">newLISP</a>&nbsp;and <a href="http://newlisp.org/newLISPdoc.html">newLISPdoc</a></font></center></body></html>

File example-site/dragonfly-framework/docs/index.html

 			link="#376590" vlink="#551A8B" alink="#ffAA28">
 <blockquote>
 <center><h1>Index</h1></center>
-<a href="dragonfly.lsp.html"><br/><br/><h2>Module:&nbsp;Dragonfly</h2></a>
-<p>A newLISP web framework for rapid web development</p>
-<a href="dragonfly.lsp.html#Dragonfly_listener">listener</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#Dragonfly_benchmark-start">benchmark-start</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#Dragonfly_benchmark-end">benchmark-end</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#Dragonfly_debugging">debugging</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#Dragonfly_template">template</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#Dragonfly_partial">partial</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#Dragonfly_css">css</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#Dragonfly_meta">meta</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#Dragonfly_rss">rss</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#Dragonfly_script">script</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#Dragonfly_meta-iphone">meta-iphone</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#Dragonfly_compare-lists">compare-lists</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#Dragonfly_google-analytics">google-analytics</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#Dragonfly_todays-date-german">todays-date-german</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#Dragonfly_time-now">time-now</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#Dragonfly_image">image</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#Dragonfly_link_to">link_to</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#Dragonfly_link_mailto">link_mailto</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#Dragonfly_form_open">form_open</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#Dragonfly_form_textfield">form_textfield</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#Dragonfly_form_submit">form_submit</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#Dragonfly_form_hidden">form_hidden</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#Dragonfly_form_close">form_close</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#Dragonfly_form_generate-from-columns">form_generate-from-columns</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#Dragonfly_table_open">table_open</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#Dragonfly_table_data">table_data</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#Dragonfly_table_footer">table_footer</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#Dragonfly_table_close">table_close</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#Dragonfly_show-database">show-database</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#Dragonfly_sqlite-open">sqlite-open</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#Dragonfly_sqlite-tables">sqlite-tables</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#Dragonfly_sqlite-columns">sqlite-columns</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#Dragonfly_twitter-search">twitter-search</a>&nbsp; &nbsp; 
+<a href="dragonfly.lsp.html"><br/><br/><h2>Module:&nbsp;dragonfly.lsp</h2></a>
+<p>The heart of Dragonfly - A newLISP web framework for rapid web development.</p>
+<a href="dragonfly.lsp.html#_STDOUT">STDOUT</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#Dragonfly_activate-plugin">activate-plugin</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#Dragonfly_web-root">web-root</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#Dragonfly_view-path">view-path</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#Dragonfly_partial-path">partial-path</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#Dragonfly_resource-path">resource-path</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#Dragonfly_include">include</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#Dragonfly_display-file">display-file</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#Dragonfly_display-partial">display-partial</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#Dragonfly_display-view">display-view</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#Dragonfly_display-error">display-error</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#Dragonfly_eval-template">eval-template</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#Dragonfly_die">die</a>&nbsp; &nbsp; <a href="log.lsp.html"><br/><br/><h2>Module:&nbsp;log.lsp</h2></a>
+<p>Provides convenient logging facility for all of Dragonfly.</p>
+<a href="log.lsp.html#Dragonfly_log-func">log-func</a>&nbsp; &nbsp; <a href="log.lsp.html#Dragonfly_log-debug">log-debug</a>&nbsp; &nbsp; <a href="log.lsp.html#Dragonfly_log-info">log-info</a>&nbsp; &nbsp; <a href="log.lsp.html#Dragonfly_log-warn">log-warn</a>&nbsp; &nbsp; <a href="log.lsp.html#Dragonfly_log-err">log-err</a>&nbsp; &nbsp; <a href="request.lsp.html"><br/><br/><h2>Module:&nbsp;request.lsp</h2></a>
+<p></p>
+<a href="request.lsp.html#_$GET">$GET</a>&nbsp; &nbsp; <a href="request.lsp.html#_$POST">$POST</a>&nbsp; &nbsp; <a href="request.lsp.html#_$FILES">$FILES</a>&nbsp; &nbsp; <a href="request.lsp.html#_$COOKIES">$COOKIES</a>&nbsp; &nbsp; <a href="request.lsp.html#_$BINARY">$BINARY</a>&nbsp; &nbsp; <a href="response.lsp.html"><br/><br/><h2>Module:&nbsp;response.lsp</h2></a>
+<p></p>
+<a href="response.lsp.html#Response_status">status</a>&nbsp; &nbsp; <a href="response.lsp.html#Response_header">header</a>&nbsp; &nbsp; <a href="response.lsp.html#Response_cookie">cookie</a>&nbsp; &nbsp; <a href="response.lsp.html#Response_send-headers">send-headers</a>&nbsp; &nbsp; <a href="response.lsp.html#Response_redirect">redirect</a>&nbsp; &nbsp; <a href="response.lsp.html#Response_send-headers-with-status">send-headers-with-status</a>&nbsp; &nbsp; <a href="response.lsp.html#Response_content-type">content-type</a>&nbsp; &nbsp; <a href="response.lsp.html#Response_extension->type">extension->type</a>&nbsp; &nbsp; <a href="utils.lsp.html"><br/><br/><h2>Module:&nbsp;utils.lsp</h2></a>
+<p></p>
+<a href="utils.lsp.html#_regex-captcha">regex-captcha</a>&nbsp; &nbsp; <a href="utils.lsp.html#_load-files-in-dir">load-files-in-dir</a>&nbsp; &nbsp; <a href="utils.lsp.html#_into-ctx-assoc">into-ctx-assoc</a>&nbsp; &nbsp; 
 <br/><br/><center>- &part; -</center><br/>
 <center><font face='Arial' size='-2' color='#444444'>
 generated with <a href="http://newlisp.org">newLISP</a>&nbsp;

File example-site/dragonfly-framework/docs/log.lsp.html

+<!DOCTYPE HTML PUBLIC "HTML 4.01 Transitional">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>log.lsp</title>
+
+<link rel="stylesheet" type="text/css" href="newlispdoc.css" />
+</head>
+
+<body style="margin: 20px;" text="#111111" bgcolor="#FFFFFF" 
+			link="#376590" vlink="#551A8B" alink="#ffAA28">
+<blockquote>
+<center><h1>log.lsp</h1></center>
+<p><a href="index.html">Module index</a></p><br/><br/><br/><h2>Module:&nbsp;log.lsp</h2><p>Provides convenient logging facility for all of Dragonfly.</p>
+<b>Author: </b>Greg Slepak<br/>
+ <p>To avoid checking the value of <tt>Dragonfly:LOG_LEVEL</tt> each time something is logged
+ the logging functions that correspond to a lower logging level are disabled
+ when this file is loaded.</p>
+ <p>It is possible to change the <tt>LOG_LEVEL</tt> at runtime, but the way it is done
+ is slightly tricky because <tt>MAIN:load</tt> is overwritten by Dragonfly
+ to provide once-only loading. If you want to dynamically change the
+ log-level (say in a plugin), then you will need to use the remapped <tt>sys-load</tt>
+ function to force a reload of this file:</p>
+ <pre> (context 'DF)
+ (constant 'LOG_LEVEL 'LOG_DEBUG) ; enable debug logging at runtime
+ (sys-load (string DRAGONFLY_ROOT "/lib/log.lsp"))
+ (context MAIN)</pre>
+ There are four log levels defined:
+ <pre> (map set '(LOG_DEBUG LOG_INFO LOG_WARN LOG_ERROR)
+          '(        0        1        2         3))</pre>
+
+
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="Dragonfly_log-func"></a><h3><font color=#CC0000>Dragonfly:log-func</font></h3>
+<b>syntax: (<font color=#CC0000>Dragonfly:log-func</font> <em>str-level</em> <em>str-msg</em>)</b><br/>
+<b>parameter: </b><em>str-level</em> - a string representing the log level (ex: "[DEBUG]: ")<br/>
+<b>parameter: </b><em>str-msg</em> - a string containing the message<br/>
+ <br/>This function appends to the file specified by <tt>Dragonfly:LOG_FILE_PATH</tt>
+ and prepends date information to the log.
+ <pre> (log-func "[CRAZY!]: " (string user " just did something crazy!"))
+ => Oct 26 01:44:24 [CRAZY!]: johnny-b just did something crazy!</pre>
+ All other log functions call this one. You can override this function
+ at runtime to provide your own logging behavior.
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="Dragonfly_log-debug"></a><h3><font color=#CC0000>Dragonfly:log-debug</font></h3>
+<b>syntax: (<font color=#CC0000>Dragonfly:log-debug</font>)</b><br/>
+ <br>String-concats its arguments and calls <tt>log-func</tt> with <em>level</em> set to "[DEBUG]: "
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="Dragonfly_log-info"></a><h3><font color=#CC0000>Dragonfly:log-info</font></h3>
+<b>syntax: (<font color=#CC0000>Dragonfly:log-info</font>)</b><br/>
+ <br>String-concats its arguments and calls <tt>log-func</tt> with <em>level</em> set to "[INFO]: "
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="Dragonfly_log-warn"></a><h3><font color=#CC0000>Dragonfly:log-warn</font></h3>
+<b>syntax: (<font color=#CC0000>Dragonfly:log-warn</font>)</b><br/>
+ <br>String-concats its arguments and calls <tt>log-func</tt> with <em>level</em> set to "[WARNING]: "
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="Dragonfly_log-err"></a><h3><font color=#CC0000>Dragonfly:log-err</font></h3>
+<b>syntax: (<font color=#CC0000>Dragonfly:log-err</font>)</b><br/>
+ <br>String-concats its arguments and calls <tt>log-func</tt> with <em>level</em> set to "[ERROR]: "
+
+
+
+<br/><br/><center>- &part; -</center><br/>
+<center><font face='Arial' size='-2' color='#444444'>
+generated with <a href="http://newlisp.org">newLISP</a>&nbsp;
+and <a href="http://newlisp.org/newLISPdoc.html">newLISPdoc</a>
+</font></center>
+</blockquote>
+</body>
+</html>

File example-site/dragonfly-framework/docs/request.lsp.html

+<!DOCTYPE HTML PUBLIC "HTML 4.01 Transitional">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>request.lsp</title>
+
+<link rel="stylesheet" type="text/css" href="newlispdoc.css" />
+</head>
+
+<body style="margin: 20px;" text="#111111" bgcolor="#FFFFFF" 
+			link="#376590" vlink="#551A8B" alink="#ffAA28">
+<blockquote>
+<center><h1>request.lsp</h1></center>
+<p><a href="index.html">Module index</a></p>
+<br/><br/><br/><h2>Module:&nbsp;request.lsp</h2><b>Author: </b>Greg Slepak <greg at taoeffect.com><br/>
+ <h3>$GET/$POST</h3>
+ These are very similar to the PHP $_GET and $_POST associative arrays.
+ Use them to retrieve the GET/POST values.
+ If a variable was specified, but no value assigned (i.e. <tt>/?foo</tt>), then
+ the value will be an empty string (you can use <tt>empty?</tt> to check for this).
+ If the variable does not exist, <tt>nil</tt> will be returned.
+ <br><br>The values are url decoded:
+ <pre> "What+time+is+it%3f"  => "What time is it?"</pre>
+ <h3>$FILES</h3>
+ If a <tt>multipart/form-data</tt> content type was submitted, then
+ STDIN is read for the values. Any files are placed in <tt>$FILES</tt>, while
+ other key/value pairs are placed in <tt>$POST</tt>.
+ <br><br>The values in <tt>$FILES</tt> contain an associative array with more information
+ about the files.
+ <h3>$BINARY</h3>
+ If the environment variable <tt>HTTP_CONTENT_TRANSFER_ENCODING</tt> is set to
+ "binary" then STDIN is read (up to <tt>MAX_POST_LENGTH</tt>) and the data is
+ stored in <tt>$BINARY</tt>. Note that unlike the other symbols in this file,
+ <tt>$BINARY</tt> is a string, not a function.
+ <h3>$COOKIES</h3>
+ The environment variable <tt>HTTP_COOKIE</tt> is parsed and the cookies are placed in
+ in <tt>$COOKIES</tt> as key/value pairs just like <tt>$GET</tt> and <tt>$POST</tt>.
+<br/><br/><center>- &sect; -</center><br/>
+<a name="_$GET"></a><h3><font color=#CC0000>$GET</font></h3>
+<b>syntax: (<font color=#CC0000>$GET</font> <em>str-key</em>)</b><br/>
+<p><b>return: </b>the value of the GET parameter for <em>str-key</em>, nil if no such GET variable was passed in.</p>
+<br/><br/><center>- &sect; -</center><br/>
+<a name="_$POST"></a><h3><font color=#CC0000>$POST</font></h3>
+<b>syntax: (<font color=#CC0000>$POST</font> <em>str-key</em>)</b><br/>
+<p><b>return: </b>the value of the POST parameter for <em>str-key</em>, nil if no such POST variable was passed in.</p>
+<br/><br/><center>- &sect; -</center><br/>
+<a name="_$FILES"></a><h3><font color=#CC0000>$FILES</font></h3>
+<b>syntax: (<font color=#CC0000>$FILES</font> <em>str-key</em>)</b><br/>
+ <p>Returns an association list with keys <tt>'name</tt>, <tt>'data</tt>, and <tt>'length</tt> for the result
+ of a <tt>multipart/form-data</tt> posted form.</p>
+<br/><br/><center>- &sect; -</center><br/>
+<a name="_$COOKIES"></a><h3><font color=#CC0000>$COOKIES</font></h3>
+<b>syntax: (<font color=#CC0000>$COOKIES</font> <em>str-key</em>)</b><br/>
+<p><b>return: </b>the value of the cookie with the key <em>str-key</em>, or nil if no such cookie exists.</p>
+<br/><br/><center>- &sect; -</center><br/>
+<a name="_$BINARY"></a><h3><font color=#CC0000>$BINARY</font></h3>
+<b>syntax: $BINARY</b><br/>
+ <p>This is a global buffer that contains what was sent to STDIN (up to <tt>MAX_POST_LENGTH</tt>)
+ when the value of environment variable <tt>HTTP_CONTENT_TRANSFER_ENCODING</tt> is set to "binary".</p>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<br/><br/><center>- &part; -</center><br/>
+<center><font face='Arial' size='-2' color='#444444'>
+generated with <a href="http://newlisp.org">newLISP</a>&nbsp;
+and <a href="http://newlisp.org/newLISPdoc.html">newLISPdoc</a>
+</font></center>
+</blockquote>
+</body>
+</html>

File example-site/dragonfly-framework/docs/response.lsp.html

+<!DOCTYPE HTML PUBLIC "HTML 4.01 Transitional">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>response.lsp</title>
+
+<link rel="stylesheet" type="text/css" href="newlispdoc.css" />
+</head>
+
+<body style="margin: 20px;" text="#111111" bgcolor="#FFFFFF" 
+			link="#376590" vlink="#551A8B" alink="#ffAA28">
+<blockquote>
+<center><h1>response.lsp</h1></center>
+<p><a href="index.html">Module index</a></p><br/><br/><br/><h2>Module:&nbsp;response.lsp</h2><b>Author: </b>Greg Slepak<br/>
+
+
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="Response_status"></a><h3><font color=#CC0000>Response:status</font></h3>
+<b>syntax: (<font color=#CC0000>Response:status</font>)</b><br/>
+<b>syntax: (<font color=#CC0000>Response:status</font> <em>int-code</em> [<em>str-description</em>])</b><br/>
+ <p>In the first syntax, returns a list containing the current status code and corresponding description.</p>
+ <p>In the second syntax, sets the response status to <em>int-code</em>, using the description from
+ a built-in list. If the description for <em>int-code</em> is not found in the built-in
+ list then an error will be thrown if <em>str-description</em> is not provided.</p>
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="Response_header"></a><h3><font color=#CC0000>Response:header</font></h3>
+<b>syntax: (<font color=#CC0000>Response:header</font> <em>str-key</em>)</b><br/>
+<b>parameter: </b><em>str-key</em> - the header's name<br><br/>
+<b>syntax: (<font color=#CC0000>Response:header</font> <em>str-key</em> <em>str-value</em>)</b><br/>
+<b>parameter: </b><em>str-key</em> - the header's name<br/>
+<b>parameter: </b><em>str-value</em> - the header's value<br/>
+ <br>In the first syntax, returns the header matching <em>str-key</em> or,
+ if <em>str-key</em> is nil, all of the headers in an association list.
+ <br>In the second syntax, sets or updates the header matching <em>str-key</em> or,
+ if <em>str-value</em> is nil, deletes the header for <em>str-key</em>.
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="Response_cookie"></a><h3><font color=#CC0000>Response:cookie</font></h3>
+<b>syntax: (<font color=#CC0000>Response:cookie</font> <em>str-key</em>)</b><br/>
+<b>parameter: </b><em>str-key</em> - the cookie's name<br><br/>
+<b>syntax: (<font color=#CC0000>Response:cookie</font> <em>str-key</em> <em>str-value</em> [<em>int-expires</em> [<em>str-path</em> [<em>str-domain</em> [<em>bool-http-only</em>]]]])</b><br/>
+<b>parameter: </b><em>str-key</em> - the cookie's name<br/>
+<b>parameter: </b><em>str-value</em> - the cookie's value<br/>
+<b>parameter: </b><em>int-expires</em> - (optional) the expiration date of the cookie as a unix timestamp; default is a session cookie<br/>
+<b>parameter: </b><em>str-path</em> - (optional) the cookie's path; default is the current path<br/>
+<b>parameter: </b><em>str-domain</em> - (optional) the cookie's domain; default is the current host<br/>
+<b>parameter: </b><em>bool-http-only</em> - (optional) whether the cookie may be read by client-side scripts<br/>
+ <p>In the first syntax, <tt>cookie</tt> returns the value of the cookie named <em>str-key</em> or <tt>nil</tt>. If
+ <em>str-key</em> is not provided, an association list of all cookie key/value pairs is returned.</p>
+ <p>In the second syntax, <tt>cookie</tt> sets a new cookie. If <em>str-value</em> is nil then any existing
+ cookie is deleted, otherwise it is updated with the value and the rest of the parameters.</p>
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="Response_send-headers"></a><h3><font color=#CC0000>Response:send-headers</font></h3>
+<b>syntax: (<font color=#CC0000>Response:send-headers</font>)</b><br/>
+ <p>Actually sends the headers (without buffering them to <tt>Dragonfly:STDOUT</tt>).
+ Normally you should never call this yourself!</p>
+
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="Response_redirect"></a><h3><font color=#CC0000>Response:redirect</font></h3>
+<b>syntax: (<font color=#CC0000>Response:redirect</font> <em>str-url</em>)</b><br/>
+<b>parameter: </b><em>str-url</em> - The URL you'd like to send them to<br/>
+ <p>Does an immediate 302 Found redirect and calls <tt>exit</tt>.</p>
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="Response_send-headers-with-status"></a><h3><font color=#CC0000>Response:send-headers-with-status</font></h3>
+<b>syntax: (<font color=#CC0000>Response:send-headers-with-status</font> <em>int-code</em> <em>str-description</em>)</b><br/>
+ <p>Convenience. Combines a call to <tt>Response:status</tt> and <tt>Response:send-headers</tt>.
+ As this calls <tt>send-headers</tt>, you typically do not want to call this yourself!</p>
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="Response_content-type"></a><h3><font color=#CC0000>Response:content-type</font></h3>
+<b>syntax: (<font color=#CC0000>Response:content-type</font> <em>str-value</em>)</b><br/>
+ <p>Convenience for calling <tt>(Response:header "Content-Type" str-value)</tt>.</p>
+ <p>If <em>str-value</em> is nil, returns the current content-type value</p>
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="Response_extension->type"></a><h3><font color=#CC0000>Response:extension->type</font></h3>
+<b>syntax: (<font color=#CC0000>Response:extension->type</font> <em>str-file-extension</em>)</b><br/>
+ <p>Given a file extension (with or without a preceding dot), returns the
+ MIME-type for that extension. Currently only a small number of file extensions
+ are supported by default, see the source in lib/response.lsp for a complete list.</p>
+
+
+
+
+
+
+
+
+
+
+
+<br/><br/><center>- &part; -</center><br/>
+<center><font face='Arial' size='-2' color='#444444'>
+generated with <a href="http://newlisp.org">newLISP</a>&nbsp;
+and <a href="http://newlisp.org/newLISPdoc.html">newLISPdoc</a>
+</font></center>
+</blockquote>
+</body>
+</html>

File example-site/dragonfly-framework/docs/utils.lsp.html

+<!DOCTYPE HTML PUBLIC "HTML 4.01 Transitional">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>utils.lsp</title>
+
+<link rel="stylesheet" type="text/css" href="newlispdoc.css" />
+</head>
+
+<body style="margin: 20px;" text="#111111" bgcolor="#FFFFFF" 
+			link="#376590" vlink="#551A8B" alink="#ffAA28">
+<blockquote>
+<center><h1>utils.lsp</h1></center>
+<p><a href="index.html">Module index</a></p><br/><br/><br/><h2>Module:&nbsp;utils.lsp</h2><b>Author: </b>Greg Slepak <greg at taoeffect.com><br/>
+ <p>This file not only provides the functions documented below, but
+ it also plays a role in globally overriding certain functions in the MAIN context.</p>
+ <p>The overridden functions include: <tt>load</tt>, <tt>print</tt>, and <tt>println</tt>.</p>
+ <p><tt>load</tt> is overwritten to load a file only once, while <tt>print</tt> and <tt>println</tt>
+ are overwritten to send their output the the <tt>Dragonfly:STDOUT</tt> buffer, allowing
+ Dragonfly to ensure pages are displayed properly.</p>
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="_regex-captcha"></a><h3><font color=#CC0000>regex-captcha</font></h3>
+<b>syntax: (<font color=#CC0000>regex-captcha</font> <em>str-regex</em> <em>str</em> [<em>int-options</em>] [<em>int-captcha</em>])</b><br/>
+<b>parameter: </b><em>int-options</em> - options to regex, defaults to 0.<br/>
+<b>parameter: </b><em>int-captch</em> - which of the regex group captures to return, defaults to 1.<br/>
+ <p>Returns the captured text, or nil if it couldn't be captured.<br/>This is a global function.</p>
+ <b>example:</b>
+ <pre> (regex-captcha {^(foo|bar).*} "foobaz") => "foo"
+ (regex-captcha {^(foo|bar).*} "bazfoo") => nil</pre>
+<br/><br/>
+<br/><br/><center>- &sect; -</center><br/>
+<a name="_load-files-in-dir"></a><h3><font color=#CC0000>load-files-in-dir</font></h3>
+<b>syntax: (<font color=#CC0000>load-files-in-dir</font> <em>str-dir</em> <em>regex-match</em>)</b><br/>
+ <p>Loads all the files in <em>str-dir</em> matching <em>regex-match</em>. Does not
+ traverse subdirectories.<br/>This is a global function.</p>
+<br/><br/>
+<br/><br/><center>- &sect; -</center><br/>
+<a name="_into-ctx-assoc"></a><h3><font color=#CC0000>into-ctx-assoc</font></h3>
+<b>syntax: (<font color=#CC0000>into-ctx-assoc</font> <em>ctx</em> <em>list-assoc</em>)</b><br/>
+ <p>Places the key/value pairs in <em>list-assoc</em> into the context <em>ctx</em>
+ to be used as a lookup table.<br/>This is a global function.</p>
+ <b>example:</b>
+ <pre> (new Tree 'MyCtx)
+ (into-ctx-assoc MyCtx '(
+     ("key" "value")
+     ("apple" "mmmm... good")
+     ("organic?" true)
+ ))</pre>
+<br/><br/>
+
+<br/><br/><center>- &part; -</center><br/>
+<center><font face='Arial' size='-2' color='#444444'>
+generated with <a href="http://newlisp.org">newLISP</a>&nbsp;
+and <a href="http://newlisp.org/newLISPdoc.html">newLISPdoc</a>
+</font></center>
+</blockquote>
+</body>
+</html>

File example-site/dragonfly-framework/dragonfly.lsp

-;;  Copyright (C) <2009> <Marc Hildmann, Greg Slepak>
-;;
-;;  This program is free software: you can redistribute it and/or modify
-;;  it under the terms of the GNU General Public License as published by
-;;  the Free Software Foundation, either version 3 of the License, or
-;;  (at your option) any later version.
-;;
-;;  This program is distributed in the hope that it will be useful,
-;;  but WITHOUT ANY WARRANTY; without even the implied warranty of
-;;  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-;;  GNU General Public License for more details.
-;;  You should have received a copy of the GNU General Public License
-;;  along with this program.  If not, see <http://www.gnu.org/licenses/>.
-;;
-;; @module Dragonfly
-;; @author Marc Hildmann <marc.hildmann at gmail.com>, Greg Slepak <greg at taoeffect.com>
+;; @module dragonfly.lsp
+;; @description The heart of Dragonfly - A newLISP web framework for rapid web development.
 ;; @version 0.50
-;; 
+;; @author Greg Slepak, Marc Hildmann (Team Dragonfly 2009)
 ;; @location http://code.google.com/p/dragonfly-newlisp/
-;; @description A newLISP web framework for rapid web development
-;; <h4>About Dragonfly web framework</h4>
-;; <p>Dragonfly is a small web framework which is currently under heavy development.
-;; Its's features are a short learning curve, lightweight and fun in programming - 
-;; just like newLISP itself.</p>
+;; <br>This file is the main entry-point of the Dragonfly framework and
+;; contains several important functions, as well as the default route
+;; definitions. The functions here are in the 'Dragonfly' context (alias 'DF'),
+;; which is the context your static files will be evaluated in by default.
+;; Therefore all of the functions here can be called in your templates without
+;; needing to be context-qualified.
+;; <br><br>Dragonfly's design is very simple, you can actually read through its
+;; source in very little time to get a great understanding of exactly how
+;; it works, and to get an idea of what sorts of tricks you can do to
+;; customize it to your liking (remember, newLISP is <extremely> dynamic!).
+;; <h3>The 'listener' function</h3>
+;; The 'listener' function is called in 'index.cgi'. It is the function that
+;; kicks everything off by looping through the available routes, finding a
+;; match, running it, sending the output to the browser, and then exiting.
+;; <br><br>Before all of that, the very *first* thing it does is load the
+;; plugins in the 'dragonfly-framework/plugins-active' folder, giving them
+;; an opportunity to do any special customization that they might require.
+;; <h3>Environment Variables</h3>
+;; At the very top of the 'config.lsp' file there is the following line:
+;; <pre> (dolist (x (env)) (constant (global (sym (upper-case (first x)))) (last x)))</pre>
+;; This line simply loops through every environment variable and makes a
+;; global symbol out of it. This makes it extremely simple to access environment
+;; variables, simply type their name! If you prefer PHP-style, you can
+;; access them through the '$SERVER' function (simply a synonym for 'env').
+;; <br><br>To access any web parameters, files, and cookies use the functions '$GET', '$POST',
+;; '$FILES', and '$COOKIES', respectively. See 'Request.lsp' for more information.
+;; <h3>Routes</h3>
+;; <p>Routes are FOOP objects inheriting from the Route class. They should have the 'Route.' prefix.
+;; Currently they only need to support two functions: 'matches?' and 'run'.</p>
+;; <p>The listener loops through the available routes and calls 'matches?' on them
+;; with no arguments. The route must decide, based on any data available to it,
+;; whether or not it to return a non-nil value from 'matches?'.</p>
+;; Here, for example, is the 'matches?' function for 'Route.Resource':
+;; <pre> (define (matches?)
+;;     (when (regex {^([a-z]\w+)(/([a-z]\w+))?(/(\d+))?(\.([a-z]+))?} QUERY_STRING 1)
+;;         (set 'resource_name $1 'resource_action $3 'resource_id $5 'response_format $7)
+;;         (file? (set 'path (DF:resource-path resource_name)))
+;;     )
+;; )
+;; </pre>
+;; There are two default routes: 'Route.Static' and 'Route.Resource'. See the
+;; documentation on the example-site and in 'config.lsp' for more information on
+;; what they do.
+;; <h3>Resources</h3>
+;; 'Route.Resource' handles URLs that refer to RESTful resources, represented as FOOP objects
+;; deriving from the 'Resource' class. The resources reside in the 'RESOURCES_PATH' as .lsp files.
+;; The URL scheme works in a similar manner to twitter's RESTful API:
+;; <pre>http://mysite.com/<resource>[/<action>][/<id>][.<response_format>][?get paramters...]</pre>
+;; 'resource' maps to a context name in a special way. First 'Resource.' is prepended
+;; to the name, then the underscores are removed and the name is written in title case.
+;; The 'resource' may only have the letters A-Z (lowercase or uppercase), 0-9, the underscore,
+;; and it must begin with a letter.
+;; <br/><pre> my_resource => Resource.MyResource</pre>
+;; The name also maps to a real file located in 'RESOURCES_PATH' by appending ".lsp" to the name:
+;; <br/><pre> my_resource => load file: RESOURCES_PATH/my_resource.lsp</pre>
+;; If 'resource' implements 'action', then that function is called.
+;; Like 'resource', 'action' may only contain letters, numbers, and the underscore.
+;; If no 'action' is specified, then the resource's default function is called instead.
+;; <p>The optional paramters 'id' and 'response_format' are passed in to the function
+;; as parameters (in that order).</p>
+;; <p>'id' may only contain numbers, and 'response_format' may only contain letters.</p>
+;; <h3>Plugins</h3>
+;; There are two types of plugins, those in the 'plugins-active' folder, and those
+;; in the 'plugins-inactive' folder. The ones in the former are loaded when 'listener'
+;; is called, prior to running the routes. Every .lsp file in the 'plugins-active' folder
+;; is loaded at that point, so you'll only want your most frequently used files in there.
+;; <p>A good example of an active plugin is a custom route. Defining a custom route consists
+;; of two basic steps: creating your 'Route' "subclass", and adding an instance of
+;; it to 'Dragonfly:dragonfly-routes'. Take a look at how it's done in the source of
+;; 'dragonfly.lsp' for more info.</p>
+;; <p>Inactive plugins are simply those that should be loaded on a "need to use" basis.
+;; Most plugins will probably fall into this category. Use 'Dragonfly:activate-plugin'
+;; to load them. All plugins are loaded exactly once, no matter how many times
+;; 'activate-plugin' is called on them.</p>
+
 
 ;===============================================================================
 ; !Basic Setup, Global Vars, and Sanity Checks
 (constant 'DRAGONFLY_MINOR 50)
 (constant 'DRAGONFLY_VERSION (format "Version %d.%d" DRAGONFLY_MAJOR DRAGONFLY_MINOR))
 
-; This is the buffer that contains the content that will get written
-; to STDOUT if no errors are thrown. In the Dragonfly context 'print'
-; and 'println' are overridden to write to this buffer.
+;; @syntax STDOUT
+;; This is the buffer that contains the content that will get written
+;; to STDOUT if no errors are thrown. 'MAIN:print' and 'MAIN:println'
+;; are globally overridden to write to this buffer.
+;; Normally you should never need to modify this variable, however it is
+;; documented for reference's sake.
 (define STDOUT "")
 
 ; you can customize this variable with your own routes, note
 ; !Public Functions
 ;======================================================================