Skip to content

A retrosheet parser written in perl. Includes a perl module to parse files and an example script which uses the module.

Notifications You must be signed in to change notification settings

GrantKlassy/retrosheet-perl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

retrosheet-perl

A retrosheet parser written in perl. Includes a perl module to parse files and an example script which uses the module.

Usage

Clone the git repo into the directory of your project

git clone https://github.com/GrantKlassy/retrosheet-perl.git

Source the Retrosheet_Perl.pm perl module

use lib './retrosheet-perl/lib';
use Retrosheet_Perl'

Use the various functions of Retrosheet_Perl.pm

use Data::Dumper;

my $yearDir = abs_path('./retrosheet-perl/data/2017eve-linux');
my $parsed_year_href = Retrosheet_Perl::parse_year($yearDir);
print Dumper $parsed_year_href;

...

VARR1 = {
          '2017ATL.EVN' => {
                             'ATL201708260' => {
                                                 'version' => '2',
                                                 'start' => {
                                                              'freek001' => {
                                                                              'home' => '0',
                                                                              'startingPos' => '1',
                                                                              'name' => '"Kyle Freeland"',
                                                                              'battingPos' => '9'
                                                                            },
                                                              'lemad001' => {
                                                                              'battingPos' => '2',
                                                                              'name' => '"DJ LeMahieu"',
                                                                              'home' => '0',
                                                                              'startingPos' => '4'
                                                                            },
... <etc> ...

About

A retrosheet parser written in perl. Includes a perl module to parse files and an example script which uses the module.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages