Get empty 'virtual' hierarchies working. Commit b5125b1099cf5cf12beb0520d5896b9a1d7850ae was broken. We didn't add empty .ALL hierarchies as needed; we added empty (non-existant) hierarchies without appended '.ALL', and didn't add the original empty group we started with. (What's more, gatherstats didn't even start any more due to missing ex- and import of &ParseHierarchies from NewsStats.pm.) Fixes #52 (and some more breakage). Signed-off-by: Thomas Hochstein <thh@inter.net>
Add empty 'virtual' .ALL hierarchies as needed. When using a --checkgroups file while tabulating, valid but empty groups will be added with a posting count of zero as needed. If all groups in a sub-hierarchy are empty, the virtual '.ALL' group for that sub-hierarchy was not created, though. If local.test.dummy and local.test.binary were both empty, both groups were added with a posting count of '0', but local.test.ALL was not. Now we loop through all hierarchy elements using ParseHierarchies and add empty .ALL hierarchies as needed. Fixes #49. Also fixing a typo in some comment. :-) Signed-off-by: Thomas Hochstein <thh@inter.net>
Change interpretation of --checkgroups to template In most hierarchies, the list of valid newsgroups will change over time, so you'll have to use another checkgroups file for each month. gatherstats will now understand the value of --checkgroups to be a template and amend it with each month it is processing. Documentation changed accordingly. Signed-off-by: Thomas Hochstein <thh@inter.net>
Match TLHs correctly, not only partially. The TLH was checked to match the beginning of the newsgroup name, not the whole TLH part. So the TLH "de" would match not only "de.test", but also "denver.test", which was not the desired outcome. Signed-off-by: Thomas Hochstein <thh@inter.net>
Adapt gatherstats.pl to new coding style. * Switch to Getopt::Long, change coding style; limit line length. * Replace 'die' and 'warn' by calls to &Bleat(). * Completely changed options due to new GetOpt::Long processing. - merged -m/-p into --month * Adapt to changes in NewsStats.pm * Redo documentation. * Update TODO. Signed-off-by: Thomas Hochstein <thh@inter.net>
gatherstats.pl: Add '-l' option. Add '-l' option to check newsgroup names against a list of valid newsgroups read from a file (each group on one line, ignoring everything after the first whitespace and so accepting files in checkgroups format as well as (parts of) an INN active file). New ReadGroupList(). Change ListNewsgroups() accordingly. Amend documentation accodingly. See #17. Signed-off-by: Thomas Hochstein <thh@inter.net>