diff options
author | Aki <please@ignore.pl> | 2024-02-10 23:18:18 +0100 |
---|---|---|
committer | Aki <please@ignore.pl> | 2024-02-10 23:18:18 +0100 |
commit | 94108525d08eaf3e6abb43df1dd7c5ac879a50e4 (patch) | |
tree | f45182cfee12bb3320f95b17a80c37eb035e5c27 | |
parent | 8198597d16b974581e2f7d6bad9d08fa392d2551 (diff) | |
download | activity-94108525d08eaf3e6abb43df1dd7c5ac879a50e4.zip activity-94108525d08eaf3e6abb43df1dd7c5ac879a50e4.tar.gz activity-94108525d08eaf3e6abb43df1dd7c5ac879a50e4.tar.bz2 |
Changed CLI defaults to use rolling and cwd
-rwxr-xr-x | generate.lua | 12 |
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 |