diff --git a/charting/saml2.pl b/charting/saml2.pl index 5ab9883c..c5ba8b28 100755 --- a/charting/saml2.pl +++ b/charting/saml2.pl @@ -9,6 +9,18 @@ use Xalan; use Months; +# Parse command line arguments +use Getopt::Long; +my $allMonths; +GetOptions('all' => \$allMonths); + +# By default, only show results for the most recent month +if (!$allMonths) { + # reduce months table to one element + my $oneMonth = pop @months; + @months = ( $oneMonth ); +} + # ingest files foreach $month (@months) { my $fn = "cache/$month.xml"; diff --git a/charting/sizes.pl b/charting/sizes.pl index fd5ed7ac..a7b19fd5 100755 --- a/charting/sizes.pl +++ b/charting/sizes.pl @@ -6,6 +6,18 @@ use File::stat; use Months; +# Parse command line arguments +use Getopt::Long; +my $allMonths; +GetOptions('all' => \$allMonths); + +# By default, only show results for the most recent month +if (!$allMonths) { + # reduce months table to one element + my $oneMonth = pop @months; + @months = ( $oneMonth ); +} + # ingest files foreach $month (@months) { my $fn = "cache/$month.xml"; diff --git a/charting/trust.pl b/charting/trust.pl index 63e5c260..7bf89f04 100755 --- a/charting/trust.pl +++ b/charting/trust.pl @@ -9,6 +9,18 @@ use Xalan; use Months; +# Parse command line arguments +use Getopt::Long; +my $allMonths; +GetOptions('all' => \$allMonths); + +# By default, only show results for the most recent month +if (!$allMonths) { + # reduce months table to one element + my $oneMonth = pop @months; + @months = ( $oneMonth ); +} + # ingest files foreach $month (@months) { my $fn = "cache/$month.xml";