TML

All I wanted was to write a useful document on how to use AppGen. Since I had to publish this on to my website at nagesh.net, it had to be html. Now I really am not big with WYSIWYG-editors so I was looking around for a very clean and easy to use html generator which just let me worry about the content rather than the presentation. After a little searching, I found TML which does pretty much everything that I need and in a clean way.

You just have to write your *.tml files in wiki like syntax and run the tml tool i.e. org.antlr.tml.Tool , which has the ability to generate either Lout or HTML. I was just interested in the html part and it works pretty well. Infact the entire antlr and stringtemplate site is based on TML which is pretty neat.

Two small things :
  • If you are writing your *.tml files on Windows then you have to convert the '\r\n' s to '\n' before you pass it on to the TML tool. (Small little quirk) You can rewrite your tml.sh to look like
#/bin/sh!
cat $1 | tr '\r\n' '\n' | java org.antlr.tml.Tool > $2
  • Each line in the <pre> comments gets an extra newline on Windows, so if I have
<<
output foo
output bar
>>

I get:

<pre>

output foo

output bar

</pre>
I haven't been able to figure out a workaround for this. But since the source code is posted on the site, it should'nt be hard to find and fix this.

Other than that TML is just great for my needs. Finally the search for an easy mark up language is successful. You can check out the file generated at http://www.nagesh.net/appgen to see how the output html looks like.

Comments

Popular posts from this blog

Article on WebLogic JSP Container

Yet another Java Blog

AppGen