Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attached: Basic script to insert 2019 schedule #42

Open
BrentNewland opened this issue Jul 23, 2019 · 21 comments
Open

Attached: Basic script to insert 2019 schedule #42

BrentNewland opened this issue Jul 23, 2019 · 21 comments

Comments

@BrentNewland
Copy link

I've made a basic script to take the schedules.json from the NFL website and insert it into the schedule table. Doesn't back anything up, doesn't delete the existing schedule, doesn't download the schedules.json. All it does is read the schedules.json and inserts it into the database.

sched.txt

@BrentNewland
Copy link
Author

Forgot to put in the directions in the file: You need to download schedules.json from https://feeds.nfl.com/feeds-rs/schedules.json and place it next to sched.php.

@nickelsong
Copy link

Script worked great, attached is the sql dump. When importing you might need to modify the teamID to match whats in the nflp_teams table

LA = Los Angeles Rams (STL)
LAC = Los Angeles Chargers (SD)
JAX = Jacksonville (JAC/JAX)

schedule_2019.sql.txt

@elwerto
Copy link

elwerto commented Aug 21, 2019

I'm working on a spanish version of the hole script, let me know if anyone finds it useful.

@BrentNewland
Copy link
Author

For LA Rams, the database's teams table needs to change LAR to LA (or STL to LA if you haven't made the updates previously). Also need to rename the gifs in the images folder.

@txrodriguez
Copy link

hello do you have a 2020 script ready or will you be doing one?

@nickelsong
Copy link

2020 Schedule, taken from nfl.com
Notes: Last years script no longer works, NFL changed their api which now requires an api key
Not compatible with PHP 7.2+, I had to drop to 7.1 to get things to work, due to depracated cypto modules.
Weeks 16, 17 has multiple games TBD. Those were defaulted to their respective Sundays @ 1:00pm

Raiders = LV
Rams = LAR
Chargers = LAC
Jacksonville = JAX

You will want to update teams logos in images/logos
Using the teams .svg images from nfl.com schedule page worked pretty well

You will need to update team names in nflp_teams table to include teamID, city, team, and displayName
Oakland Raiders = LV, Las Vegas, Raiders, NULL

nflp_schedule_2020.sql.txt

@rbiddle
Copy link

rbiddle commented Sep 1, 2020

The attached file seems to be missing part of week 17. I've added in the missing 9 games and attached an updated one here.

nflp_schedule_2020.sql.txt

@txrodriguez
Copy link

txrodriguez commented Sep 9, 2020 via email

@rbiddle
Copy link

rbiddle commented Sep 9, 2020

I’m working on an update to the script, but I’m planning manual updates for the 1st 2 weeks at least since it’ll be hard to reliably test until the season is underway.

I’m planning to put the API key in the config file as a variable.

@txrodriguez
Copy link

txrodriguez commented Sep 10, 2020 via email

@rbiddle
Copy link

rbiddle commented Sep 11, 2020

I've forked this project and committed changes. There's A LOT of little changes I had made since this project was abandoned and I picked up a few from DJTJs fork.

The auto-score update works, but is VERY ugly at the moment. It does rely on having the 'final' column in the schedule table (this was one of DJTJs big changes early on). Much of the code relies on that modification, so if you don't have that column, you might have quite a few updates to make.

I'll continue to work on cleaning up the auto-update functionality a bit more, but with only 1 game for 2020 to test with, it's working, but might break later on. It does, however, show the SQL to be run before committing, so it's fairly safe (you can always just not Execute the update).

If you have any questions, log an issue in my fork and I'll monitor there so that I stop hijacking this project's issues log.

@jstackman
Copy link

Looks like you've done some good work rbiddle.

I also have done a lot. Just a few of the things I've done include:

  1. Big CSS and HTML changes to make it look more modern
  2. Robust comment section with mentions, deleting your own comments, and user icons.
  3. Changed the results page to show team logo instead of text
  4. Added an optional payment system, winner take all
  5. Added trophy icons to users that have won seasons
  6. Added medal icons for a perfect week
  7. Tons of bug fixes

...among other things. Perhaps we could work together to bring this thing up-to-date?

@rbiddle
Copy link

rbiddle commented Sep 12, 2020

Sure; do you want to work off my fork or do you want to start one of your own with your codebase as a starting point and I can push to you the updates I've made.

@Haglerd
Copy link

Haglerd commented Sep 13, 2020

Looks like you've done some good work rbiddle.

I also have done a lot. Just a few of the things I've done include:

  1. Big CSS and HTML changes to make it look more modern
  2. Robust comment section with mentions, deleting your own comments, and user icons.
  3. Changed the results page to show team logo instead of text
  4. Added an optional payment system, winner take all
  5. Added trophy icons to users that have won seasons
  6. Added medal icons for a perfect week
  7. Tons of bug fixes

...among other things. Perhaps we could work together to bring this thing up-to-date?

Hey guys, we have a group of people working to. How can I PM y’all to connect more on this outside of github?

@rbiddle
Copy link

rbiddle commented Sep 13, 2020

I got your email; it's late, but tomorrow I'll hop on the discord. Thanks!

@jstackman
Copy link

The only problem is that a lot of my code is specific to my site as I didn't plan on releasing any of it. There are no admin controls or config files, it's mostly hard coded. I will have to work on changing all that over.

@Haglerd
Copy link

Haglerd commented Sep 18, 2020

The only problem is that a lot of my code is specific to my site as I didn't plan on releasing any of it. There are no admin controls or config files, it's mostly hard coded. I will have to work on changing all that over.

Same for me, no worries. It’s just a group for us to collaborate and help one another. If your interested let me know how I could contact you or send me a PM. Rbiddle has joined us.

@stevenmybarra
Copy link

I'm new to this git stuff but I had a question or a request. I've been using @rbiddle version with the added nfl news. I tried to modernize it with the latest bootstrap, etc., but I ran into problems with the entry form. I ended up backtracking and I'm fine with his version, works great, but if you guys get it up to date with @jstackman , i would love to check it out.

@jstackman
Copy link

Honestly, it's probably a little too late this year to get anything up and running. I'll slowly stop hard-coding my changes in and release something next summer if no one else does first.

@Haglerd
Copy link

Haglerd commented Sep 23, 2020

I'm new to this git stuff but I had a question or a request. I've been using @rbiddle version with the added nfl news. I tried to modernize it with the latest bootstrap, etc., but I ran into problems with the entry form. I ended up backtracking and I'm fine with his version, works great, but if you guys get it up to date with @jstackman , i would love to check it out.

Comment on his version and we could see what’s up. He has been updating it and I’m pretty sure it’s usable at this point.

@rbiddle
Copy link

rbiddle commented Sep 24, 2020

@stevenmybarra Are you familiar with git at all and just have questions about GitHub or git in general?

I'm super lazy and never learned git beyond the basics. I make heavy use of the git desktop client and it holds my hand enough to make it work.

If you have changes you want to push to my repo, you'd clone it to your PC, make the updates, then push it to my repo. It won't apply automatically, I'll have to review and pull it in to add your commit(s).

If you want an easy way to merge changes you already made, clone my repo, then paste over the files. It's not the best way, but it usually works well enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants