# 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');
=head1 SYNOPSIS
-B<feedlog> [B<-Vhdq>] [--conffile I<filename>]
+B<feedlog> [B<-Vhdq>] [B<--conffile> I<filename>]
=head1 REQUIREMENTS
=head2 Configuration
B<feedlog> will read its configuration from F<newsstats.conf> 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<doc/INSTALL> for an overview of possible configuration options.
=head1 COPYRIGHT AND LICENSE
-Copyright (c) 2010-2012 Thomas Hochstein <thh@inter.net>
+Copyright (c) 2010-2013 Thomas Hochstein <thh@inter.net>
This program is free software; you may redistribute it and/or modify it
under the same terms as Perl itself.
# 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');
=head1 SYNOPSIS
-B<gatherstats> [B<-Vhdt>] [B<-m> I<YYYY-MM> | I<YYYY-MM:YYYY-MM>] [B<-s> I<stats>] [B<-c> I<filename template>]] [B<--hierarchy> I<TLH>] [B<--rawdb> I<database table>] [B<-groupsdb> I<database table>] [B<--clientsdb> I<database table>] [B<--hostsdb> I<database table>] [--conffile I<filename>]
+B<gatherstats> [B<-Vhdt>] [B<-m> I<YYYY-MM> | I<YYYY-MM:YYYY-MM>] [B<-s> I<stats>] [B<-c> I<filename template>]] [B<--hierarchy> I<TLH>] [B<--rawdb> I<database table>] [B<-groupsdb> I<database table>] [B<--clientsdb> I<database table>] [B<--hostsdb> I<database table>] [B<--conffile> I<filename>]
=head1 REQUIREMENTS
=head2 Configuration
B<gatherstats> will read its configuration from F<newsstats.conf>
-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<doc/INSTALL> for an overview of possible configuration options.
=head1 COPYRIGHT AND LICENSE
-Copyright (c) 2010-2012 Thomas Hochstein <thh@inter.net>
+Copyright (c) 2010-2013 Thomas Hochstein <thh@inter.net>
This program is free software; you may redistribute it and/or modify it
under the same terms as Perl itself.
# 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');
$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);
=head1 SYNOPSIS
-B<groupstats> [B<-Vhcs> B<--comments>] [B<-m> I<YYYY-MM>[:I<YYYY-MM>] | I<all>] [B<-n> I<newsgroup(s)>] [B<--checkgroups> I<checkgroups file>] [B<-r> I<report type>] [B<-l> I<lower boundary>] [B<-u> I<upper boundary>] [B<-b> I<boundary type>] [B<-g> I<group by>] [B<-o> I<order by>] [B<-f> I<output format>] [B<--filetemplate> I<filename template>] [B<--groupsdb> I<database table>] [--conffile I<filename>]
+B<groupstats> [B<-Vhcs> B<--comments>] [B<-m> I<YYYY-MM>[:I<YYYY-MM>] | I<all>] [B<-n> I<newsgroup(s)>] [B<--checkgroups> I<checkgroups file>] [B<-r> I<report type>] [B<-l> I<lower boundary>] [B<-u> I<upper boundary>] [B<-b> I<boundary type>] [B<-g> I<group by>] [B<-o> I<order by>] [B<-f> I<output format>] [B<--filetemplate> I<filename template>] [B<--groupsdb> I<database table>] [B<--conffile> I<filename>]
=head1 REQUIREMENTS
=head2 Configuration
B<groupstats> will read its configuration from F<newsstats.conf>
-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.
=head1 COPYRIGHT AND LICENSE
-Copyright (c) 2010-2012 Thomas Hochstein <thh@inter.net>
+Copyright (c) 2010-2013 Thomas Hochstein <thh@inter.net>
This program is free software; you may redistribute it and/or modify it
under the same terms as Perl itself.
* 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
* 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
# 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');
use NewsStats qw(:DEFAULT);
-use Cwd;
-
use DBI;
use Getopt::Long qw(GetOptions);
Getopt::Long::config ('bundling');
'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)};
## gather statistics for NewsStats
newsstats!\\
:!*,de.*\\
- :Tc,WmtfbsPNH,Ac:$Path/feedlog.pl
+ :Tc,WmtfbsPNH,Ac:$HomePath/bin/feedlog.pl
Please
=head1 SYNOPSIS
-B<install> [B<-Vh> [--update I<version>] [--conffile I<filename>]
+B<install> [B<-Vh> [--update I<version>] [B<--conffile> I<filename>]
=head1 REQUIREMENTS
=head2 Configuration
-B<install> will read its configuration from F<newsstats.conf> via
-Config::Auto.
+B<install> will read its configuration from F<newsstats.conf> which should
+be present in etc/ via Config::Auto or from a configuration file submitted
+by the B<--conffile> option.
See L<doc/INSTALL> for an overview of possible configuration options.
=head1 COPYRIGHT AND LICENSE
-Copyright (c) 2010-2012 Thomas Hochstein <thh@inter.net>
+Copyright (c) 2010-2013 Thomas Hochstein <thh@inter.net>
This program is free software; you may redistribute it and/or modify it
under the same terms as Perl itself.
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;
################################################################################
### display version and exit
print "NewsStats v$PackageVersion\n$MyVersion\n";
- print "Copyright (c) 2010-2012 Thomas Hochstein <thh\@inter.net>\n";
+ print "Copyright (c) 2010-2013 Thomas Hochstein <thh\@inter.net>\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);