CL-EMB 0.4.3 review
DownloadCL-EMB is a library to embed Common Lisp and special template tags into normal text files
|
|
CL-EMB is a library to embed Common Lisp and special template tags into normal text files. CL-EMB library can be used for dynamically generated HTML pages.
Installation:
CL-EMB can be installed with ASDF-INSTALL.
See http://weitz.de/asdf-install/ for further information.
Usage:
[generic function]
EXECUTE-EMB name &key env generator-maker => string
NAME can be a registered (with REGISTER-EMB) emb code or a pathname (type PATHNAME) of a file containing the code. Returns a string. Keyword parameter ENV to pass objects to the code. ENV must be a plist. ENV can be accessed within your emb code. The GENERATOR-MAKER is a function which gets called with a key and value from the given ENV and should return a generator function like described on
http://www.cs.northwestern.edu/academics/courses/325/readings/graham/generators.html
[generic function]
REGISTER-EMB name code => emb-function
Internally registeres given CODE with NAME to be called with EXECUTE-EMB. CODE can be a string or a pathname (type PATHNAME) of a file containing the code.
[function]
PPRINT-EMB-FUNCTION name
DEBUG function. Pretty prints function form, if *DEBUG* was T when the function was registered.
[function]
CLEAR-EMB name
Remove named emb code.
[function]
CLEAR-EMB-ALL
Remove all registered emb code.
[function]
CLEAR-EMB-ALL-FILES
Remove all registered file emb code (registered/executed by a pathname).
[special variable]
*EMB-START-MARKER* (default "")
End of scriptlet or expression.
[special variable]
*ESCAPE-TYPE*
Default value for escaping @var output is :RAW
Can be changed to :XML, :HTML, :URI, :URL, :URL-ENCODE
[special variable]
*FUNCTION-PACKAGE*
Package the emb function body gets interned to.
Default: (find-package :cl-emb-intern)
[special variable]
*DEBUG*
Debugging mode if T. Default: NIL
[special variable]
*LOCKING-FUNCTION*
Function to call to lock access to an internal hash table. Must accept a function designator which must be called with the lock hold. IMPORTANT: The locking function must return the value of the function it calls!
Requirements:
CL-PPCRE
What's New in This Release:
Faster file reading, new template tag @insert
CL-EMB 0.4.3 search tags