Add comments and POD.
[usenet/newsstats.git] / feedlog.pl
index a68b833..f33111d 100755 (executable)
@@ -85,3 +85,143 @@ $DBHandle->disconnect;
 syslog(LOG_NOTICE, "$MySelf closing down.") if !$Options{'q'};\r
 closelog();\r
 \r
 syslog(LOG_NOTICE, "$MySelf closing down.") if !$Options{'q'};\r
 closelog();\r
 \r
+__END__\r
+\r
+################################ Documentation #################################\r
+\r
+=head1 NAME\r
+\r
+feedlog - log data from an INN feed to a database\r
+\r
+=head1 SYNOPSIS\r
+\r
+B<feedlog> [B<-Vhdq>]\r
+\r
+=head1 REQUIREMENTS\r
+\r
+See doc/README: Perl 5.8.x itself and the following modules from CPAN:\r
+\r
+=over 2\r
+\r
+=item -\r
+\r
+Config::Auto\r
+\r
+=item -\r
+\r
+Date::Format\r
+\r
+=item -\r
+\r
+DBI\r
+\r
+=back\r
+\r
+=head1 DESCRIPTION\r
+\r
+This script will log overview data and complete headers to a database\r
+table for further examination by parsing a feed from INN. It will\r
+parse that information and write it to a mysql database table in real\r
+time.\r
+\r
+All reporting is done to I<syslog> via I<news> facility. If B<feedlog>\r
+fails to initiate a database connection at startup, it will log to\r
+I<syslog> with I<CRIT> priority and go in an endless loop, as\r
+terminating would only result in a rapid respawn.\r
+\r
+=head2 Configuration\r
+\r
+F<feedlog.pl> will read its configuration from F<newsstats.conf> which\r
+should be present in the same directory via Config::Auto.\r
+\r
+See doc/INSTALL for an overview of possible configuration options.\r
+\r
+=head1 OPTIONS\r
+\r
+=over 3\r
+\r
+=item B<-V> (version)\r
+\r
+Print out version and copyright information on B<yapfaq> and exit.\r
+\r
+=item B<-h> (help)\r
+\r
+Print this man page and exit.\r
+\r
+=item B<-d> (debug)\r
+\r
+Output debugging information to STDERR while parsing STDIN. You'll\r
+find that information most probably in your B<INN> F<errlog> file.\r
+\r
+=item B<-q> (quiet)\r
+\r
+Suppress logging to syslog.\r
+\r
+=back\r
+\r
+=head1 INSTALLATION\r
+\r
+See doc/INSTALL.\r
+\r
+=head1 EXAMPLES\r
+\r
+Set up a feed like that in your B<INN> F<newsfeeds> file:\r
+\r
+    ## gather statistics for NewsStats\r
+    newsstats!\r
+            :!*,de.*\r
+            :Tc,WmtfbsPNH,Ac:/path/to/feedlog.pl\r
+\r
+See doc/INSTALL for further information.\r
+\r
+=head1 FILES\r
+\r
+=over 4\r
+\r
+=item F<feedlog.pl>\r
+\r
+The script itself.\r
+\r
+=item F<NewsStats.pm>\r
+\r
+Library functions for the NewsStats package.\r
+\r
+=item F<newsstats.conf>\r
+\r
+Runtime configuration file for B<yapfaq>.\r
+\r
+=back\r
+\r
+=head1 BUGS\r
+\r
+Please report any bugs or feature requests to the author or use the\r
+bug tracker at L<http://bugs.th-h.de/>!\r
+\r
+=head1 SEE ALSO\r
+\r
+=over 2\r
+\r
+=item -\r
+\r
+doc/README\r
+\r
+=item -\r
+\r
+doc/INSTALL\r
+\r
+=back\r
+\r
+This script is part of the B<NewsStats> package.\r
+\r
+=head1 AUTHOR\r
+\r
+Thomas Hochstein <thh@inter.net>\r
+\r
+=head1 COPYRIGHT AND LICENSE\r
+\r
+Copyright (c) 2010 Thomas Hochstein <thh@inter.net>\r
+\r
+This program is free software; you may redistribute it and/or modify it\r
+under the same terms as Perl itself.\r
+\r
+=cut\r
This page took 0.013314 seconds and 4 git commands to generate.