#!/usr/bin/perl -w # generate an image that contains the last few month's consumption data. # The main work is done in the gnuplot file, this is just a wrapper that # allows to set a few file names and parameters. # Base directories; get modified by configure script # $progroot="/home/chris/construction/BTUmetering"; $progroot="MAINPROGROOT"; # $htdocsroot="/srv/www/htdocs"; $htdocsroot="HTDOCROOT"; $sumdir="$progroot/log"; $htimgroot="$htdocsroot/img2"; $gnudir="$progroot/gnuplot"; $sourcefile="$sumdir/summaryfile"; $targetfile="$htimgroot/overview.png"; # open gnuplot and send it a few parameters $parset = "outfilename=\"$targetfile\"; src=\"$sourcefile\"\n"; # generate image open GNUPLOT, "| gnuplot - $gnudir/consumption.gnu >/dev/null"; print GNUPLOT $parset; close GNUPLOT;