diff -r ab800b3e45ab -r 13a99a13ca90 scripts/gettd.pl --- a/scripts/gettd.pl Wed Jan 27 10:52:27 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,484 +0,0 @@ -#!/usr/bin/perl - - - -use IO::Socket; -use Getopt::Long; - - -my $target_url; #target url for the roadmap -my $tdomain; #tag for the domain to be use in csv file -my $csvfile; #output csv file name -my $authon= ''; #does it require authorisation? default is false - - -my $count_target; #this value is used to pass a string to match and count on each package backlog -my $ispackage; -my $splitbklogs; -my $summaryheader="ID\tPackage\tFeatures\tFormat\tHttp\n" ; -my $newtdformat = 0; -my @blist = ("Tracking_Package_features","Kernel_EPLization_Backlog", - "Package_Backlog_Q","Wishlist","Test_Package","Backlog_Details"); - - -sub blacklist -{ - ($name)=@_; - - foreach(@blist) { - - if ( $name =~ m/$_/sg) { print "WARNING - $name is blacklisted\n"; return 1;} - } - - return 0; - -} - - -sub getpage -{ - #arguments - ($page,$host,$auth,$myfile)=@_; - - - #output file - open ( outputfile, ">".$myfile); - - - $port = "http(80)"; - $getmess = "GET " . $page ." HTTP/1.1\n" . $auth; - - print "INFO - sending message - $getmess\n"; - print outputfile "$getmess\n\n"; - - $sock = IO::Socket::INET->new - ( - PeerAddr => $host, PeerPort => $port, Proto => 'tcp', - ) ; - - - print $sock "$getmess\n\n"; - - - while(<$sock>) { - - print outputfile $_; - - } - - close ($sock); - close (outputfile); -} - -sub prntfeatures -{ - - ($release,$package,$features,$myfile,$domain)=@_; - - $release =~ s/\\//sg; - $csvdel ="\",\""; - $invcoma ="\""; - if ($newtdformat) { - $package =~ s/backlog//sgi; - print $myfile "$invcoma $release $csvdel $domain $csvdel $package $csvdel $myfeat $invcoma\n"; - - } else { - - $features = $features."