in reply to RE: Perl to Video?
in thread Perl to Video?

More detail... ok. I have three log files generated from Perl scripts. Each line contains ASCII text. I need to set up large video monitors/projectors so a large room can see the last entry of each log on each monitor. The screen would then be refreshed if a new entry to the log was made.

Replies are listed 'Best First'.
RE: RE: RE: Perl to Video?
by Anonymous Monk on Sep 01, 2000 at 05:37 UTC
    ok, then i would definitely use, say, 3 old 486s - one for each monitor. If these are video monitors, as opposed to computer monitors, you'll need to either have video cards with TV out (PCI ATI All-in-Wonder or similar) or have an external scan converter for each PC (about $US 100 each) on your master station (could be one of the PCs driving the monitor), write a CGI script that performs a one-line tail on the specified logfile, and returns the text. Now you need to render the text into something readable from a distance. Use Perl/Tk to create a window with a label rendered in a large font (you may have to implement word-wrapping and create & destroy several labels at a time). Then simply set an infinite loop running, where each slave computer requests the cgi program from the masters web server using LWP, destroy the old labels and draw new ones. I would consider implementing the GUI clients in Java since its much easier (IMHO) to do graphical stuff like double buffering than it is with Perl/Tk courtesy of the AWT libraries. Its easy and fun to do cool stuff like fade out the previous line/wipe/dissolve etc. in Java. However the approach is identical whether you use java or perl and should work fine. I'm not sure if theres an SVGALIB/VESA SVGA library binding for Perl, but you might also consider doing it using the console framebuffer rather than an X/Windows/MacOS GUI Window.
RE: RE: RE: Perl to Video?
by b (Beadle) on Sep 01, 2000 at 02:22 UTC
    Why not just take 3 dumb terminals, log into the main machine and do `tail -f logfile`

    You can connect the projector as the display for each terminal.