diff options
Diffstat (limited to 'generate.lua')
-rw-r--r-- | generate.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/generate.lua b/generate.lua index a216808..cea6a87 100644 --- a/generate.lua +++ b/generate.lua @@ -3,6 +3,7 @@ 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 <repos...> (optional string) Paths to repositories with activity ]] local activity = require "activity" @@ -12,4 +13,8 @@ if not ok then io.stderr:write(("couldn't find specified format: %q\n"):format(args.f)) os.exit(1) end -io.write(activity.generate_table(args.y, git.lookup(args.repos), maybe_format)) +local maybe_year = args.y +if args.R then + maybe_year = "rolling" +end +io.write(activity.generate_table(maybe_year, git.lookup(args.repos), maybe_format)) |