Chess::ELO::FEDA - Download FEDA ELO (http://www.feda.org) into differents backends (SQLite)
version 0.01
my $elo = Chess::ELO::FEDA->new( -url => 'http://feda.org/feda2k16/wp-content/uploads/2017_11.zip' -folder => './elo/feda', -target => '2017_11.sqlite', -callback => sub { my $player = shift; }, -verbose => 1 );
Constructor. It accepts a hash with these options:
This callback sub will be called on each record found. It receives a hash reference with the player data: feda_id, surname, name, fed, rating, games, birth, title, flag
Working folder of the overall process. It is not created if it doesn't exists.
Target file where the parser stores the ELO information. According the file extension, it selects the proper backend: .sqlite for SQLite dabase or .csv for a CSV file format.
The URL direction (http://) used by the downloader to search the ZIP file. The main file expected into the package is the XLS
0 by default. If set, shows useful debug messages
Unlink the files dowloaded for this downloader
Download the ZIP file from the -url parameter. Extract the XLS file to the target_folder (which must exists)
Parse and transform the XLS input file to the proper backend, according the -target parameter.
Integrates download, parse and cleanup in a single call.
Miguel Prz <niceperl@gmail.com>
This software is copyright (c) 2017 by Miguel Prz.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Chess::ELO::FEDA, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Chess::ELO::FEDA
CPAN shell
perl -MCPAN -e shell install Chess::ELO::FEDA
For more information on module installation, please visit the detailed CPAN module installation guide.