* Move all scripts to /bin
* Move configuration to /etc
* Move NewsStats.pm to /lib
* Add new path to NewsStats.pm to all scripts
* Set $HomePath to top level directory
* Move setting of config file name to ReadConf()
Signed-off-by: Thomas Hochstein <thh@inter.net>
Replace 'perl -W' by 'use warnings;'.
The latter is preferred, and '-W'
(instead of '-w') was causing problems with
warnings in DB::mysql::GetInfo.pm.
Signed-off-by: Thomas Hochstein <thh@inter.net>
Take 'length' of numbers in account.
Change GetMaxLength() accordingly and use that
new information in FormatOutput().
Fixes#53.
Signed-off-by: Thomas Hochstein <thh@inter.net>
* Switch to Getopt::Long, change coding style;
limit line length.
* Replace 'die' and 'warn' by calls to &Bleat().
* Completely redo options and processing:
- merge -m/-p/-a into --month
- replace -i/-q/-d with - much more powerful -
--group-by/--order-by
- replace -t/-l with - much more powerful -
--lower/--upper/--boundary
- remove -b and replace it with --report
Fixes#33.
* Add new report types, boundaries and sorting options:
- report types 'average' and 'sums'
- boundaries 'average' and 'sums'
- upper and/or lower boundary
- sort output independently
Issue #35.
Fixes#34, #38.
* Add possibility to cross-check newsgroups against
checkgroups file.
* Complete rewrite of groupstats.pl internal logic:
- modularize construction fo SQL queries
- remove unnecessary special cases
- refactor code into NewsStats.pm functions as much
as possible
Issue #37.
Fixes#36.
* Rework output formats, fix padding problem by making use
of modularized SQL queries.
Fixes#15, #32.
* Add some more consistency checks.
Issue #12.
* Redo documentation.
* Update TODO list.
Signed-off-by: Thomas Hochstein <thh@inter.net>
Add '-f' switch to save monthly reports to a file with
a filename made up by adding year and month to template
submitted via '-f filename': filename-YYYY-MM
Modify OutputData() accordingly.
Ignore '-c' if '-f' is set.
Allow & force '-o dump' if '-f' is set even if a time
period is defined.
Change documentation accodingly.
Fixes#27.
Signed-off-by: Thomas Hochstein <thh@inter.net>
Add '-a' switch to make groupstats.pl consider its whole
database without any time limits ignoring -m and -p.
Change documentation accodingly.
First implementation. Handling needs improvement!
Fixes#14.
Signed-off-by: Thomas Hochstein <thh@inter.net>
If time period is more than on month, switch from dump
to dumpgroup, if possible (just one newsgroup submitted
via -n), and switch to pretty only if that fails.
Signed-off-by: Thomas Hochstein <thh@inter.net>
Do the work in the application, using two separate SQL
queries, instead of trying to optimize the single
query in vain ...
Thanks to Juliane. :)
Fixes#16.
Signed-off-by: Thomas Hochstein <thh@inter.net>
Don't misuse variables:
- Push other binding vars to (new) @Params instead of
filling up @GroupList with things it wasn't meant for.
- Replace generic @QueryPart by @QueryGroupList and
@QueryThreshold, then build $WhereClause from that.
- Don't use $OrderClause for setting level (more or
less than x), use (new) $Level instead.
Signed-off-by: Thomas Hochstein <thh@inter.net>
Add comments NewsStats.pm
Add POD to install.pl
Add POD to feedlog.pl
Add POD and comments to gatherstats.pl
Add POD and comments to groupstats.pl, beautify code
Signed-off-by: Thomas Hochstein <thh@inter.net>
-t/-l/-b are incompatible. Print warning, let -l take precedence
over -t and -b over both.
-q/-d are incompatible with -l and -b. Print warning, ignore
them.
For -l, only -o 'pretty' makes sense. Force that.
Signed-off-by: Thomas Hochstein <thh@inter.net>