summaryrefslogtreecommitdiff
path: root/generate.lua
diff options
context:
space:
mode:
Diffstat (limited to 'generate.lua')
-rwxr-xr-x[-rw-r--r--]generate.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/generate.lua b/generate.lua
index cea6a87..478bc9d 100644..100755
--- a/generate.lua
+++ b/generate.lua
@@ -6,15 +6,16 @@ Generates activity chart
-R Generate rolling chart
<repos...> (optional string) Paths to repositories with activity
]]
-local activity = require "activity"
+local generators = require "activity.generators"
local git = require "activity.git"
local ok, maybe_format = pcall(require, "activity.formats." .. args.f)
if not ok then
- io.stderr:write(("couldn't find specified format: %q\n"):format(args.f))
+ io.stderr:write(("could not find specified format: %q\n\n"):format(args.f))
+ io.stderr:write(maybe_format, "\n")
os.exit(1)
end
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))
+io.write(generators.generate_table(maybe_year, git.lookup(args.repos), maybe_format))