View Single Post
Old 07-07-2006, 10:34 PM   #69 (permalink)
Comedian2004
Hall Of Famer
 
Comedian2004's Avatar
 
Join Date: Nov 2004
Location: In a house in Saint Cloud, Florida.
Posts: 6,870
Thanks: 0
Thanked 22x in 14 posts
Modified the routine.

I started thinking. OK, let's say that I let you specify the starting year and the ending year.

Example. I have a league that started in 1920. It is currently in year 1962.

That is 42 years of simulation. Now, if I manually wanted to add the photos, I would have to copy over all the JPGs from each folder from 1920 to 1962, actually, I would have to go a few years before 1920 to cover those people.

So, you run my program and you specify year 1920 as the starting year and 1962 as the end year.

It then looks at each player, one at a time and then searches for him in each folder, starting at 1920. When it finds a match, based on his name, it then copies his JPG over to the HTML/IMAGES folder and moves to the next player.

It also records a list of all players that it could not find photos for, with their player ID.

i.e.

Joe Dishwasher (181)
Ben Dover (2112)

In my example league, it took about 2 minutes to go through every player and copy them over. I then had over 3400 photos of players.

Now, lets say I sim 1962 and I have the draft. I can then run the program again and specify 1960 as the starting year and 1963 as the ending year. (You want to add a few years to cover any players placed in the wrong folder). It will then add the newly drafted players photos.

OK, now I run the sim to 1975. I run it again and specify 1960 to 1980 and those players are added.

Now, the next step, when I get a collection of at least 10,000 no-name players, is to have it copy over the no-names to the folder. But, it would retain their user number for the photo. So, instead of Joe_Dishwasher.jpg, he would be player_181.jpg (have to check the format). But this would make it easier to replace photos when you find one that is correct or you just do not like a players photo.

So, if later on, I find the correct picture of Mr. Dishwasher, and lets say his first year was 1975, I would put him in the 1970 folder and run it again.

The plan behind this routine is to generate a photo for every player in the league in a matter of minutes.

You could even do this. Create a fictional league. Add a few historical players and run the program and since it would not find matches for the players, it would then copy over fake pictures for every player, yet the few historicals you have would also be correct. As an added bonus, if a fictional player had a real players name, he would get his photo.

I need a collection of fictional players!!
__________________
Like BLUES? Visit www.smokestacklightnin.com, you will LOVE it! New show every Monday!! New Blues HOF![/COLOR][/FONT]
Comedian2004 is offline   Reply With Quote