From: Thomas Hochstein Date: Mon, 1 Jan 2018 15:58:25 +0000 (+0100) Subject: Merge branch 'thh-small-changes' into next X-Git-Url: https://code.th-h.de/?p=usenet%2Fnewsstats.git;a=commitdiff_plain;h=91c674c4fe8136657b3bfc5c862e0c096ea2dd87;hp=599fefbf6aea5777c2958718048ad3e3a12050fc Merge branch 'thh-small-changes' into next * thh-small-changes: Fix displayed path in install. Update INSTALL documentation. Fix documentation relating to conffile location. Fix --conffile in POD. Bump version numbers. Fix forgotten dates. Fix ea91003a99e679caa5bf56915f085a7c4931805b. --- diff --git a/bin/feedlog.pl b/bin/feedlog.pl index bbfd814..27cc75a 100755 --- a/bin/feedlog.pl +++ b/bin/feedlog.pl @@ -13,7 +13,7 @@ # which Perl itself is published. BEGIN { - our $VERSION = "0.01"; + our $VERSION = "0.02"; use File::Basename; # we're in .../bin, so our module is in ../lib push(@INC, dirname($0).'/../lib'); @@ -153,7 +153,7 @@ feedlog - log data from an INN feed to a database =head1 SYNOPSIS -B [B<-Vhdq>] [--conffile I] +B [B<-Vhdq>] [B<--conffile> I] =head1 REQUIREMENTS @@ -174,7 +174,8 @@ terminating would only result in a rapid respawn. =head2 Configuration B will read its configuration from F which -should be present in the same directory via Config::Auto. +should be present in etc/ via Config::Auto or from a configuration file +submitted by the B<--conffile> option. See L for an overview of possible configuration options. @@ -265,7 +266,7 @@ Thomas Hochstein =head1 COPYRIGHT AND LICENSE -Copyright (c) 2010-2012 Thomas Hochstein +Copyright (c) 2010-2013 Thomas Hochstein This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself. diff --git a/bin/gatherstats.pl b/bin/gatherstats.pl index a5a486a..b4f07d9 100755 --- a/bin/gatherstats.pl +++ b/bin/gatherstats.pl @@ -13,7 +13,7 @@ # which Perl itself is published. BEGIN { - our $VERSION = "0.01"; + our $VERSION = "0.02"; use File::Basename; # we're in .../bin, so our module is in ../lib push(@INC, dirname($0).'/../lib'); @@ -210,7 +210,7 @@ gatherstats - process statistical data from a raw source =head1 SYNOPSIS -B [B<-Vhdt>] [B<-m> I | I] [B<-s> I] [B<-c> I]] [B<--hierarchy> I] [B<--rawdb> I] [B<-groupsdb> I] [B<--clientsdb> I] [B<--hostsdb> I] [--conffile I] +B [B<-Vhdt>] [B<-m> I | I] [B<-s> I] [B<-c> I]] [B<--hierarchy> I] [B<--rawdb> I] [B<-groupsdb> I] [B<--clientsdb> I] [B<--hostsdb> I] [B<--conffile> I] =head1 REQUIREMENTS @@ -261,7 +261,8 @@ override that default through the B<--groupsdb> option. =head2 Configuration B will read its configuration from F -which should be present in the same directory via Config::Auto. +which should be present in etc/ via Config::Auto or from a configuration file +submitted by the B<--conffile> option. See L for an overview of possible configuration options. @@ -417,7 +418,7 @@ Thomas Hochstein =head1 COPYRIGHT AND LICENSE -Copyright (c) 2010-2012 Thomas Hochstein +Copyright (c) 2010-2013 Thomas Hochstein This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself. diff --git a/bin/groupstats.pl b/bin/groupstats.pl index 7f3a32c..76ecce0 100755 --- a/bin/groupstats.pl +++ b/bin/groupstats.pl @@ -13,7 +13,7 @@ # which Perl itself is published. BEGIN { - our $VERSION = "0.01"; + our $VERSION = "0.02"; use File::Basename; # we're in .../bin, so our module is in ../lib push(@INC, dirname($0).'/../lib'); @@ -140,8 +140,8 @@ $OptGroupBy = 'newsgroup' if (!$OptGroupBy and $OptBoundType and $OptBoundType ne 'default'); # default to 'newsgroup' if $OptGroupBy is not set and # just one newsgroup is requested, but more than one month -$OptGroupBy = 'newsgroup' if (!$OptGroupBy and - $OptMonth =~ /:/ and $OptNewsgroups !~ /[:*%]/); +$OptGroupBy = 'newsgroup' if (!$OptGroupBy and $OptMonth and $OptMonth =~ /:/ + and $OptNewsgroups and $OptNewsgroups !~ /[:*%]/); # parse $OptGroupBy to $GroupBy, create ORDER BY clause $SQLOrderClause # if $OptGroupBy is still not set, SQLSortOrder() will default to 'month' my ($GroupBy,$SQLOrderClause) = SQLSortOrder($OptGroupBy, $OptOrderBy); @@ -277,7 +277,7 @@ groupstats - create reports on newsgroup usage =head1 SYNOPSIS -B [B<-Vhcs> B<--comments>] [B<-m> I[:I] | I] [B<-n> I] [B<--checkgroups> I] [B<-r> I] [B<-l> I] [B<-u> I] [B<-b> I] [B<-g> I] [B<-o> I] [B<-f> I] [B<--filetemplate> I] [B<--groupsdb> I] [--conffile I] +B [B<-Vhcs> B<--comments>] [B<-m> I[:I] | I] [B<-n> I] [B<--checkgroups> I] [B<-r> I] [B<-l> I] [B<-u> I] [B<-b> I] [B<-g> I] [B<-o> I] [B<-f> I] [B<--filetemplate> I] [B<--groupsdb> I] [B<--conffile> I] =head1 REQUIREMENTS @@ -342,7 +342,8 @@ Captions and comments are automatically disabled in this case. =head2 Configuration B will read its configuration from F -which should be present in the same directory via Config::Auto. +which should be present in etc/ via Config::Auto or from a configuration file +submitted by the B<--conffile> option. See doc/INSTALL for an overview of possible configuration options. @@ -704,7 +705,7 @@ Thomas Hochstein =head1 COPYRIGHT AND LICENSE -Copyright (c) 2010-2012 Thomas Hochstein +Copyright (c) 2010-2013 Thomas Hochstein This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself. diff --git a/doc/INSTALL b/doc/INSTALL index 1c154af..307ec0e 100644 --- a/doc/INSTALL +++ b/doc/INSTALL @@ -28,21 +28,21 @@ INSTALLATION INSTRUCTIONS * Copy the sample configuration file newsstats.conf.sample to newsstats.conf and modify it for your purposes: - # cp newsstats.conf.sample newsstats.conf - # vim newsstats.conf + # cp etc/newsstats.conf.sample etc/newsstats.conf + # vim etc/newsstats.conf a) Mandatory configuration options * DBDriver = mysql Database driver used; currently only mysql is supported. - + * DBHost = localhost The host your mysql server is running on. * DBUser = The username to connect to the database server. - * DBPw = + * DBPw = Matching password for your username. * DBDatabase = newsstats @@ -61,17 +61,17 @@ INSTALLATION INSTRUCTIONS * TLH = de Limit examination to that top-level hierarchy. - + 3) Database (mysql) setup * Setup your database server with a username, password and database matching the NewsStats configuration (see 2 a). * Start the installation script: - + # install/install.pl - It will setup the necessary database tables and display some + It will setup the necessary database tables and display some information on the next steps. 4) Feed (INN) setup diff --git a/install/install.pl b/install/install.pl index 12cc8ec..e2acf66 100755 --- a/install/install.pl +++ b/install/install.pl @@ -12,7 +12,7 @@ # which Perl itself is published. BEGIN { - our $VERSION = "0.01"; + our $VERSION = "0.02"; use File::Basename; # we're in .../install, so our module is in ../lib push(@INC, dirname($0).'/../lib'); @@ -22,8 +22,6 @@ use warnings; use NewsStats qw(:DEFAULT); -use Cwd; - use DBI; use Getopt::Long qw(GetOptions); Getopt::Long::config ('bundling'); @@ -37,10 +35,6 @@ GetOptions ('u|update=s' => \$OptUpdate, 'h|help' => \&ShowPOD, 'V|version' => \&ShowVersion) or exit 1; -### change working directory to .. (as we're in .../install) -chdir dirname($FullPath).'/..'; -my $Path = cwd(); - ### read configuration print("Reading configuration.\n"); my %Conf = %{ReadConfig($OptConfFile)}; @@ -109,7 +103,7 @@ Things left to do: ## gather statistics for NewsStats newsstats!\\ :!*,de.*\\ - :Tc,WmtfbsPNH,Ac:$Path/feedlog.pl + :Tc,WmtfbsPNH,Ac:$HomePath/bin/feedlog.pl Please @@ -256,7 +250,7 @@ install - installation script =head1 SYNOPSIS -B [B<-Vh> [--update I] [--conffile I] +B [B<-Vh> [--update I] [B<--conffile> I] =head1 REQUIREMENTS @@ -268,8 +262,9 @@ This script will create database tables as necessary and configured. =head2 Configuration -B will read its configuration from F via -Config::Auto. +B will read its configuration from F which should +be present in etc/ via Config::Auto or from a configuration file submitted +by the B<--conffile> option. See L for an overview of possible configuration options. @@ -340,7 +335,7 @@ Thomas Hochstein =head1 COPYRIGHT AND LICENSE -Copyright (c) 2010-2012 Thomas Hochstein +Copyright (c) 2010-2013 Thomas Hochstein This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself. diff --git a/lib/NewsStats.pm b/lib/NewsStats.pm index a3676d0..f2b95c4 100644 --- a/lib/NewsStats.pm +++ b/lib/NewsStats.pm @@ -49,8 +49,8 @@ require Exporter; Output => [qw(OutputData FormatOutput)], SQLHelper => [qw(SQLHierarchies SQLSortOrder SQLGroupList SQLSetBounds SQLBuildClause GetMaxLength)]); -$VERSION = '0.01'; -our $PackageVersion = '0.01'; +$VERSION = '0.02'; +our $PackageVersion = '0.02'; use Data::Dumper; use File::Basename; @@ -80,7 +80,7 @@ sub ShowVersion { ################################################################################ ### display version and exit print "NewsStats v$PackageVersion\n$MyVersion\n"; - print "Copyright (c) 2010-2012 Thomas Hochstein \n"; + print "Copyright (c) 2010-2013 Thomas Hochstein \n"; print "This program is free software; you may redistribute it ". "and/or modify it under the same terms as Perl itself.\n"; exit(100);