3

I'm searching for simple way to have mail/report text templates, with variables, and loops of variable elements. For example:

Template is:

List of files is generated in __FOLDER__. It contains:\n

[__FILENAME__\t__FILESIZE__\n]

In the program there is replace of the variable __FOLDER__ with the run-time value of this folder; and the generated on run-time files are put in the report using loop over the template __FILENAME__\t__FILESIZE__\n.

Do you have an idea for library or framework in C++ to help me. 10x

  • possible duplicate of http://stackoverflow.com/questions/355650/c-html-template-framework-templatizing-library-html-generator-library (those don't have to be used with html) – nietaki Apr 06 '12 at 12:46

1 Answers1

1

The often overlooked m4 macro language (available on every Unix, and there seems to be a windows version too) is incredibly useful for this sort of thing. Good docs here and here.

timday
  • 24,582
  • 12
  • 83
  • 135