The code checks if a boundary is set by looking
for a TRUE value, but 0 is FALSE. It has to check
whether the variable is set, i.e. defined(),
instead.
Fixes#56.
Signed-off-by: Thomas Hochstein <thh@inter.net>
CONFIGURATION section talks about newsstats.conf being
in the same directory which is not true any more since
2ad99c20bc.
It also didn't mention the --conffile option which was
added in 23ab67a099.
Signed-off-by: Thomas Hochstein <thh@inter.net>
Change '--conffile' to 'B<--conffile>'.
The wrong format was added to documentation
in commit
23ab67a099.
Signed-off-by: Thomas Hochstein <thh@inter.net>
All scripts - and the package - have been
restructured in commit
2ad99c20bc,
but version numbers didn't change accordingly.
Signed-off-by: Thomas Hochstein <thh@inter.net>
'Virtual' .ALL groups will never be present in
a checkgroups file, and we can't use them anyway
as they would contain postings from groups that
are filtered out by --checkgroups.
Add a warning, put a note in the documentation.
Signed-off-by: Thomas Hochstein <thh@inter.net>
If --group-by is not set, output will be grouped
by month by default (as long as --boundary is
not set to 'level' or 'average', where grouping
by newsgroup is default).
Now we default to 'newsgroup' if just one newsgroup
is requested by --newsgroups, but more than one
month by --month.
Both defaults can be overridden.
But forced --group-by=month for --report type
'average' or 'sum' in front so defaults are
not checked.
Signed-off-by: Thomas Hochstein <thh@inter.net>
* 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>
* next: (26 commits)
Some documentation fixes and enhancments.
Improve INSTALL documentation.
README: Update copyright notice.
README: improve phrasing.
Change handling of warnings.
Improve output padding.
Check for invalid newsgroup names.
Add some basic validation to config parser.
Create better newsgroup lists for SQL clause.
Fix config path detection for install.pl.
Get empty 'virtual' hierarchies working.
Add some TODO entries.
Add database creation to installer.
Handle undefined previous version when installing.
Refactor database initialisation in feedlog.pl.
Add empty 'virtual' .ALL hierarchies as needed.
Change interpretation of --checkgroups to template
Be more fault-tolerant when reading checkgroups.
Remove call to &Bleat where not appropriate.
Allow more characters in TLH definitions.
...
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>
Build a 'IN(...)' list for single newsgroup
names without wildcards. Create SQL clause
with a mix of wildcards and wildcard-less
group names.
More code for a better query ...
Fixes#37.
Signed-off-by: Thomas Hochstein <thh@inter.net>