I need a template engine (preprocessor) for Windows that allows me to define my own (very simple) language. I need it for generating html files. It should be able to make macro substitutions but also to make replacements like this:
<a target="_blank" href="http://www.example.com">http://www.example.com</a>
I prefer to be able to define replacements in a text file - preferably in a way that looks readable, where you can write
http:// instead of an escape sequence like
http:\/\/ (sed has this issue).
Later edit: meanwhile I managed to do something like this using sed for Windows, but the script looks dreadful:
#Plain link s/lnk\x28\(.*\)\x29/<a target="_blank" href="\1">\1<\/a>/g
Instead, it would be much better to be able to define replacements in a way like this:
#Replace this: lnk(@var) #With this: <a target="_blank" href="$var">$var</a>
Basically I need to compile a source text file into a HTML file.
I'm using Windows 10 x64