PDA

View Full Version : writing txt to template



terhje
6th June 2011, 13:38
Hey, im making a program for circuit boards and need it to generate a report of the spesifications. Theres allot of "fixed" text in the report, but I need to fill in some values. How would you guys solve this? is there some sort of template i could use?

thx, Terje

nightghost
6th June 2011, 14:08
Well the most obvious method is:


Report for <NAME>, date: <DATE>

<DESCRIPTION>
<REPORT-LEVEL-1>
...


and than make a search an replace. But it depends what you need. A short googling showed up https://www.gitorious.org/grantlee/pages/Home But I never used it.