grs_instructions
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
grs_instructions [2007/04/24 01:01] – (old revision restored) 127.0.0.1 | grs_instructions [2016/02/02 23:02] (current) – sweda | ||
---|---|---|---|
Line 1: | Line 1: | ||
< | < | ||
- | GRS Codes | + | GRS is a program for creating a game report for the Internet Baseball |
+ | League. | ||
+ | from Greg Speegle, Richard Dunlap, and Christian Beliveau. | ||
+ | code is available at github < | ||
+ | anonymous ftp < | ||
+ | |||
+ | ** please submit bug reports to sweda@ibl.org ** | ||
+ | |||
+ | |||
+ | COMPILING THE PROGRAM | ||
+ | |||
+ | 1) unpack the source ( tar -xzf grs.tgz ) | ||
+ | |||
+ | 2) edit Makefile to your taste | ||
+ | |||
+ | 3) " | ||
- | GRS is a program for creating a game report for a Pursue the Pennant | ||
- | game. It was written by Greg Speegle and Sean Sweda. | ||
RUNNING THE PROGRAM | RUNNING THE PROGRAM | ||
- | Usage: grs [-ahfv] [afile] [hfile] [infile] outfile | + | Usage: grs [ (-a afile) (-h hfile) | (-f cmdfile) |
+ | |||
+ | -a Used to read in the away team's lineup from an external file. | ||
+ | ex: grs -a yesterdays_game.cmd todays_game | ||
- | -a Used to read in the away team's lineup from an external file. | + | -h Used to read in the home team's lineup from an external file. |
- | ex: grs -a yesterdays_game.cmd todays_game | + | ex: grs -h my_lineup_vsRH game6 |
- | -h Used to read in the home team's lineup | + | -f Used to read in commands |
- | ex: grs -h my_lineup_vsRH game6 | + | includes the lineups, thus -f is incompatible with -a and/or -h. |
+ | ex: grs -f unfinished_game 1-1 | ||
- | -f Used to read in commands from an external file. NOTE: This | + | -v Using this flag will cause grs to output |
- | includes | + | (v2.3.0 and later) |
- | ex: grs -f unfinished_game 1-1 | + | |
- | -v Using this flag will cause grs to output | + | -o Used |
- | (v2.3.0 and later) | + | (v3.1 and later) |
If you use the -f flag to read in a file, make sure that the last | If you use the -f flag to read in a file, make sure that the last | ||
- | event is NOT 'eg' or 'en'. | + | event is NOT ' |
The last operand is always the output file prefix. | The last operand is always the output file prefix. | ||
the following files: | the following files: | ||
- | < | + | < |
- | < | + | < |
- | < | + | < |
- | < | + | < |
- | there may be several of these files after you are done | + | |
The accompanying shell script, grscat (instructions at the end) will | The accompanying shell script, grscat (instructions at the end) will | ||
Line 39: | Line 55: | ||
WHAT IT DOESN' | WHAT IT DOESN' | ||
- | (hopefully this will remain blank) | + | GRS is not smart enough to figure out earned runs, you'll have to do that |
+ | yourself when prompted. | ||
+ | handle gracefully, if you come across one please inform the author. | ||
ENTERING THE LINEUPS | ENTERING THE LINEUPS | ||
- | GRS uses space dilimited text. Thus, when prompted for player name, | + | GRS uses space dilimited text. Thus, when prompted for player name, |
real team, and position, you should separate these by spaces. | real team, and position, you should separate these by spaces. | ||
- | Example: | + | Example: |
When GRS is started, you will be prompted for a three letter team | When GRS is started, you will be prompted for a three letter team | ||
- | abbreviation for each team. | + | abbreviation for each team. |
This program was created with the designated hitter in mind. If the | This program was created with the designated hitter in mind. If the | ||
Line 65: | Line 83: | ||
event location baserunning | event location baserunning | ||
- | event | + | event - a 2 letter event code, all of which are listed below |
- | location - many uses, eg. location of a hit (gcf), or fielding | + | location - many uses, eg. location of a hit (gcf), or fielding |
- | on the play (6-3); | + | |
- | special kind of play like a H&R or IFR, eg. 6-3(IFR) | + | |
- | or IFR(6) or lcf(H& | + | |
- | baserunning - in groups of 2, indicating where the player started, | + | baserunning - in groups of 2, indicating where the player started, |
- | and where he ended up, eg. 12 means runner on 1st | + | |
- | went to second. | + | |
- | ' | + | |
- | advances programmed in, so you can skip the | + | |
- | baserunning field if nobody advanced an extra base. | + | |
The location is optional for all events. | The location is optional for all events. | ||
information. | information. | ||
- | error in the location field. (e.g. er 3 b1 instead of er 6-3 b1 for a | + | error in the location field. (e.g. er 3/rg6 b1 instead of er 6-3 b1 for a |
dropped throw by the firstbaseman) | dropped throw by the firstbaseman) | ||
- | ALL GRS commands are entered in LOWER CASE. | + | This is a list of the events that the GRS program accepts: |
- | + | ||
- | For ALL baserunning events, make sure you list the lead runner first: | + | |
- | ex. sb 2312 (runner on 2nd steals 3rd and 1st steal 2nd) | + | |
- | + | ||
- | This is a list of the events that the grs program accepts: | + | |
ph - pinch hit | ph - pinch hit | ||
- | Use the same form as lineup entry. | + | Use the same form as lineup entry. |
- | pinch-hitter will play next inning, or just " | + | pinch-hitter will play next inning, or just " |
- | is only pinch-hitting. | + | is only pinch-hitting. |
- | + | ||
- | Example: | + | |
- | ph | + | |
- | Ward HOU (enter a space here after team) | + | |
- | + | ||
- | (This would Pinch Hit HOU Ward and list him as a PH in the GRS. | + | |
- | You would have to either insert a defensively replacement [dc] | + | |
- | or change his position [dc]) | + | |
- | + | ||
- | or | + | |
- | + | ||
- | ph | + | |
- | Ward HOU RF | + | |
- | + | ||
- | (This would Pinch Hit HOU Ward and list him as RF) | + | |
pr - pinch run | pr - pinch run | ||
- | | + | Use the same form as lineup entry. |
- | pinch-runner will play next inning, or just " | + | pinch-runner will play next inning, or just " |
- | is only pinch-running. | + | is only pinch-running. |
- | + | ||
- | Example: | + | |
- | pr < | + | |
- | Ward HOU < | + | |
- | + | ||
- | (This would Pinch Hit HOU Ward and list him as a Pr in the GRS. | + | |
- | You would have to either insert a defensively replacement [dc] | + | |
- | or change his position [dc]) | + | |
- | + | ||
- | or | + | |
- | + | ||
- | pr < | + | |
- | Ward HOU RF < | + | |
- | + | ||
- | (This would Pinch Hit HOU Ward and list him as RF) | + | |
np - new pitcher | np - new pitcher | ||
- | Use the same form as lineup entry. | + | Use the same form as lineup entry. |
- | with the pitcher batting, you can specify the position in the | + | with the pitcher batting, you can specify the position in the |
- | batting order where the pitcher will hit, and grs will | + | batting order where the pitcher will hit, and GRS will |
- | automatically insert him into the batting order. | + | automatically insert him into the batting order. |
- | ex: Harvey FLA R 9 (this would put Harvey in the 9 hole) | + | ex: Harvey FLA R 9 (this would put Harvey in the 9 hole) |
- | + | ||
- | | + | |
- | | + | |
- | | + | |
- | + | ||
- | (This would insert HOU Oswalt as the pitcher.) | + | |
- | + | ||
- | or | + | |
- | + | ||
- | np < | + | |
- | Oswalt HOU R 7 < | + | |
- | + | ||
- | (This would insert HOU Oswalt as the pitcher, batting 7th.) | + | |
dr - defensive replacement | dr - defensive replacement | ||
- | |||
- | Use this entry to make a defensive SUBSTITUTION. | ||
- | | ||
- | | ||
- | | ||
- | Ward HOU RF < | ||
- | |||
- | (This would substitute HOU Ward for the current #7 hitter and | ||
- | play him in RF.) | ||
- | |||
- | |||
dc - defensive position change | dc - defensive position change | ||
- | Use the same form as lineup entry. | + | Use the same form as lineup entry. |
- | between these two commands is that " | + | between these two commands is that " |
- | one position to another and " | + | one position to another and " |
- | + | ||
- | Use this entry to make a defensive SUBSTITUTION. | + | |
- | | + | |
- | | + | |
- | | + | |
- | Ward HOU RF < | + | |
- | + | ||
- | (This would move HOU Ward to RF.) | + | |
la - list the away team's lineup | la - list the away team's lineup | ||
Line 183: | Line 134: | ||
un - undo | un - undo | ||
- | Undo will allow you to undo any event, including a lineup | + | Undo will allow you to undo any event, including a lineup |
- | change or the end of an inning. | + | change or the end of an inning. |
- | events at once. Make sure that there is never an undo | + | events at once. Make sure that there is never an undo |
- | command in a command file that you are reading in via the | + | command in a command file that you are reading in via the |
- | -f flag, as the undo command is never recorded in the .cmd | + | -f flag, as the undo command is never recorded in the .cmd |
- | file normally, and this will only serve to confuse | + | file normally, and this will only serve to confuse |
- | + | ||
- | MINIMIZE USING THIS COMMAND. | + | |
en - end of inning | en - end of inning | ||
Line 198: | Line 147: | ||
nj - enters in a "< | nj - enters in a "< | ||
fa - enters in a "< | fa - enters in a "< | ||
+ | in - enters in an " | ||
+ | ic - enters in an " | ||
so - strikeout | so - strikeout | ||
Line 211: | Line 162: | ||
bk - balk | bk - balk | ||
sb - stolen base | sb - stolen base | ||
- | make sure to indicate which runner(s) steal if there is more than | ||
- | one runner on base | ||
- | ex. | ||
- | sb 12 (runner on 1st steals 2nd) | ||
- | |||
cs - caught stealing | cs - caught stealing | ||
- | ex. | ||
- | cs 1o (runner on 1st caught stealing) | ||
- | |||
pk - picked off | pk - picked off | ||
- | ex. | ||
- | pk 1-3 1o (runner on 1st picked off - pitcher to 1st) | ||
- | |||
th - advance on a throw | th - advance on a throw | ||
- | ex. | ||
- | th 23 (runner on 2nd advances to 3rd on throw) | ||
- | or | ||
- | th 3h23 (runner on 3rd scores and 2nd to 3rd on throw) | ||
- | |||
oa - out advancing on a throw | oa - out advancing on a throw | ||
- | ex. | + | ri - baserunner |
- | oa 8-2 3o (runner on third thrown | + | di - defensive indifference |
1b - single | 1b - single | ||
- | ex. | ||
- | 1b gcf (single - groundball to CF) | ||
- | |||
2b - double | 2b - double | ||
3b - triple | 3b - triple | ||
hr - home run | hr - home run | ||
- | dp,gd - ground into double play | + | tp - triple play |
- | ex. | + | dp, gd - ground into double play |
- | dp hg6 1obo (double play Hard grounder to SS, runner on 1st out at 2nd | + | fd - fly into double play |
- | and Batter out at 1st) | + | |
- | + | ||
- | fd - fly into double play (rarely used) | + | |
ld - line into double play | ld - line into double play | ||
- | ex. | ||
- | ld lo6 1obo (line drive to SS, runner on first doubled up - make sure | ||
- | you show BOTH players who are out on the play) | ||
lo - line out | lo - line out | ||
- | ex. | ||
- | lo 6 (Line drive to SS, batter out) | ||
- | |||
fc - fielder' | fc - fielder' | ||
- | ex. | ||
- | fc rg6 1ob1 (fielder’s choice, routine Grounder to SS runner on 1st out | ||
- | at 2nd, batter safe at 1st) | ||
- | |||
hg - hard ground out | hg - hard ground out | ||
- | ex. | ||
- | hg 5 (hard grounder to 3B, batter out at 1st) | ||
- | |||
rg - routine ground out | rg - routine ground out | ||
- | ex. | ||
- | rg 4 (routine grounder to 2B, batter out at 1st) | ||
- | |||
sg - slow ground out | sg - slow ground out | ||
- | ex. | ||
- | sg 3 (slow grounder to 1B, batter out at 1st) | ||
- | |||
- | Make sure to show any runners that advance on any out at any base. | ||
- | ex. | ||
- | sg 3 12 (runner on 1st advances to 2nd) | ||
- | |||
hf - high fly | hf - high fly | ||
- | ex. | ||
- | hf 8 (high fly to CF) | ||
- | |||
po - pop out | po - pop out | ||
- | ex. | ||
- | po 6 (pop out to SS) | ||
- | |||
fp, pf - foul pop out | fp, pf - foul pop out | ||
- | ex. | ||
- | fp 2 (foul pop to C) | ||
- | |||
sf - sacrifice fly | sf - sacrifice fly | ||
- | ex. | ||
- | sf 8 3h (sac fly to CF, runner on 3rd scores) | ||
- | |||
sh - sacrifice hit | sh - sacrifice hit | ||
- | ex. | ||
- | sh 1-3 2312 (sac bunt, runners on 2nd and 1st advance) | ||
- | |||
lf - long fly | lf - long fly | ||
wt, df - warning track fly (from deep fly chart) | wt, df - warning track fly (from deep fly chart) | ||
- | | ||
- | ex. | ||
- | lf 7 (long fly to LF) | ||
- | wt 7 3h23 (warning track fly, runner on 3rd scores, | ||
- | runner on 2nd to 3rd) | ||
- | |||
er - batter reaches on error | er - batter reaches on error | ||
- | ex. | ||
- | er 5 (error on 3B, runners advance 1 base, batter safe at 1st) | ||
- | |||
ea - runner advances on error | ea - runner advances on error | ||
- | Used primarily in conjuction with a base-hit plus error result | ||
- | | ||
- | ex. | ||
- | 1b lf | ||
- | ea 7 12 | ||
- | | ||
generic codes: | generic codes: | ||
Line 327: | Line 203: | ||
Undo is the most precarious part of our program, i.e. the most likely | Undo is the most precarious part of our program, i.e. the most likely | ||
- | way to crash grs. The current status is: | + | way to crash GRS. The current status is: |
Undo seems to be 100% functional. | Undo seems to be 100% functional. | ||
Line 341: | Line 217: | ||
just end the game, then use copy-paste to re-input your commands | just end the game, then use copy-paste to re-input your commands | ||
(copy from the .cmd file). | (copy from the .cmd file). | ||
- | |||
- | |||
- | Below is an example input file for line ups, making setup for each game MUCH | ||
- | easier: | ||
- | |||
- | command line entry for entry file a.txt for gm1 wk 8: | ||
- | |||
- | grs -f a.txt 8-1 | ||
- | |||
- | The file will look like this (parthetical entries are comments only, don't enter | ||
- | |||
- | into the actual file): | ||
- | |||
- | (begin file) | ||
- | LAW (Visiting Team 3-letter abbreviation - make sure this is theFIRST line) | ||
- | Soriano WAS LF (Visiting Team Lineup) | ||
- | Ross FLA CF | ||
- | Gibbons BAL DH | ||
- | Jenkins MIL RF | ||
- | Blalock TEX 3b | ||
- | Casey DET 1b | ||
- | Navarro TB C | ||
- | Frandsen SF 2b | ||
- | Berroa KC SS | ||
- | COU (Home Team 3-letter abbreviation) | ||
- | Kinsler TEX 2b (Home Lineup) | ||
- | Byrnes ARI LF | ||
- | Giles SD RF | ||
- | Barrett CHN C | ||
- | Fielder MIL 1b | ||
- | Thorman ATL DH | ||
- | Patterson BAL CF | ||
- | Cedeno CHN SS | ||
- | Inge DET 3b | ||
- | Kim COL R (Visiting Pitcher, Right-handed) | ||
- | Francis COL L (Home Pitcher, Right-handed) | ||
- | Cool, Clear, No Wind, Wo Precip | ||
- | a < | ||
- | |||
- | (end file) | ||
- | |||
- | Here is the Mini-GRS file and GRS file header: | ||
- | |||
- | (begin file) | ||
- | |||
- | SCORES | ||
- | |||
- | LAW | ||
- | COU 10 4 4 | ||
- | |||
- | INJURIES | ||
- | 1 x LAW KC Dejesus 2 (2 served, baby after game) | ||
- | 3 x COU CHN Cedeno 2 (twing after game) | ||
- | |||
- | STARTS | ||
- | 1 LF COU ATL Thorman | ||
- | 1 SS COU CHN Cedeno | ||
- | |||
- | LIMITS | ||
- | 1 1b COU ATL Thorman 1 PA vsLH | ||
- | |||
- | LAW PITCHING | ||
- | gm1: PIT Duke 2.1 (L), COL Affeldt 2.2, DET Grilli 1.2, BAL Britton 1.1 | ||
- | gm2: CHA Garland 8.0 (L) | ||
- | gm3: COL Kim 7.0 (L), COL Affeldt 1.0 | ||
- | |||
- | COU PITCHING | ||
- | gm1: CHN Zambrano 6.0 (W), PHI Hamels 2.0, TEX Benoit 1.0 | ||
- | gm2: COL Francis 6.2, ARI Cruz 0.1, PIT Gonzalez 1.0, MIL Cordero 1.0 (S) | ||
- | gm3: OAK Haren 8.0, MIL Cordero 1.0 (S) | ||
- | |||
- | ROTATION | ||
- | HOU Oswalt, PHI Hamels, COL Francis | ||
- | |||
- | TRANSACTIONS | ||
- | Activate: HOU Oswalt | ||
- | Deactivate: CHA Sweeney | ||
</ | </ |
grs_instructions.1177390898.txt.gz · Last modified: 2007/04/24 01:15 (external edit)