Introduction
uri-template is a Common Lisp implementation of the URI Template proposed standard draft version 01 as a reader macro, used for both creating and parsing URIs.
Example use explains the concept best:
(let ((foo 1))
#Uhttp://www.example.com/widget/{foo}/parts)
=> "http://www.example.com/widget/1/parts"
(uri-template-bind (#Uhttp://www.example.com/{part}/{number})
"http://www.example.com/widget/1"
(list part (parse-integer number) %uri-host))
=> ("widget" 1 "www.example.com")
Although uri-template does not implement the operators introduced in the 02 and later drafts of the URI Template standard, it does allow arbitrary Lisp expressions in template placeholders, which gives simpler and more powerful templates.
Download
The latest version of uri-template is 1.3, and can be downloaded here. Older versions can be downloaded from the release directory.
Documentation
Documentation is provided in the README file included with the source code.
Source repository
http://github.com/vsedach/uri-template
Parenscript integration
uri-template works with Parenscript to provide template interpolation for JavaScript. To enable this functionality, load Parenscript before loading uri-template. Note that destructuring is currently unsupported for Parenscript.
Mailing list
Project members
uri-template is authored by Vladimir Sedach.
License
uri-template is licensed under the terms of the LLGPLv3 license. Details are contained in the COPYING file, included with the distribution.