Texen 介绍
Texen是一种通用的文字生成工具。能够生产几乎任何种类的文本输出。提供一个Ant的任务, Texen使用一个控制模板,以及一些可选的 worker
模板,用来控制和管理输出。
控制模板示例:
#* **file: Control.vm** This is the control template for our HTML page generator! *# #set ($Planets = ["Earth", "Mars", "Venus"]) #foreach ($planet in $Planets) #set ($outputFile = $strings.concat([$planet, ".html"])) $generator.parse("HtmlTemplate.vm", $outputFile, "planet", $planet) #end
worker模板示例:
#* **file: HtmlTemplate.vm** This is worker template. It is called by the control template to produce useful output (or not so useful in this case). :-) *# #set ($bgcolor = "#ffffff") <html> <head> <title> Everything you wanted to know about $planet! </title> </head> <body bgcolor="$bgcolor"> $planet is a great place to live! </body> </html>
Texen 官网
http://velocity.apache.org/texen/
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。