tdroadmap_merger/gettd.pl
author victorp@symbian.org
Thu, 06 Aug 2009 17:06:53 +0100
changeset 28 7dccd04e54f9
parent 27 cad9fdd53748
child 32 d1d21a2aeabc
permissions -rw-r--r--
gettd.pl v0.5, support for bklog compare and fix feature count
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
28
7dccd04e54f9 gettd.pl v0.5, support for bklog compare and fix feature count
victorp@symbian.org
parents: 27
diff changeset
     1
#!/usr/bin/perl
7dccd04e54f9 gettd.pl v0.5, support for bklog compare and fix feature count
victorp@symbian.org
parents: 27
diff changeset
     2
23
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
     3
 
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
     4
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
     5
use IO::Socket; 
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
     6
use Getopt::Long;
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
     7
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
     8
24
8fb98cf0b1ac remove authentication as default, added -a option for cookies
victorp@symbian.org
parents: 23
diff changeset
     9
my $target_url; #target url for the roadmap
8fb98cf0b1ac remove authentication as default, added -a option for cookies
victorp@symbian.org
parents: 23
diff changeset
    10
my $tdomain; #tag for the domain to be use in csv file
8fb98cf0b1ac remove authentication as default, added -a option for cookies
victorp@symbian.org
parents: 23
diff changeset
    11
my $csvfile; #output csv file name
25
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
    12
my $authon= '';	 #does it require authorisation? default is false
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
    13
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
    14
my $ispackage;
23
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    15
28
7dccd04e54f9 gettd.pl v0.5, support for bklog compare and fix feature count
victorp@symbian.org
parents: 27
diff changeset
    16
23
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    17
sub getpage
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    18
{
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    19
	#arguments
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    20
	($page,$host,$auth,$myfile)=@_;
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    21
	
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    22
	
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    23
	#output file
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    24
	open ( outputfile, ">".$myfile);
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    25
	
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    26
	
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    27
	$port = "http(80)";
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    28
	$getmess = "GET " . $page ." HTTP/1.1\n" . $auth;
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    29
24
8fb98cf0b1ac remove authentication as default, added -a option for cookies
victorp@symbian.org
parents: 23
diff changeset
    30
	print "INFO - sending message - $getmess\n";
23
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    31
	print outputfile "$getmess\n\n";
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    32
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    33
	$sock = IO::Socket::INET->new 	
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    34
		(
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    35
		 PeerAddr => $host,   PeerPort => $port,  Proto => 'tcp', 
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    36
		) ;
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    37
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    38
 
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    39
	print $sock "$getmess\n\n";
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    40
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    41
 
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    42
	while(<$sock>) {
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    43
 
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    44
	  print outputfile $_;
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    45
 
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    46
	}	
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    47
  	
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    48
	close ($sock);
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    49
	close (outputfile);
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    50
}
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    51
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    52
sub prntfeatures 
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    53
{
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    54
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    55
	($release,$package,$features,$myfile,$domain)=@_;
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    56
	
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    57
	$features = $features."<dt";
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    58
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    59
	
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    60
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    61
	while ( $features =~ /dt\>(.*?)\<\/dt(.*?)\<dt/sg  ){
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    62
		$myfeat = $1;
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    63
		$subfeat =$2;
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    64
		
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    65
		$myfeat =~ s/\n/ /sg;
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    66
		
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    67
		pos($features) = pos($features) -2;
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    68
		
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    69
		$mystr="";
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    70
		while ( $subfeat =~ /\<dd\>(.*?)\<\/dd\>/sg) {
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    71
			$mysubfeat = $mysubfeat.$mystr.$1;
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    72
			$mystr = " & ";
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    73
		}
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    74
		undef $mystr;
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    75
	$mysubfeat =~ s/,/ /sg;
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    76
	$mysubfeat =~ s/\n//sg;
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    77
	$mysubfeat =~ s/\<.*?\>//sg;
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    78
	
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    79
	$release =~ s/\\//sg;	
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    80
	print $myfile " $release, $domain, $package, $myfeat, $mysubfeat\n";
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    81
	
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    82
	$mysubfeat = "";	
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    83
	}
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    84
		
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    85
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    86
}
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    87
	
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    88
sub loadfile
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    89
{
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    90
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    91
	$/ = " ";
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    92
	#arguments
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    93
	($myfile)=@_;
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    94
	open ( inputfile, "<".$myfile);
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    95
	my $contents = do { local $/;  <inputfile> };
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    96
	close(inputfile);
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    97
	return $contents;
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    98
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
    99
}
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   100
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   101
sub td_roadmap
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   102
{
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   103
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   104
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   105
	#arguments
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   106
	($infile,$outfile,$domain,@releases)=@_;
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   107
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   108
	
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   109
	$roadmap=loadfile $infile;
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   110
	open ( outputfile, ">>".$outfile);
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   111
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   112
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   113
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   114
	foreach (@releases) {
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   115
		
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   116
		$exp="\\<h2\\>.*?\\>".$_;
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   117
		
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   118
		if ($roadmap =~ m /($exp)/sg) { 
24
8fb98cf0b1ac remove authentication as default, added -a option for cookies
victorp@symbian.org
parents: 23
diff changeset
   119
			print "PASS - Found entry for $_ \n";
23
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   120
			$relroad =$';	
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   121
			
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   122
			if ($relroad =~ m /(.*?)\<h2/sg) { $relroad =$1;}
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   123
			$i=0;	
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   124
			while ($relroad=~ m/\<h3\>.*\>(.*?)\<.*<\/h3/g) {
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   125
				$package = $1;		
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   126
				$ppos[$i]= pos($relroad);
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   127
				$pname[$i]= $package;
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   128
				$i++;
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   129
			}
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   130
			for ( $i=0;$i<($#ppos); $i++){
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   131
				$features= substr ($relroad, $ppos[$i],$ppos[$i+1]-$ppos[$i]);
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   132
				prntfeatures($_,$pname[$i],$features,outputfile,$domain);
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   133
			}
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   134
			$features= substr ($relroad, $ppos[$i]);
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   135
		
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   136
			prntfeatures($_,$pname[$i],$features,outputfile,$domain);
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   137
			@ppos ="";
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   138
			@pname ="";
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   139
			undef ($features);
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   140
		}
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   141
			 	
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   142
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   143
	}
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   144
	
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   145
	
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   146
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   147
	close (outputfile);
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   148
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   149
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   150
}
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   151
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   152
25
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   153
sub parse_category {
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   154
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   155
	#arguments
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   156
	($infile)=@_;
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   157
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   158
	my @mylink;
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   159
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   160
	$mypage=loadfile $infile;
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   161
	$i=0;	
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   162
	if ( $mypage =~ m/Pages in category(.*)\<\/table/sg) {
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   163
		print "INFO - Category page found\n";
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   164
		$mypage = $1;
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   165
		while ($mypage =~ m /\<a href\=\"(\/wiki\/index\.php\/.*?)\"/g) {
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   166
			
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   167
			$mylink[$i] = $1;	
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   168
			$i++;
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   169
			
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   170
		}
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   171
	print "INFO - Found $i items in the category page\n"
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   172
	}
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   173
	return @mylink;
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   174
}
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   175
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   176
sub parse_bklog {
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   177
	
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   178
	#arguments
28
7dccd04e54f9 gettd.pl v0.5, support for bklog compare and fix feature count
victorp@symbian.org
parents: 27
diff changeset
   179
	($infile,$outfile,$id)=@_;
25
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   180
	$mypkg=loadfile $infile;
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   181
	open ( outputfile, ">>".$outfile);
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   182
	open ( soutputfile, ">>"."summary_".$outfile);
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   183
	
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   184
	if ($mypkg =~ m/index\.php\/(.*?) HTTP/sg) {
28
7dccd04e54f9 gettd.pl v0.5, support for bklog compare and fix feature count
victorp@symbian.org
parents: 27
diff changeset
   185
  
25
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   186
		$pagename = $1;
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   187
		print "INFO -Processing Package $pagename \n";
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   188
		$i=0;
28
7dccd04e54f9 gettd.pl v0.5, support for bklog compare and fix feature count
victorp@symbian.org
parents: 27
diff changeset
   189
		
7dccd04e54f9 gettd.pl v0.5, support for bklog compare and fix feature count
victorp@symbian.org
parents: 27
diff changeset
   190
		while ($mypkg =~ m/\<tr.*?\>(.*?)\<\/tr/sg) {
7dccd04e54f9 gettd.pl v0.5, support for bklog compare and fix feature count
victorp@symbian.org
parents: 27
diff changeset
   191
			next if ($& =~ m/style=\"background-color\:/s);
25
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   192
			$myfeat= $1;
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   193
			$myfeat =~ s/\<\/td\>/\t/sg;
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   194
			$myfeat =~ s/\<.*?\>//sg;
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   195
			$myfeat =~ s/\n//sg;
27
cad9fdd53748 gettd.pl v0.04 - fix to delete empty lines
victorp@symbian.org
parents: 26
diff changeset
   196
			
28
7dccd04e54f9 gettd.pl v0.5, support for bklog compare and fix feature count
victorp@symbian.org
parents: 27
diff changeset
   197
			
7dccd04e54f9 gettd.pl v0.5, support for bklog compare and fix feature count
victorp@symbian.org
parents: 27
diff changeset
   198
			if ($myfeat =~ m/[A-z]/sg and not $myfeat =~ m/\&lt\;etc/sg and 
7dccd04e54f9 gettd.pl v0.5, support for bklog compare and fix feature count
victorp@symbian.org
parents: 27
diff changeset
   199
			not $myfeat =~ m/\&lt\;Feature/sg and not $myfeat =~ m/Item not available/sg) {
27
cad9fdd53748 gettd.pl v0.04 - fix to delete empty lines
victorp@symbian.org
parents: 26
diff changeset
   200
				print outputfile "$pagename\t$myfeat\n";
cad9fdd53748 gettd.pl v0.04 - fix to delete empty lines
victorp@symbian.org
parents: 26
diff changeset
   201
				$i++;
cad9fdd53748 gettd.pl v0.04 - fix to delete empty lines
victorp@symbian.org
parents: 26
diff changeset
   202
			}
25
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   203
			
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   204
		}
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   205
28
7dccd04e54f9 gettd.pl v0.5, support for bklog compare and fix feature count
victorp@symbian.org
parents: 27
diff changeset
   206
	print soutputfile "$id\t$pagename\t$i\thttp://developer.symbian.org/wiki/index.php/$pagename\n";
25
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   207
	
28
7dccd04e54f9 gettd.pl v0.5, support for bklog compare and fix feature count
victorp@symbian.org
parents: 27
diff changeset
   208
25
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   209
	}
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   210
28
7dccd04e54f9 gettd.pl v0.5, support for bklog compare and fix feature count
victorp@symbian.org
parents: 27
diff changeset
   211
	close (outputfile);
7dccd04e54f9 gettd.pl v0.5, support for bklog compare and fix feature count
victorp@symbian.org
parents: 27
diff changeset
   212
	close (soutputfile);
7dccd04e54f9 gettd.pl v0.5, support for bklog compare and fix feature count
victorp@symbian.org
parents: 27
diff changeset
   213
7dccd04e54f9 gettd.pl v0.5, support for bklog compare and fix feature count
victorp@symbian.org
parents: 27
diff changeset
   214
7dccd04e54f9 gettd.pl v0.5, support for bklog compare and fix feature count
victorp@symbian.org
parents: 27
diff changeset
   215
}
7dccd04e54f9 gettd.pl v0.5, support for bklog compare and fix feature count
victorp@symbian.org
parents: 27
diff changeset
   216
25
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   217
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   218
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   219
23
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   220
#help print
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   221
sub printhelp
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   222
{
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   223
28
7dccd04e54f9 gettd.pl v0.5, support for bklog compare and fix feature count
victorp@symbian.org
parents: 27
diff changeset
   224
	print "\n\n version 0.5 
7dccd04e54f9 gettd.pl v0.5, support for bklog compare and fix feature count
victorp@symbian.org
parents: 27
diff changeset
   225
	\ngettd.pl -t=url -d=domain \n\nrequired parameters:\n\t -t url containing the technology domain roadmap\n\t -d the technology domain name
7dccd04e54f9 gettd.pl v0.5, support for bklog compare and fix feature count
victorp@symbian.org
parents: 27
diff changeset
   226
	\n\nOptional parameters\n\t-o filename ,the output is logged into the output.csv file by default\n\t-h for help
7dccd04e54f9 gettd.pl v0.5, support for bklog compare and fix feature count
victorp@symbian.org
parents: 27
diff changeset
   227
	\n\t-a setup authorisation by cookie follow instructions \n\tin http://developer.symbian.org/wiki/index.php/Roadmap_merger_script#Cookies
7dccd04e54f9 gettd.pl v0.5, support for bklog compare and fix feature count
victorp@symbian.org
parents: 27
diff changeset
   228
	\n\t -p adds support for package backlog analysis. just run gettd.pl -p
7dccd04e54f9 gettd.pl v0.5, support for bklog compare and fix feature count
victorp@symbian.org
parents: 27
diff changeset
   229
	\n\t -compare [f1] [f2] compares two package summary files for changes ignores order\n";
23
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   230
	exit;
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   231
}
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   232
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   233
28
7dccd04e54f9 gettd.pl v0.5, support for bklog compare and fix feature count
victorp@symbian.org
parents: 27
diff changeset
   234
7dccd04e54f9 gettd.pl v0.5, support for bklog compare and fix feature count
victorp@symbian.org
parents: 27
diff changeset
   235
#compare bklogs
7dccd04e54f9 gettd.pl v0.5, support for bklog compare and fix feature count
victorp@symbian.org
parents: 27
diff changeset
   236
sub compare_bklogs {
7dccd04e54f9 gettd.pl v0.5, support for bklog compare and fix feature count
victorp@symbian.org
parents: 27
diff changeset
   237
	#arguments
7dccd04e54f9 gettd.pl v0.5, support for bklog compare and fix feature count
victorp@symbian.org
parents: 27
diff changeset
   238
	(@bklogs)=@_;
7dccd04e54f9 gettd.pl v0.5, support for bklog compare and fix feature count
victorp@symbian.org
parents: 27
diff changeset
   239
	
7dccd04e54f9 gettd.pl v0.5, support for bklog compare and fix feature count
victorp@symbian.org
parents: 27
diff changeset
   240
	if (not $#bklogs == 1) { printhelp;}
7dccd04e54f9 gettd.pl v0.5, support for bklog compare and fix feature count
victorp@symbian.org
parents: 27
diff changeset
   241
7dccd04e54f9 gettd.pl v0.5, support for bklog compare and fix feature count
victorp@symbian.org
parents: 27
diff changeset
   242
	
7dccd04e54f9 gettd.pl v0.5, support for bklog compare and fix feature count
victorp@symbian.org
parents: 27
diff changeset
   243
	$cmd ="cut -f 2,3 ". $bklogs[0] . " | sort -u > tmp1.txt";
7dccd04e54f9 gettd.pl v0.5, support for bklog compare and fix feature count
victorp@symbian.org
parents: 27
diff changeset
   244
	
7dccd04e54f9 gettd.pl v0.5, support for bklog compare and fix feature count
victorp@symbian.org
parents: 27
diff changeset
   245
	system($cmd);
7dccd04e54f9 gettd.pl v0.5, support for bklog compare and fix feature count
victorp@symbian.org
parents: 27
diff changeset
   246
	
7dccd04e54f9 gettd.pl v0.5, support for bklog compare and fix feature count
victorp@symbian.org
parents: 27
diff changeset
   247
	$cmd ="cut -f 2,3 ". $bklogs[1] . " | sort -u > tmp2.txt";
7dccd04e54f9 gettd.pl v0.5, support for bklog compare and fix feature count
victorp@symbian.org
parents: 27
diff changeset
   248
	system($cmd);
7dccd04e54f9 gettd.pl v0.5, support for bklog compare and fix feature count
victorp@symbian.org
parents: 27
diff changeset
   249
	
7dccd04e54f9 gettd.pl v0.5, support for bklog compare and fix feature count
victorp@symbian.org
parents: 27
diff changeset
   250
	exec ("diff tmp1.txt tmp2.txt | grep '[<|>]'");
7dccd04e54f9 gettd.pl v0.5, support for bklog compare and fix feature count
victorp@symbian.org
parents: 27
diff changeset
   251
	system("rm temp*.txt");
7dccd04e54f9 gettd.pl v0.5, support for bklog compare and fix feature count
victorp@symbian.org
parents: 27
diff changeset
   252
	
7dccd04e54f9 gettd.pl v0.5, support for bklog compare and fix feature count
victorp@symbian.org
parents: 27
diff changeset
   253
	exit;
7dccd04e54f9 gettd.pl v0.5, support for bklog compare and fix feature count
victorp@symbian.org
parents: 27
diff changeset
   254
7dccd04e54f9 gettd.pl v0.5, support for bklog compare and fix feature count
victorp@symbian.org
parents: 27
diff changeset
   255
}
7dccd04e54f9 gettd.pl v0.5, support for bklog compare and fix feature count
victorp@symbian.org
parents: 27
diff changeset
   256
7dccd04e54f9 gettd.pl v0.5, support for bklog compare and fix feature count
victorp@symbian.org
parents: 27
diff changeset
   257
7dccd04e54f9 gettd.pl v0.5, support for bklog compare and fix feature count
victorp@symbian.org
parents: 27
diff changeset
   258
7dccd04e54f9 gettd.pl v0.5, support for bklog compare and fix feature count
victorp@symbian.org
parents: 27
diff changeset
   259
23
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   260
#process command line options
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   261
sub cmd_options
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   262
{
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   263
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   264
  my $help;
28
7dccd04e54f9 gettd.pl v0.5, support for bklog compare and fix feature count
victorp@symbian.org
parents: 27
diff changeset
   265
  my @compare;
23
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   266
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   267
28
7dccd04e54f9 gettd.pl v0.5, support for bklog compare and fix feature count
victorp@symbian.org
parents: 27
diff changeset
   268
  GetOptions('h' => \$help,'t=s'=> \$target_url, 'd=s' => \$tdomain , 'o=s' => \$csvfile, 
7dccd04e54f9 gettd.pl v0.5, support for bklog compare and fix feature count
victorp@symbian.org
parents: 27
diff changeset
   269
	'a' => \$authon , 'p' => \$ispackage, 'compare=s{2}' =>\@compare);
7dccd04e54f9 gettd.pl v0.5, support for bklog compare and fix feature count
victorp@symbian.org
parents: 27
diff changeset
   270
7dccd04e54f9 gettd.pl v0.5, support for bklog compare and fix feature count
victorp@symbian.org
parents: 27
diff changeset
   271
  if (@compare) {
7dccd04e54f9 gettd.pl v0.5, support for bklog compare and fix feature count
victorp@symbian.org
parents: 27
diff changeset
   272
	compare_bklogs @compare;
7dccd04e54f9 gettd.pl v0.5, support for bklog compare and fix feature count
victorp@symbian.org
parents: 27
diff changeset
   273
	
7dccd04e54f9 gettd.pl v0.5, support for bklog compare and fix feature count
victorp@symbian.org
parents: 27
diff changeset
   274
  }
23
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   275
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   276
  if ($help) {
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   277
    printhelp;
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   278
  }
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   279
28
7dccd04e54f9 gettd.pl v0.5, support for bklog compare and fix feature count
victorp@symbian.org
parents: 27
diff changeset
   280
25
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   281
 if ($ispackage) {
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   282
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   283
 	$tdomain =" ";
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   284
	$target_url = "http://developer.symbian.org/wiki/index.php/Category:Package_Backlog";
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   285
	
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   286
 }  
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   287
 
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   288
23
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   289
 if ( not $target_url) {
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   290
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   291
	print "ERROR-missing arguments target url\n";
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   292
	printhelp;	
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   293
  } 
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   294
25
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   295
23
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   296
 if (not $tdomain){
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   297
	print "ERROR-missing arguments domain level\n";
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   298
	printhelp;
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   299
 }
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   300
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   301
 	print "\nINFO-downloading $target_url with label $tdomain\n";
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   302
  
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   303
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   304
 if (not $csvfile) {
28
7dccd04e54f9 gettd.pl v0.5, support for bklog compare and fix feature count
victorp@symbian.org
parents: 27
diff changeset
   305
	if (not $ispackage) { 
7dccd04e54f9 gettd.pl v0.5, support for bklog compare and fix feature count
victorp@symbian.org
parents: 27
diff changeset
   306
		$csvfile="output.csv";
7dccd04e54f9 gettd.pl v0.5, support for bklog compare and fix feature count
victorp@symbian.org
parents: 27
diff changeset
   307
		system ("rm output.csv");
7dccd04e54f9 gettd.pl v0.5, support for bklog compare and fix feature count
victorp@symbian.org
parents: 27
diff changeset
   308
	} else {
7dccd04e54f9 gettd.pl v0.5, support for bklog compare and fix feature count
victorp@symbian.org
parents: 27
diff changeset
   309
		$csvfile="output.txt";
7dccd04e54f9 gettd.pl v0.5, support for bklog compare and fix feature count
victorp@symbian.org
parents: 27
diff changeset
   310
		system ("rm *output.txt");
7dccd04e54f9 gettd.pl v0.5, support for bklog compare and fix feature count
victorp@symbian.org
parents: 27
diff changeset
   311
7dccd04e54f9 gettd.pl v0.5, support for bklog compare and fix feature count
victorp@symbian.org
parents: 27
diff changeset
   312
	}
23
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   313
 }
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   314
 print "\nINFO-output recorded in $csvfile \n";
24
8fb98cf0b1ac remove authentication as default, added -a option for cookies
victorp@symbian.org
parents: 23
diff changeset
   315
8fb98cf0b1ac remove authentication as default, added -a option for cookies
victorp@symbian.org
parents: 23
diff changeset
   316
8fb98cf0b1ac remove authentication as default, added -a option for cookies
victorp@symbian.org
parents: 23
diff changeset
   317
23
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   318
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   319
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   320
}
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   321
#main
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   322
$/ = " ";
25
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   323
$host1 = "developer.symbian.org";
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   324
24
8fb98cf0b1ac remove authentication as default, added -a option for cookies
victorp@symbian.org
parents: 23
diff changeset
   325
cmd_options();
23
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   326
24
8fb98cf0b1ac remove authentication as default, added -a option for cookies
victorp@symbian.org
parents: 23
diff changeset
   327
if ($authon) {
8fb98cf0b1ac remove authentication as default, added -a option for cookies
victorp@symbian.org
parents: 23
diff changeset
   328
	#file containing login details from http cookie
8fb98cf0b1ac remove authentication as default, added -a option for cookies
victorp@symbian.org
parents: 23
diff changeset
   329
	$mycookie = loadfile("mycookie.txt");
23
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   330
24
8fb98cf0b1ac remove authentication as default, added -a option for cookies
victorp@symbian.org
parents: 23
diff changeset
   331
	$auth = "Cookie: " . $mycookie ;
8fb98cf0b1ac remove authentication as default, added -a option for cookies
victorp@symbian.org
parents: 23
diff changeset
   332
}
23
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   333
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   334
25
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   335
if ($ispackage) {
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   336
	getpage($target_url, $host1, $auth, "debug.txt");
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   337
	@bklog = parse_category("debug.txt");
27
cad9fdd53748 gettd.pl v0.04 - fix to delete empty lines
victorp@symbian.org
parents: 26
diff changeset
   338
	$j=0;
25
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   339
	foreach (@bklog) {
27
cad9fdd53748 gettd.pl v0.04 - fix to delete empty lines
victorp@symbian.org
parents: 26
diff changeset
   340
		getpage("http://".$host1.$_, $host1, $auth, "pkg".$j.".txt");
28
7dccd04e54f9 gettd.pl v0.5, support for bklog compare and fix feature count
victorp@symbian.org
parents: 27
diff changeset
   341
		parse_bklog ("pkg".$j.".txt",$csvfile, $j);
27
cad9fdd53748 gettd.pl v0.04 - fix to delete empty lines
victorp@symbian.org
parents: 26
diff changeset
   342
		$j++;
25
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   343
		
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   344
	
23
dbe87093a3ca adding roadmap_merger script - first version
victorp@symbian.org
parents:
diff changeset
   345
25
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   346
	}
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   347
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   348
} else {
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   349
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   350
	#foundation releases - add as required
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   351
	@releases=("Symbian\\^2","Symbian\\^3","Symbian\\^4");
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   352
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   353
	getpage($target_url, $host1, $auth, "debug.txt");
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   354
	td_roadmap("debug.txt" , $csvfile, $tdomain ,@releases);
7a2c092f0fbf update to roadmap merger to support package backlog analysis
victorp@symbian.org
parents: 24
diff changeset
   355
}