Commit graph

24 commits

Author SHA1 Message Date
Thomas Hochstein 07c0b2589a Release 0.01
Update TODO list.
Update version numbers, ChangeLog, bump copyright
dates.

Signed-off-by: Thomas Hochstein <thh@inter.net>
2013-09-02 13:14:33 +02:00
Thomas Hochstein 25b25735dd Merge branch 'language' into next
* language:
  Some documentation fixes and enhancments.
  Improve INSTALL documentation.
  README: Update copyright notice.
  README: improve phrasing.
2013-09-02 13:00:33 +02:00
Thomas Hochstein 38fa44f89b Merge branch 'thh-bug53' into next
* thh-bug53:
  Improve output padding.
2013-09-02 13:00:05 +02:00
Thomas Hochstein 5cfcb1c061 Merge branch 'thh-checkinput' into next
* thh-checkinput:
  Check for invalid newsgroup names.
2013-09-02 12:59:45 +02:00
Thomas Hochstein 95d9fe2cfd Some documentation fixes and enhancments.
Signed-off-by: Thomas Hochstein <thh@inter.net>
2013-09-02 12:37:13 +02:00
Thomas Hochstein 3f817eb428 Change handling of warnings.
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>
2013-09-02 12:33:51 +02:00
Thomas Hochstein b342fcf030 Improve output padding.
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>
2013-09-02 12:32:07 +02:00
Thomas Hochstein c30822b48b Check for invalid newsgroup names.
Add check to SQLGroupList() and act on it
in groupstats.pl.

Issue #12.

Signed-off-by: Thomas Hochstein <thh@inter.net>
2013-09-02 12:31:55 +02:00
Thomas Hochstein edd250f265 Complete rewrite of groupstats.pl and NewsStats.pm.
* 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>
2012-10-13 00:43:39 +02:00
Thomas Hochstein d3b6810d3d Fix some typos.
groupsstats.pl: Fix typo in lead-in comment.
groupsstats.pl/NewsStats.pm: Fix typo concerning
GetMaxLength - it isn't 'GetMaxLenght' ...

Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-11-01 20:28:31 +01:00
Thomas Hochstein 54d04e84a5 groupstats.pl: Precedence of -m / -p / -a
Unset -m if either -p or -a is set,
unset -m if -p is set.

Print caption (-c) for -a, too.

Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-11-01 20:13:08 +01:00
Thomas Hochstein 628a183c15 groupstats.pl: Change default output format to 'pretty'.
Change documentation accordingly.

Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-11-01 20:12:59 +01:00
Thomas Hochstein 78389b28e9 groupstats.pl: Add '-f' option.
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>
2010-11-01 20:12:50 +01:00
Thomas Hochstein f2ddfd8a92 groupstats.pl: Add '-a' option.
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>
2010-11-01 14:02:47 +01:00
Thomas Hochstein b2e0fd2444 groupstats.pl: Improve formatting of output.
Rewrite captions.

Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-10-31 23:18:53 +01:00
Thomas Hochstein e742bcf550 groupstats.pl: Improve automatic adaption of output type.
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>
2010-10-31 23:15:18 +01:00
Thomas Hochstein b802bc3d29 groupstats.pl: Redo level (-l) query, gain speedup.
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>
2010-10-31 21:43:18 +01:00
Thomas Hochstein 404c1acdc8 groupstats.pl: Improve comments.
Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-10-31 21:39:20 +01:00
Thomas Hochstein 6b95accbb4 groupstats.pl: Refactor query handling.
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>
2010-10-31 21:34:04 +01:00
Thomas Hochstein d8695b1c04 groupstats.pl: More input validation.
Set -o to 'pretty' for time periods.
Set -b to 10 if < 1.

Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-09-18 21:59:13 +02:00
Thomas Hochstein 2832c235b2 Introduce end-of-line normalization and add .gitattributes.
Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-09-18 20:53:31 +02:00
Thomas Hochstein 3430c89868 Add comments and POD.
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>
2010-09-18 20:47:32 +02:00
Thomas Hochstein 13c5a175ef groupstats.pl: Add handling of incompatible command line options.
-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>
2010-09-18 20:45:33 +02:00
Thomas Hochstein 741336c210 Initial checkin of working branch.
Checkin of
- NewsStats.pm
- install/install.pl
- feedlog.pl
- gatherstats.pl
- groupstats.pl

Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-09-18 20:44:56 +02:00