# HG changeset patch # User victorp@symbian.org # Date 1256893750 0 # Node ID 98b4ffa159368250eb13385fb736293d5ed53744 # Parent d182c21c645adaa2104bb41d30103e11ff30ab4a oops, adding the .pl file missed the first time - v1.0 diff -r d182c21c645a -r 98b4ffa15936 scripts/gettd.pl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scripts/gettd.pl Fri Oct 30 09:09:10 2009 +0000 @@ -0,0 +1,431 @@ +#!/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 $ispackage; +my $summaryheader="ID\tPackage\tFeatures\tFormat\tHttp\n" ; +my $newtdformat = 0; +my @blist = ("Tracking_Package_features","PoC_roadmap","Kernel_EPLization_Backlog","Package_Backlog_Q","Wishlist"); + + +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; + + if ($newtdformat) { + $package =~ s/backlog//sgi; + print $myfile " $release, $domain, $package, $myfeat\n"; + + } else { + + $features = $features."