No modified codes have been submitted for this Microcode.
An Icelandic landscape
14. March 2009
14. March 2009
#!/usr/bin/perl
use LWP::Simple;
@data = get("http://www.google.com/ig/api?weather=Reykjavik") =~ /(\d+)/g;
@char = ('*','.','#');
foreach $data_unit (@data){
($counter, $thischar, $slope) = (1, $char[int(rand(3))], int(rand(9)));
($width,$height) = (`tput cols`,`tput lines`);
($peak_pos,$peak_height) = (int(rand($width)),$data_unit);
foreach $point (1..$height){
if($point>$peak_height){
last if int($width-$peak_pos-int($counter/2))<0;
system 'tput','cup',$point,int($width-$peak_pos-int($counter/2));
print "$thischar"x$counter;$counter = $counter+$slope;
}
}
}