what's the right tool for text file templates?

goran at krampe.se goran at krampe.se
Tue Nov 29 21:28:36 UTC 2005


Hi Larry!

Larry White <ljw1001 at gmail.com> wrote:
> I want to be able to read a text file and have it programmatically perform
> substitution on some of the text.
> 
> The requirement is for something akin to "smalltalk server pages" although
> this isn't for a web app.
> 
> I just want to be able to read a file containing the text "Hello, <%name%>.
> Welcome to my world." and have it return as a string
> "Hello, Joe.  Welcome to my world."
> 
> Is this functionality available in squeak somewhere, perhaps as part of a
> web server framework?

Yup. :)

I have just implemented such a macro processor - should be exactly what
you want, take a look at:
	http://squeak.krampe.se/MacroProc-gk.cs.gz

Cheers, Göran



More information about the Squeak-dev mailing list