UNPKG

strat2json

Version:

Converts Strat-O-Matic print (prt) file data to JSON

55 lines (33 loc) 2.44 kB
[![Build Status](https://travis-ci.org/brencon/strat2json.svg?branch=master)](https://travis-ci.org/brencon/strat2json) [![Coverage Status](https://coveralls.io/repos/github/brencon/strat2json/badge.svg?branch=master)](https://coveralls.io/github/brencon/strat2json?branch=master) [![Twitter Follow](https://img.shields.io/twitter/follow/symbrendan.svg?style=social&label=Follow)](https://twitter.com/symbrendan) [![GitHub followers](https://img.shields.io/github/followers/brencon.svg?style=social&label=Follow)](https://github.com/brencon) [![npm](https://img.shields.io/npm/dt/strat2json.svg)](https://www.npmjs.com/package/strat2json) [![Gratipay User](https://img.shields.io/gratipay/user/brencon.svg)](https://gratipay.com/strat2json/) [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QJTF67JZE4G3C) # strat2json Converts a Strat-O-Matic (SOM) print (prt) file data to JSON. ## Motivation SOM data primarily exists within the game itself, or exported as a PRT file. This module modernizes SOM data as JSON. ## Installation `npm install strat2json` ## Usage ### leagueStandings2json Pass the contents of a SOM league standings file to `leagueStandings2json`, and it will return the data parsed into a JSON object for each conference, division, and team. ### primaryStats2json Pass the contents of a SOM primary stats file to `primaryStats2json`, and it will return the data parsed into a JSON object for each team with the batters and pitchers separated into different arrays. ## Tests `npm test` ## Contributors Brendan Conrad * Github - [brencon](https://github.com/brencon) * Twitter - [symBrendan](https://twitter.com/symBrendan) ## License MIT ## Disclaimer This module is not affiliated with, associated with, authorized by, endorsed by, or in any way connected with Strat-O-Matic (SOM) or Major League Baseball (MLB). ## Contribute To keep development of this module moving forward, please consider donating to the project. [![Gratipay User](https://img.shields.io/gratipay/user/brencon.svg)](https://gratipay.com/strat2json/) [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QJTF67JZE4G3C) Watch and give the project a star on [Github](https://github.com/brencon/strat2json).