summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgenerate.lua12
1 files changed, 7 insertions, 5 deletions
diff --git a/generate.lua b/generate.lua
index 4b0728f..a97e79d 100755
--- a/generate.lua
+++ b/generate.lua
@@ -2,11 +2,13 @@
local args = require "pl.lapp" [[
Generates activity chart
-f (string default 'ansi') Output format of the chart
- -y (optional number) Year of the chart
- -R Generate rolling chart
+ -y (optional number) Generate yearly chart for selected year
-A... (optional string) Author e-mail addresses to include in chart
-C... (optional string) Committer e-mail addresses to include in chart
<repos...> (optional string) Paths to repositories with activity
+
+By default, tool will generate a rolling chart for selected repositories. If no
+repositories were selected, current working directory will be tried.
]]
local generators = require "activity.generators"
local git = require "activity.git"
@@ -16,9 +18,9 @@ if not ok then
io.stderr:write(maybe_format, "\n")
os.exit(1)
end
-local maybe_year = args.y
-if args.R then
- maybe_year = "rolling"
+local maybe_year = args.y or "rolling"
+if #args.repos < 1 then
+ table.insert(args.repos, ".")
end
local filter, by_author, by_committer
if #args.A > 0 then