DISCLAIMER: I am not affiliated with Strat-O-Matic Media, LLC. The cards and statistics generated by this application are not compatible with the official Strat-O-Matic game and are for academic purposes only.
INSTRUCTIONS: Download or clone this repository. Navigate to the directory and run
If there are no errors, run the app file, passing in a player's name as an argument. Note: The name must be spelled and capitalized exactly as it is in the json files or on Baseball Reference. E.g.:
node app "Kris Bryant"
A pdf will be generated with that player's stats interpreted into plausible results. The card will not be the same as the official card, but should have a relatively accurate distribution of at-bat outcomes.
If a pitcher's name is supplied, a pitcher's card will be generated. If you'd prefer to output the pitcher's batting card instead, just pass in the optional -b flag. E.g.:
node app "Jake Arrieta" -b
You can also generate an entire team at once. Pass in the team's capitalized three-letter abbreviation as found on Baseball Reference and it will create a directory with each player in it. E.g.:
node app "CHC"
If you'd like to generate cards for a different year, modify the fs.readFileSync function calls towards the beginning of the player.js file to accept new files. You'll need to make four new json files -- standard pitching, standard batting, standard fielding, and batting-pitching. You can export this data on Baseball Reference. You'll need to transform the .csv files into .json files. The convertcsv site works well for this. In the new json files, find and replace all the FIELD1, FIELD2, etc. headings with the correct value. See the included 2016 json files for an example.
"As-Is". The Software is provided "as is," with all faults, defects and errors, and without warranty of any kind.
No Liability. Licensor does not warrant that the Software will be free of bugs, errors, viruses or other defects, and Licensor shall have no liability of any kind for the use of or inability to use the software, the software content or any associated service.