Widgets for the console

I’m currently writing some console commands that are purely for monitoring and need to deal with a lot of statistical data. In short, it were great to have something like a console version of CDetailView and CGridView. Before I start writing my own: Has anyone ever done something like that and would mind sharing their work? :)

Sounds like a great idea!

With ASCII art?

Certainly with ANSI terminal codes ;)

I’m really not sure about ASCII-art. If at all, I’d keep it in the lower ranges. High-ASCII tends to be a problem with the Windows cli. So far, I have settled for four possible widgets:

  • CConsoleDetailView: text-only version of CDetailView

  • CConsoleGridView: Same for the CGridView

  • CConsolePortlet: Speaks for itself

  • CAnsiWidget: Widget for all enhanced text. That is bold, coloured, whatnot

Btw: It’s surprisingly hard to clear the screen with php-cli :lol:

Hm, actually … Integrating PEAR::Text_Figlet might be another fun thing to do B)

What is going on here? Lots of +rep, but I haven’t published a single line of code yet. :blink:


I see two plusses on the first post and one on the second.

I don’t care if you don’t publish any code. :P

It is a good idea!

Yes. That’s quite a lot, if you consider that on average every 14th of my posts is being rewarded with a +1 ;)

Heh. I think I’ll set up a new branch on github today B)

People are just too stingy with the plus button.

I think most people aren’t really aware of them.

And I seem to have angered the git-gods again. So, no new branch today :(