| 1 | #!/usr/bin/perl |
| 2 | use 5.014; |
| 3 | use warnings; |
| 4 | |
| 5 | use Gruntmaster::Data; |
| 6 | use Gruntmaster::Opener; |
| 7 | |
| 8 | dbinit $ENV{GRUNTMASTER_DSN} // 'dbi:Pg:'; |
| 9 | handle_line $_ while <>; |
| 10 | |
| 11 | __END__ |
| 12 | |
| 13 | =encoding utf-8 |
| 14 | |
| 15 | =head1 NAME |
| 16 | |
| 17 | gruntmaster-opener - Populate opens table from NCSA access logs |
| 18 | |
| 19 | =head1 SYNOPSIS |
| 20 | |
| 21 | gruntmaster-opener /var/log/apache2/access.log |
| 22 | varnishncsa | gruntmaster-opener |
| 23 | |
| 24 | =head1 DESCRIPTION |
| 25 | |
| 26 | gruntmaster-opener reads a NCSA access log supplied via arguments or |
| 27 | (if there are no arguments) stdin, finds lines that represent |
| 28 | successful requests to problems during contests, extracts data from |
| 29 | them and inserts it into the database. |
| 30 | |
| 31 | =head1 SEE ALSO |
| 32 | |
| 33 | L<Gruntmaster::Opener> |
| 34 | |
| 35 | =head1 AUTHOR |
| 36 | |
| 37 | Marius Gavrilescu E<lt>marius@ieval.roE<gt> |
| 38 | |
| 39 | =head1 COPYRIGHT AND LICENSE |
| 40 | |
| 41 | Copyright (C) 2014-2016 by Marius Gavrilescu |
| 42 | |
| 43 | This library is free software; you can redistribute it and/or modify |
| 44 | it under the same terms as Perl itself, either Perl version 5.20.1 or, |
| 45 | at your option, any later version of Perl 5 you may have available. |
| 46 | |
| 47 | |
| 48 | =cut |