Improve documentation for count_commits
Change-Id: I56767ffe22cdb67e0ac6b177a2a1a1e79f1742d0
diff --git a/bin/count_commits b/bin/count_commits
index e700424..d765c71 100755
--- a/bin/count_commits
+++ b/bin/count_commits
@@ -2,14 +2,17 @@
use strict;
use warnings;
use Mojo::File qw'path';
+use Mojo::Util qw!extract_usage!;
use feature 'say';
use DateTime;
use Getopt::Long;
GetOptions (
"help|h" => sub {
- say "--quarter (Defaults to month)";
- say "--current (Default to last)";
+ say "--quarter (show statistics for a quarter instead of a month)";
+ say "--current (show statistics for the current instead of the last unit)";
+ say "--user []";
+ say extract_usage;
exit(0);
},
"quarter|q" => \(my $quarter),
@@ -97,8 +100,16 @@
exit(0);
+__END__
+
=pod
+=head1 SYNOPSIS
+
+ Usage: count_commits --quarter --current --user Akron
+
+=head1 DESCRIPTION
+
This script will count and sum up all commits
in all repositories listed in the configured repositories
for a certain user in the current branches.
@@ -113,6 +124,8 @@
/path/to/my/repo2
...
+The username has to be in the first line and written in square brackets.
+
Two different time ranges are supported:
Per default the last finished month