#!/usr/bin/perl $output="work/weatherpaper.png"; # Weather Map `composite -geometry +994+59 /www/global/weathermap-marana.gif work/background.gif $output`; # Current Conditions open(FILEIN,"work/currentconditions.txt"); undef $/; $currentconditions = ; close(FILEIN); print $currentconditions; `convert $output -pointsize "14" -font "/usr/share/fonts/ttf-bitstream-vera/VeraMono.ttf" -draw "fill lightgray text 110,640 '$currentconditions'" $output`; # Zone Forecast open(FILEIN,"/www/global/weather-zoneforecast.txt"); undef $/; $zoneforecast = ; @forecastarray = split(/\n/,$zoneforecast); print scalar @forecastarray . " TOTAL ELEMENTS\n\n\n\n\n\n"; $iterator = 0; for ($index = 0; $index < scalar @forecastarray; $index++) { $forecastarray[$index] =~ s/^\./\n/g; $forecastarray[$index] = lc($forecastarray[$index]); $forecastarray[$index] =~ s/sunday/Sunday/g; $forecastarray[$index] =~ s/monday/Monday/g; $forecastarray[$index] =~ s/tuesday/Tuesday/g; $forecastarray[$index] =~ s/wednesday/Wednesday/g; $forecastarray[$index] =~ s/thursday/Thursday/g; $forecastarray[$index] =~ s/friday/Friday/g; $forecastarray[$index] =~ s/saturday/Saturday/g; $forecastarray[$index] =~ s/^today/Today/g; $forecastarray[$index] =~ s/tonight/Tonight/g; } splice(@forecastarray,0,8); pop(@forecastarray); $zoneforecast = join "\n", @forecastarray; print $zoneforecast; close(FILEIN); `convert $output -pointsize "13" -font "/mnt/archive/fonts-overflow/arialbd.ttf" -draw "fill white text 110,75 '$zoneforecast'" $output`; # Archive Report open(FILEIN,"work/archivereport.txt"); undef $/; $archivereport = ; close(FILEIN); print $archivereport; `convert $output -pointsize "13" -font "/usr/share/fonts/ttf-bitstream-vera/VeraMono.ttf" -draw "fill lightgray text 590,70 '$archivereport'" $output`; # Backlog Report open(FILEIN,"work/backlogreport.txt"); undef $/; $backlogreport = ; close(FILEIN); print $backlogreport; `convert $output -pointsize "13" -font "/usr/share/fonts/ttf-bitstream-vera/VeraMono.ttf" -draw "fill lightgray text 590,430 '$backlogreport'" $output`; # Uptime Report open(FILEIN,"work/uptimereport.txt"); undef $/; $uptimereport = ; close(FILEIN); print $uptimereport; `convert $output -pointsize "13" -font "/usr/share/fonts/ttf-bitstream-vera/VeraMono.ttf" -draw "fill lightgray text 590,670 '$uptimereport'" $output`; # Gentoo Emerge Report open(FILEIN,"work/emergereport.txt"); undef $/; $emergereport = ; close(FILEIN); print $emergereport; `convert $output -pointsize "13" -font "/usr/share/fonts/ttf-bitstream-vera/VeraMono.ttf" -draw "fill lightgray text 590,840 '$emergereport'" $output`; # Router Hits open(FILEIN,"work/routerhits.txt"); undef $/; $routerhits = ; close(FILEIN); print $routerhits; `convert $output -pointsize "12" -font "/usr/share/fonts/ttf-bitstream-vera/VeraMono.ttf" -draw "fill lightgray text 1120,565 '$routerhits'" $output`; # Add updated time and date open(FILEIN,"/www/global/ip.txt"); undef $/; $ipaddress = ; close(FILEIN); print $ipaddress; $updatedtext = "Updated " . localtime() . " for IP $ipaddress"; #$updatedtext = "Updated " . localtime() . " for IP 69.8.201.106"; `convert $output -font "/mnt/archive/fonts-overflow/verdanab.ttf" -pointsize "14" -draw "fill cyan text 1170,800 '$updatedtext'" $output`; # Impact Index `wget http://www.facetime.com/impactcenter/current_index_lrg.gif -O work/impactindex.gif`; `composite -geometry +1500+836 work/iibackground.jpg $output $output`; `composite -geometry +1500+836 work/impactindex.gif $output $output`; # Last Screenshot `composite -geometry +1299+808 work/lastscreenshot.jpg $output $output`; # Internet Traffic Report `wget http://www.InternetTrafficReport.com/sc.gif -O work/trafficreport.gif`; `composite -geometry +1168+934 work/trafficreport.gif $output $output`; system("/usr/kde/3.5/bin/dcop --user quag7 --all-sessions kdesktop KBackgroundIface setWallpaper /scripts/weatherpaper-1680/$output 1"); ########################################### # Update dataswamp.net with uptime report # ########################################### `/scripts/ds-uptime/ds-uptime.sh`;