|
||||
| ||||
|
|||||||
| OOTP Mods - Database Tools Do you need to take a dump? SQL gurus welcome |
![]() |
|
|
Thread Tools |
|
|
#1 |
|
Hall Of Famer
Join Date: Nov 2004
Location: In a house in Saint Cloud, Florida.
Posts: 7,085
|
Anderson Utilities 2006 - AUHomerun
Early Peek at it...
http://www.planetootp.com/AUHomerun/default.htm Next: You run it at the end of the year and do a SAVE DATABASE and it saves all the home run information to a database, so you can tally career home runs for all the hitters. HTML report. A HTML report for each player (with 1 or more homeruns) This report would list every home run hit by the guy, vs. what pitcher, what team, the inning, outs, count, runners on. Also show how many home runs he hit by count, by number of outs, by runner on base situation, vs. pitcher, vs. team, home, away, team record when he hit a HR, # of 2 HR games, # of 3 HR games. (for his career) It would also modify the HTML player reports, putting a link to this file for online leagues.
__________________
Like BLUES? Visit www.smokestacklightnin.com, you will LOVE it! New show every Monday!! New Blues HOF![/COLOR][/FONT]
|
|
|
|
|
|
#2 |
|
Hall Of Famer
Join Date: Nov 2004
Location: In a house in Saint Cloud, Florida.
Posts: 7,085
|
Started writing the HTML routine.
I have to put the HR output in tables, which will cause the SI logo to move up to the top like it is suppose to be. Then I will add the totals, hrs on each count, etc. Then add a link from the actual player html page to this page.
__________________
Like BLUES? Visit www.smokestacklightnin.com, you will LOVE it! New show every Monday!! New Blues HOF![/COLOR][/FONT]
Last edited by Comedian2004; 12-16-2006 at 01:29 PM. |
|
|
|
|
|
#3 |
|
Hall Of Famer
Join Date: Nov 2004
Location: In a house in Saint Cloud, Florida.
Posts: 7,085
|
Here is the latest HTML page.
http://www.planetootp.com/1969/playe...e_Mccovey.html I think it is looking pretty cool so far. Now remember, this is going to be a career thing. So, eventually, it will show a listing for EVERY home run in the player's career. When you run it, hit the CREATE HTML button and it will create the files, one for each player that has at least 1 homerun. It stores it in the HTML/PLAYERS folder under this format: HR_firstname_lastname.html If you run it a second time, it will delete all of the HR_*.* files and then create new ones. Next, I will modify all the existing player HTML files to put in a link that will link you to his HR page.
__________________
Like BLUES? Visit www.smokestacklightnin.com, you will LOVE it! New show every Monday!! New Blues HOF![/COLOR][/FONT]
|
|
|
|
|
|
#4 |
|
Hall Of Famer
Join Date: Nov 2004
Location: In a house in Saint Cloud, Florida.
Posts: 7,085
|
Tweaked up the HTML page a little, adding the links to the pitchers pages and also the links to the team page. Working on a routine to highlight the row when the cursor is on it, like BF does. Almost have it working.
Next up is to add the link to the HR page to the player's HTML page, then to database it, so it will show all the home runs in their career. (If you run this program during the offseason)
__________________
Like BLUES? Visit www.smokestacklightnin.com, you will LOVE it! New show every Monday!! New Blues HOF![/COLOR][/FONT]
|
|
|
|
|
|
#5 |
|
Hall Of Famer
Join Date: Nov 2004
Location: In a house in Saint Cloud, Florida.
Posts: 7,085
|
Program now modifies the player's HTML files adding a link to the hr log file. I also changed the hr log file to HR_player_919.html, whereas the 919=player ID to make it easier for me.
Next up is the database.
__________________
Like BLUES? Visit www.smokestacklightnin.com, you will LOVE it! New show every Monday!! New Blues HOF![/COLOR][/FONT]
|
|
|
|
|
|
#6 |
|
Hall Of Famer
Join Date: Mar 2003
Posts: 9,005
|
|
|
|
|
|
|
#7 |
|
Hall Of Famer
Join Date: Nov 2004
Location: In a house in Saint Cloud, Florida.
Posts: 7,085
|
Thanks, until I hit a bump in the road.
The current release works as reported, creating the HR log files and also modifying the existing player HTML files. You can see a season with the mods in place here: http://www.planetootp.com/leagues/1975/index.html Go click on a HR hitter and you will see the HR LOG link. I am working on the database, well, was, going to take a break now. I have a way to do the database and it works correctly, but having some problems merging the data. 1. It is adding 2 blank lines in the middle, between the years and it hops out of it there. I will figure that one out and then that part should work fine. 2. I may have not thought of something. I am basically merging last years GAMES.CSV and another file. I look in the one file and then go look in the game file and pull up the game, pulling out the pitchers name and team. Well, problem is, it will find the 1st game from the 1st year and then exit, never getting to the 2nd game. Ah, if this was Chess, then I have just been mated. But, since this is not Chess, I just have to start the database routine over and redesign it. I will save each year in a file with AU_YEAR_ appended to the start of it. Then search in each one. So, it is still doable. The only problem I forsee is running this program after 20 or 50 seasons. It may take a while to complete. So, I may change it so that it gives you a choice to just show log for this season or show log for career. Maybe even just have it to the career for retired players and check to see if it has already been done for the retired player and not do it again. The brain is working as I write this message, but it may be just the rattling of the headphones I have on.
__________________
Like BLUES? Visit www.smokestacklightnin.com, you will LOVE it! New show every Monday!! New Blues HOF![/COLOR][/FONT]
|
|
|
|
|
|
#8 |
|
Hall Of Famer
Join Date: Nov 2004
Location: In a house in Saint Cloud, Florida.
Posts: 7,085
|
I do like the way I was able to put in the HR LOG link in the actual player html files. Also think the HR log file looks good, the way I use the SION background, with the links at the top.
It actually uses the same style sheet that the game uses, so if you have modified it for your league, it will work with your color changes.
__________________
Like BLUES? Visit www.smokestacklightnin.com, you will LOVE it! New show every Monday!! New Blues HOF![/COLOR][/FONT]
|
|
|
|
|
|
#9 |
|
Hall Of Famer
Join Date: Nov 2004
Location: In a house in Saint Cloud, Florida.
Posts: 7,085
|
OK, early morning programming, I got it working. I also created a doc file at:
http://www.planetootp.com/AUHRHELP.htm It works pretty good. I will be simming a 20 year league today and when all is done, I will publish the league so you can see how much it enhances in a situation like this.
__________________
Like BLUES? Visit www.smokestacklightnin.com, you will LOVE it! New show every Monday!! New Blues HOF![/COLOR][/FONT]
|
|
|
|
|
|
#10 |
|
Minors (Double A)
Join Date: Mar 2005
Posts: 108
|
You mean I did my HR Log generator all wrong?
EDIT: Yes, I'm a tad miffed. I did it all wrong to begin with. But I'm going to continue with my effort, nonetheless.
__________________
Download my OOTP 6 to OOTP 2006 Schedule Converter: http://www.ootpdevelopments.com/boar...d.php?t=121664 Last edited by LeafsFan2005NC; 12-18-2006 at 02:41 AM. |
|
|
|
|
|
#11 |
|
All Star Starter
Join Date: Jan 2002
Location: Clearwater, FL
Posts: 1,152
|
Hey Web do I have an old page for your website becuase alot of programs are not listed there, I love the almanac program but on your website it says it will be available in the future. www.planetootp.com
__________________
www.emerge180.com |
|
|
|
|
|
#12 |
|
Hall Of Famer
Join Date: Nov 2004
Location: In a house in Saint Cloud, Florida.
Posts: 7,085
|
Actually LeafsFan, I never looked at yours. I was motivated to write this when I saw what baseball reference had done.
__________________
Like BLUES? Visit www.smokestacklightnin.com, you will LOVE it! New show every Monday!! New Blues HOF![/COLOR][/FONT]
|
|
|
|
|
|
#13 | |
|
Hall Of Famer
Join Date: Nov 2004
Location: In a house in Saint Cloud, Florida.
Posts: 7,085
|
Yeah, I know. I have to update the page!
You can find all of them here at this forum though. Quote:
__________________
Like BLUES? Visit www.smokestacklightnin.com, you will LOVE it! New show every Monday!! New Blues HOF![/COLOR][/FONT]
|
|
|
|
|
|
|
#14 |
|
Hall Of Famer
Join Date: Nov 2004
Location: In a house in Saint Cloud, Florida.
Posts: 7,085
|
PlanetOOTP.com has not been updated to include all of my programs. There are 29 total programs now. You can install all of the programs from that page and documentation is available for most of the programs on this site.
www.planetootp.com
__________________
Like BLUES? Visit www.smokestacklightnin.com, you will LOVE it! New show every Monday!! New Blues HOF![/COLOR][/FONT]
|
|
|
|
|
|
#15 | |
|
Minors (Double A)
Join Date: Mar 2005
Posts: 108
|
Quote:
Of course I let my program languish for a long time, but I've returned to it. I just never knew that the information I was looking for was already in the dump files. I was parsing box scores to get my logs.
__________________
Download my OOTP 6 to OOTP 2006 Schedule Converter: http://www.ootpdevelopments.com/boar...d.php?t=121664 |
|
|
|
|
|
|
#16 | |
|
Hall Of Famer
Join Date: Nov 2004
Location: In a house in Saint Cloud, Florida.
Posts: 7,085
|
Just remember that the dumps are erased season to season, that is why I have my program give you the option to back them up. There were a lot more stuff that I wanted to do, but I more and likely won't do much more to this program, as I have some pending projects coming up.
Quote:
__________________
Like BLUES? Visit www.smokestacklightnin.com, you will LOVE it! New show every Monday!! New Blues HOF![/COLOR][/FONT]
|
|
|
|
|
|
|
#17 |
|
Minors (Double A)
Join Date: Mar 2005
Posts: 108
|
Yeah, my program has relied on yearly dumps as well. I've switched mine to the Access SQL dumps since that seemed to speed things up a little, though it still takes a few minutes to update the database, which I suppose is normal considering the huge amount of data that's generated by the game itself.
__________________
Download my OOTP 6 to OOTP 2006 Schedule Converter: http://www.ootpdevelopments.com/boar...d.php?t=121664 |
|
|
|
![]() |
| Bookmarks |
|
|