'''Template and [macro] processing''' is perhaps more common in Tcl than many [scripting language%|%scripting languages], and many tools have been published. ** See Also ** [Templates and subst]: presents `substify` and `applytemplate`. [Web Templating]: [Text Clipboard]: [Code Generation]: [FrontLine]: [Backquoting]: [castle]: [ctrans]: [emacs package to insert templated code interactively]: [tic-tac-toe]: not just a game - it is a templating system as well! [handlebars]: [mustache]: [Preprocessor]: [Macro Facility for Tcl]: a discussion that includes some ideas and examples from [RS], [jcw], and others ** Macro/Substitution Tools ** [expand], by [William Duquette]: A dedicated T/M processor. The core of expand was added to [tcllib]/[textutil]. [Tmac - a Tcl macro processor package%|%Tmac], by [Roy Terry]: a general-purpose [macro] package for expanding and substituting Tcl code. [Sugar], by [SS] : a [Lisp]-like [macro] system for Tcl. [Subst template expansion helpers]: [http://chiselapp.com/user/pspjuth/repository/tcl/home%|%Peter Spjuth's Chiselapp]: includes "an experminent on compiled macros" with a very small core mod ([http://sourceforge.net/p/tcl/patches/535/%|%original patch submission @ sourceforge%|%]). This is interesting for the very simplicity of the approach [knit], by [PYK]: a [macro] system that leverages `[tailcall]` [cmacro]: a C-preprocessor-like macro substitution mechanism for Tcl source code. [Percent Substitution]: [tpp]: A CPP-like preprocessor. [FrontLine], by [Koen Van Damme]: the author has used Frontline to write a preprocessor based upon Tcl to get more power than provided by the [C]/C++ preprocessor. ** Template Tools ** [TclHttpd], by [Brent Welch]: a web server that includes a template processor [Kinetic Application Processor], by [AsiaInfo]: a web server that includes a template processor [http://browsex.com/TML.html%|%Tml] a component of [BrowseX]: a template processing system for both dynamic and static content. [Apache] [Rivet]: the successor to [mod_dtcl]. `rivet::parse` can be used to create macros [mod_dtcl]: [nstcl]: the [OpenACS] templating system [scripted templates]: where the template itself is a syntactically valid Tcl script [https://github.com/hartcw/smacro%|%smacro]: A tool for programmatically generating embedded content within a file, similar to C/C++ preprocessor directives, except that the embedded code is expressed in Tcl. [teaspoon], by [xan]: a PHP-like templating engine for Tcl, and works particularly well with tanzer [TemplaTcl]: has just two tags, ASP-like, easily expandable, and relatively safe, as it runs in a safe interpreter. [tmpl_parser]: [https://github.com/23/openliquid%|%Open Liquid]: is a parsing and rendering engine for the Liquid Markup Language, written in C++ with the goal of being bindable to any scripting language interpreter. Currently, only Tcl is supported through the Tcl C API. [TemplateRecall]: [http://chiselapp.com/user/jdc/repository/tclTemplateToolkit2/home%|%tclTemplateToolkit2]: A partial Tcl implementation of the http://template-toolkit.org/%|%TemplateToolkit%|%: ** Description ** The cardinal rule for templating a Tcl [script] is that a value being interpolated into a Tcl script as a word must be escaped as a [list] containing that value as its lone word. This rule does not apply, of course, to the interpolation script fragments. See [Tcl Quoting] for further discussion. <> Word and Text Processing | Template