One of the things that I face regularly is report generation. Often they’re free form, by which I mean not tables full of tabulated data.

Output from my htmlAnsii() class

Output from my .htmlAnsii() class

Just “is this ok, is that ok, 27 of the other happened”, that sort of thing. I like to use color — green if everything is ok, red if it isn’t and so on.

I’m often out where I want the report in a web browser. But then again, I’m often at my desk, signed in to a console and I want it there. The environments couldn’t be much more different; HTML tags on the one hand, within the wrapper of a page, and ANSII escape sequences on the other. And they’re both kind of annoying and error-prone to write out explicitly, especially when you’re doing it a lot.

What to do?
Read the rest of this entry »

Tags: , , , , , , , , , ,