Changeset 28

Show
Ignore:
Timestamp:
10/04/06 23:29:43 (7 years ago)
Author:
lincoln
Message:

added non-docuemnted --raw option to yahoo7widget grabber

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • grabbers/yahoo7widget

    r4 r28  
    7171my $region =            94; 
    7272my $time_offset =       0; 
     73my $opt_raw; 
    7374 
    7475GetOptions( 
     
    9192        'ready'         => \$opt_version, 
    9293        'desc'          => \$opt_desc, 
     94        'raw=s'         => \$opt_raw, 
    9395        'v'             => \$opt_help); 
    9496 
     
    130132        die "WARNING: channels file $opt_channels_file could not be read\n"; 
    131133} 
     134 
     135unlink $opt_raw if ($opt_raw); 
    132136 
    133137for (my $currtime = $starttime; $currtime < $endtime; $currtime += 86400) { 
     
    215219                $outputdata .= chr((((ord(substr($data,$pos,1))) % 256) ^ ($xlate_pos3 % 256)) % 256); 
    216220        } 
     221 
     222        if ($opt_raw) { 
     223                if (open(F,">>$opt_raw")) { 
     224                        print F $outputdata; 
     225                        close F; 
     226                } 
     227        } 
     228 
    217229        return($outputdata); 
    218230}