#!/usr/bin/lua 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 (optional string) Paths to repositories with activity ]] local activity = require "activity" 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)) 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))