r109193 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r109192‎ | r109193 | r109194 >
Date:19:46, 17 January 2012
Author:ezachte
Status:deferred
Tags:
Comment:
new name BookTool
Modified paths:
  • /trunk/wikistats/pediapress/WikiCountsPediaPress.pl (modified) (history)

Diff [purge]

Index: trunk/wikistats/pediapress/WikiCountsPediaPress.pl
@@ -14,21 +14,29 @@
1515 use WikiCountsLog ;
1616
1717 $dir_in = "W:/\# In PediaPress" ;
18 - $dir_out = "W:/\# Out Test/csv_wp" ;
 18+ $dir_out = "W:/\@ Report Card/PediaPress" ;
1919
2020 $file_csv_country_codes = "CountryCodes.csv" ;
2121 $file_csv_country_meta_info = "SquidReportCountryMetaInfo.csv" ;
2222
2323 &ReadInputCountriesNames ;
2424
25 - &ReadMonthlySales ("$dir_in/wmf-report-2010-08.csv") ;
26 - &ReadMonthlySales ("$dir_in/wmf-report-2010-09.csv") ;
 25+ &ReadMonthlySales ("$dir_in/wmf_report_2010-08.csv") ;
 26+ &ReadMonthlySales ("$dir_in/wmf_report_2010-09.csv") ;
 27+ &ReadMonthlySales ("$dir_in/wmf_report_2010-10.csv") ;
 28+ &ReadMonthlySales ("$dir_in/wmf_report_2010-11.csv") ;
 29+ &ReadMonthlySales ("$dir_in/wmf_report_2010-12.csv") ;
 30+ &ReadMonthlySales ("$dir_in/wmf_report_2011-01.csv") ;
 31+ &ReadMonthlySales ("$dir_in/wmf_report_2011-02.csv") ;
 32+ &ReadMonthlySales ("$dir_in/wmf_report_2011-03.csv") ;
 33+ &ReadMonthlySales ("$dir_in/wmf_report_2011-04.csv") ;
 34+ &ReadMonthlySales ("$dir_in/wmf_report_2011-05.csv") ;
2735
2836 &ProcessMonthlySales ;
2937
30 - &WriteMonthlySales ("$dir_out/PediaPressSalesMonthlyCountriesHorizontal.csv",
31 - "$dir_out/PediaPressSalesMonthlyCountriesVertical.csv",
32 - "$dir_out/PediaPressSalesMonthlyCountriesPlotBooks.csv") ;
 38+ &WriteMonthlySales ("$dir_out/BookToolSalesMonthlyDetailedOneRowPerMonth.csv",
 39+ "$dir_out/BookToolSalesMonthlyDetailedBreakdownPerCountry.csv",
 40+ "$dir_out/BookToolSalesMonthlyConciseBooksShippedOnly.csv") ;
3341
3442 print "\n\Ready\n\n" ;
3543 exit ;
@@ -177,7 +185,7 @@
178186 print "$line_csv2\n" ;
179187 print CSV_OUT "$line_csv2\n" ;
180188
181 - foreach $month (sort {$b cmp $a} keys %months)
 189+ foreach $month (sort {$a cmp $b} keys %months)
182190 {
183191 $line_csv = "$month" ;
184192 foreach $country (sort {$sales_per_country {$b} <=> $sales_per_country {$a}} keys %sales_per_country)
@@ -207,7 +215,7 @@
208216 print $line_csv ;
209217 print CSV_OUT $line_csv ;
210218
211 - foreach $month (sort {$b cmp $a} keys %months)
 219+ foreach $month (sort {$a cmp $b} keys %months)
212220 {
213221 $line_csv = "$month," . $metrics_monthly {"$month,$country_code"} . "\n";
214222 print $line_csv ;
@@ -233,7 +241,7 @@
234242 print "$line_csv\n" ;
235243 print CSV_OUT "$line_csv\n" ;
236244
237 - foreach $month (sort {$b cmp $a} keys %months)
 245+ foreach $month (sort {$a cmp $b} keys %months)
238246 {
239247 $line_csv = "$month" ;
240248 foreach $country_code (sort {$sales_per_country {$b} <=> $sales_per_country {$a}} keys %sales_per_country)

Status & tagging log