[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kckde
From:       Peter Rockai <mornfall () logisys ! dyndns ! org>
Date:       2003-12-15 13:42:40
[Download RAW message or body]

CVS commit by mornfall: 

Finally make this generic enough to not need changes for each and every
issue: get all the dates and possibly headquote from the 00-issueinfo.


  M +14 -4     mkkdetraf   1.4
  M +4 -3      mkstats-knode   1.4


--- kckde/mkkdetraf  #1.3:1.4
@@ -14,4 +14,9 @@
 $isinf =~ /^Issue-Date:[ \t]*([0-9]+)$/sm;
 my $idate = $1;
+$isinf =~ /^Last-Start-Date:[ \t]*([0-9]+)$/sm;
+my $laststdate = $1;
+/()/;
+$isinf =~ /^Headquote:[ \t]*([^\n]+)$/sm;
+my $headquote = $1;
 my $of = "kde${idate}_$issue.xml";
 my $fhtml = "kde${idate}_$issue.html";
@@ -22,5 +27,5 @@
 
 print "running mkstats...\n";
-system "./mkstats $stdate $idate > $idir/05-stats.xml";
+system "./mkstats $laststdate $stdate $idate > $idir/05-stats.xml";
 
 print "building $of...\n";
@@ -43,5 +48,11 @@
 
 <headquote>
+EOF
+;
 
+if ($headquote) {
+    print OUT $headquote;
+} else {
+    print OUT <<EOF
 <p>
 If you like KDE Traffic, please consider making a donation to the KDE 
@@ -50,9 +61,8 @@
 for  details.
 </p>
-
-</headquote>
-
 EOF
 ;
+}
+print OUT "</headquote>";
 opendir D, "$idir";
 for (sort grep (!/^\.|~$|.bak$/, grep (/\.xml$/, (readdir D)))) {

--- kckde/mkstats-knode  #1.3:1.4
@@ -13,8 +13,9 @@
 my %autp;
 my %lautp;
-my $laststday = 20031109;
-my $stday = 20031116;
-my $endday = 20031130;
+my $laststday = $ARGV[0];
+my $stday = $ARGV[1];
+my $endday = $ARGV[2];
 
+print STDERR "Relevant dates: $laststday - $stday - $endday\n";
 while ($i < (scalar @l) / 4) {
         my $idx = $i * 4;


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic