This processes the pitching statistics for a selected team as well as allowing updates to and adding new players to the pitching SQL Table.
This program is can be either executed from the main menu, or can run as a stand-a-lone program. Some of the functions will slightly change, but all the main processing will be the same, regardless of how the module is started.
At the bottom of this HELP display is a legend showing what each column in the boxscore means, and in some cases, how it's calculated.

Displaying the Pitching Boxscores
Once you enter a team name and click the [OK] button, you will see a screen similar to the one above. The application tracks a variety of baseball/softball stats, which are first displayed for you. From here you may send the results to the printer, or update them.

If you are entering data for a new team, you would enter the team name in the Team Input screen. Let's say we want to add the Astros to our database. After entering Astros in the team name of the Team Input screen, you will get a display like the one above. Since there is no data for the Astros, a blank screen appears. If you click the [Update] button, you will be taken to the update screen where you can add the stats for the new team, and they will be added to the database tables. Once that happens, whenever you input Astros, it will display all the data you've entered.
   The Buttons - And What They Do
There are five buttons, along with the "x" in the upper right-hand corner of the screen. Here are the actions they perform:
| [Cancel] | Resets boxscore display and re-displays it. |
| [Update] | Takes all records checked (if any) and displays the update screen. |
| [Report] | Formats the boxscores displayed and prints it on the default printer. |
| [HELP] | Displays this screen. |
| [QUIT] | Cancels out of pitching stats and either returns to main menu or ends if stand-a-lone. |
| [x] | This works the same as the [QUIT] button. |
Updating Pitching Stats
You have a boxscore from a game you need to update. From the screen above, you can add new data to both existing players and new players that have yet to play a game.
For existing players, place a check mark (as shown above) next to each player you wish to add new game stats for. For players not in the current display, you will be able to add them once you click the [Update] button.

The next screen (shown above) is the one you use to add game stats to both existing and new players. For each player you checked off in the screen prior, a record has already been added to the Stats Update screen. You will also noticed that GAMEID has been pre-filled with "ALE-10" as was provided in the Team/Game input box, as well as a "1" you also provided in the GP column.
You will also notice that the very first column there is a lowercase "u". This is important, as you will later see that two things must be done in order to apply any update. That "u" must be present, and all records to update must be selected. More on that.

Next, enter the values you need to update. As you can see above, I have entered data for Workman. To enter data, click on the column and you will be able to input to it. You only have to enter data that you have. All fields are initialized as ZEROES. Do this for all data you have.
Also, say you made a mistake and put in the wrong GameID. On this screen you can also change it. In the image above, GameID was entered as ALE-10. You can go into this field and edit it to the value you want it to be. Same can be done with with GP. If you decide that you do not wish to update a player, say you selected him/her by error, you can remove the "u" next to the name.

In the above, you can see that I have added a new pitcher, Cashner, A. Workman was a relief pitcher, and I needed to add a new starting pitcher that hadn't been added yet. So I updated Workman with his relief efforts for game ALE-10, and added the new pitcher with his starting effort.
In order to update these values to the pitching table, Zenity needs to pass the changes to the application. First, you must select them by using the standard keyboard-mouse selection technique [SHIFT] + Left-click on the mouse to select a range, or [CTRL] and left mouse-click to select/un-select individual records.
NOTE: Zenity is the GUI that this application uses to process all menus, displays, and updates. Zenity is the new incarnation of gdialog. Both are GNOME GUI systems.
To update a record, remember, you must have both the "u" in the "S" column (S=Select, u for Update), and the record must be selected (highlighted in Orange as the above shows). To finalize all updates, click the [COMMIT] button to process all updates selected.
You can add multiple games pitched data for any number of players, or enter each game individually on the same update screen. You can even update data for the same GAMEID. The system will merge these records when it is time to display the pitching boxscores.
Also, the only updates that will be done above is for Workman and Cashner. All have both a "u" and are highlighted. Both must be done in order for the update to take. Zenity will not pass this record to the application. However, if a record is selected without a "u" in the S Column, the application will check to see if the "u" is set. If not, the application will ignore the record.
The reason that you need a "u" in the S-Column is that in a future release, this screen will also allow you to edit and delete records. For now, update is the only option available.
   Legend: Statistics Column Definitions
The following details what each column means, and in some cases, how they are calculated:
   | W (Wins) | Number of Wins. |
| L (Losses) | Number of Losses. |
| SV (Saves) | Number of Saves. |
| SVO (Save Opportunities) | Number of save opportunities. |
| GP (Games Pitched) | Number of games in which the pitcher appeared. |
| GS (Games Started) | Number of games the pitcher started. |
| CG (Complete Games) | Number of starts in which the pitcher recorded every out of an official game. |
| IP (Innings Pitched) | Number of total innings pitched (.1 represents 1/3 of an inning, .2 represents 2/3 of an inning). |
| TBF (Total Batters Faced) | The number of batters a pitcher has faced, akin to plate appearances. |
| H (Hits Allowed) | Number of hits allowed by the pitcher. |
| BB (Walks) | Number of walks (Base On Balls) allowed by the pitcher (Both intentional & unintentional). |
| K (Strikeouts) | Number of strikeouts. |
| RA (Runs Allowed) | Number of runs allowed by the pitcher, both earned and unearned (unearned includes runners from another pitcher who scores). |
| ER (Earned Runs Allowed) | Number of earned runs allowed by the pitcher, determined by the official scorer. |
| HR (Homeruns) | Number of homeruns allowed. |
| HBP (Hit By Pitch) | Number of hit batters. |
| SF (SAC Flies) | Number of sacrifice flies given that scored a run. |
| ERA (Earned Run Average) | The average number of earned runs a pitcher allows per 9 innings. ((ER*9)/IP) |
| OPP-AVG (Batting Average Against) | Rate of hits allowed per at bat, calculated as H/AB. (AB=TBF-(BB+HBP+SF)) |
| WHIP (Walks+Hits per IP) | The average number of baserunners a pitcher has allowed per inning pitched. ((H+BB)/IP) |
| BABIP (Batting Avg on Balls in Play) | The rate at which the pitcher allows a hit when the ball is put in play, calculated as (H-HR)/(AB-K-HR+SF). |
| FIP (Fielding Independent Pitching) | A statistic that tells you what the ERA of a pitcher would look like over some time, were that pitcher to experience league average results in balls in play and league average timings. Calculated as: (13*HR)+(3*(BB+HBP))-(2*K))/IP+cFIP (cFIP=3.214) |
NOTE: For FIP, I use 3.214 as the FIP Constant (cFIP), which represents MLB's 2019 FIP constant. Since the team data being used by this example is from 2019, this is the appropriate value. If you want to calculate the current or your league's FIP Constant: cFIP = league ERA-((13*league HR)+(3 *(league BB+league HBP))-(2*league K))/league IP.