Skip to content
This repository has been archived by the owner. It is now read-only.

Commit

Permalink
Add a --year option to sizes.pl
Browse files Browse the repository at this point in the history
  • Loading branch information
iay committed Nov 7, 2016
1 parent 7b6c3f5 commit a516eb4
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions charting/sizes.pl
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,18 @@
# Parse command line arguments
use Getopt::Long;
my $allMonths;
GetOptions('all' => \$allMonths);
my $oneYear;
GetOptions('all' => \$allMonths, 'year' => \$oneYear);

# By default, only show results for the most recent month
if (!$allMonths) {
if ($allMonths) {
# leave table intact
} elsif ($oneYear) {
# reduce months table to just the last 12 entries
@months = @months[-12..-1];
} else {
# reduce months table to one element
my $oneMonth = pop @months;
@months = ( $oneMonth );
@months = @months[-1..-1];
}

# ingest files
Expand Down

0 comments on commit a516eb4

Please sign in to comment.