On 22 July 2010 09:36, Richard Parsons richard.lee.parsons@gmail.com wrote:
Can anyone recommend to me a commandline templating system?
I want to be able to store information about clients and cases in simple text files and then merge that information into precedent documents. I'll then save and print those documents.
echo "name='Richard Parsons'\naddress='10 Green Hill etc'" > me.txt echo "name='Miles Davies'\naddress='14 Jazz Road etc'" > miles.txt echo "Hey $to.name of $to.address,\nGreat album!\nTake care,\n$from.name of $from.address" > precedent.txt magic-template-script -from me.txt --to miles.txt < precedent.txt > letter.txt
Hah. I have in the past had perverted ideas of using the C preprocessor to do this.
It does seem to work, but I've never really done anything major with it.
Srdjan