diff options
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..1509a93 --- /dev/null +++ b/README.md @@ -0,0 +1,17 @@ +marigold-cgi +============ + +A Lua CGI scripting toolkit. + +usage +----- + +### retrieving meta-variables + +`marigold.get_metavars()` - returns a table. The keys are the (lowercase) names of the meta-variables described in section 4.1 of RFC 3875 and are associated with their (string) values. + +### generating html + +`marigold.h(tag, attributes_and_children)` - returns a `marigold.html` table. `tag` is a string; `attributes_and_children` is a table containing, uh, tag attributes and children. Attributes are string keys with string values and represent the tag's attributes (e.g. `{id='tag1', class='large blinking'}` converts to `<[tag] id="tag1" class="large blinking"></[tag]>`). Children are the array elements of the table and should contain `marigold.html` tables as values. + +The only thing that is special about `marigold.html` tables is that they can be passed to `marigold.render_html(tbl, indent_level=0)` in order to produce actual string output. |