trac-tickets-stats is a trivial Perl script which can be used to collect statistics about the tickets creation and closure from remote Trac installations. It simply uses Trac timeline page to get this information.
Here is an example of using it:
$ ./trac-ticket-stats trac.wxwidgets.org 2011-07-01 today Ticket statistics for http://trac.wxwidgets.org from 2011-07-01 to 2011-07-24: -------------------- New 58 Closed 78 Reopened 8 -------------------- Delta -12
The script is available at trac-ticket-stats and there is no installation required but you must have a working Perl, see the requirements section below.
You need a working installation of Perl and CPAN to be able to install the following modules: DateTime, DateTime::Format::Natural, Getopt::Long::Descriptive and WWW::Mechanize and their dependencies. No specifically recent version of neither Perl nor these modules is required (although it was only tested with 5.10 and 5.12 so please let us know if it doesn't work with 5.8 or earlier versions for you).
The script requires 3 mandatory parameters:
- Trac URL: The base URL of Trac installation, e.g. trac.example.com. http:// prefix and trailing slash are optional and will be added if not present.
- Starting date of the range to report in any common format. It may also use any relative syntax supported by DateTime::Format::Natural e.g. "1 month ago" or "last Monday".
- End date of the range, a common value is "today".
By default a human-readable report is generated but you may use --csv option to produce the output in machine-readable format using comma separated values and "start date", "end date", "new", "closed" and "reopened" fields.
This script is Free Software released under BSD license.