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

will score be added after a match? #42

Open
CyrilNb opened this issue Jun 13, 2024 · 32 comments
Open

will score be added after a match? #42

CyrilNb opened this issue Jun 13, 2024 · 32 comments

Comments

@CyrilNb
Copy link

CyrilNb commented Jun 13, 2024

Hey, quick question, will the score be added after a match or even during live game? If so, at which frequency?

Will future rounds be added later as well?

Thanks for this!

@geraldb geraldb transferred this issue from openfootball/euro.json Jun 13, 2024
@geraldb
Copy link
Member

geraldb commented Jun 13, 2024

helllo, i can't promise / guarantee anything - but, yes, the plan is to update daily. in the beginning "by hand" and than auto-sync / generation via github actions. the main source here -> https://github.com/openfootball/euro/blob/master/2024--germany/euro.txt will still get updated by hand ("wikipedia-like / wiki page-like) during the tournament.

@CyrilNb
Copy link
Author

CyrilNb commented Jun 14, 2024

Sure, thanks again for your work!

I can help todo it by hand at the beginning, if needed!

@CyrilNb
Copy link
Author

CyrilNb commented Jun 14, 2024

Any way I can get this in JSON?

@geraldb
Copy link
Member

geraldb commented Jun 14, 2024

fyi - the auto-generated json for euro 2024 is here https://github.com/openfootball/euro.json/blob/master/2024/euro.json that mirrors the source here <https://github.com/openfootball/euro/blob/master/2024--germany/euro.txt >

updates (in .txt source) more than welcome. i am central european time zone (vienna, austria ) and i will / try to update in the morning / midday + one day. the github actions setup (for json generation) will (likely) take two or three days for full "automagic" generation.

@CyrilNb
Copy link
Author

CyrilNb commented Jun 14, 2024

Thanks for pointing out the .json!

I'm in the same timezone, I will likely watch all live matches so I can update it accordingly.

Alright, so manual editing is only required for these first ~3 days.

edit: what is "score1i" and "score2i" meaning?

@geraldb
Copy link
Member

geraldb commented Jun 14, 2024

the euro.txt (wiki-like) page score update is by hand for the tournament. all 30 days. i only have to do the json generation for testing the first ~3 days by hand (than fully automated via github actions).

what is "score1i" and "score2i" meaning?

  • score1i/score2i is half time (i) and team1/team2
  • score1ii/score2ii is full time (ii) that is, 90mins (incl. 45 min score from first half)
  • score1et/score2et is (after) extra time (incl. 90mins score from first and second half)
  • socre1p/score2p is (penalty score only)

one idea is to change the score (in json) to something like score: [ht: [], ft: [], et:[], pen[]] or such in the future. not sure if that is more intuitive / easier.

@CyrilNb
Copy link
Author

CyrilNb commented Jun 14, 2024

Indeed, such a change would be more intuitive. Should we do it right now before it's start?

@geraldb
Copy link
Member

geraldb commented Jun 14, 2024

note - the json always gets auto-generated via script. sure let's use the new score format for the euro 2024 already in use way back here -> https://github.com/openfootball/football.json/blob/master/2020-21/en.1.json

ps: i generate (AND upload/push) the update tomorrow (Sat Jun/15) with the Germany - Scotland results.

@geraldb
Copy link
Member

geraldb commented Jun 15, 2024

thanks for the euro.txt update. sorry i am slow with the json generation - the (github action) automation should be in place in the next (one or two) days after some more testing.

ps: you are more than welcome to update some more and you are invited to join the github org - if you tell me yes i send you an invite via github (adding on github only works with invites).

@CyrilNb
Copy link
Author

CyrilNb commented Jun 15, 2024

No worries, once the automation is in place it's gonna be really great :)

Yes I was wondering if I could!

@geraldb
Copy link
Member

geraldb commented Jun 16, 2024

welcome. i sent the invite this morning. if you go to https://github.com/openfootball you should see on top of the page (if you are logged into github) plus i think github sends out an email invite too. i update and generate yesterdays matchday now thanks for your contributions.

ps: all reader and generation scripts are open source (while updating i don't push out a packaged gems every day but use the head from source). the sportdb machinery should be more stable and easier to use in the next weeks.

@CyrilNb
Copy link
Author

CyrilNb commented Jun 17, 2024

Great! Thanks.

Nice work!

@CyrilNb
Copy link
Author

CyrilNb commented Jun 17, 2024

would it be possible to run github actions at specific time (e.g. after 2 hours the kickoff time of a match) so that the .json is updated with result multiple time a day?

@geraldb
Copy link
Member

geraldb commented Jun 17, 2024

one idea to try is to run a github action generation (build) everytime the euro.txt gets changed / commited. otherwise, yes timed actions are possible using the cron tab syntax - see https://crontab.guru for example

@CyrilNb
Copy link
Author

CyrilNb commented Jun 17, 2024

I've used cron in the past yes, but indeed the best idea is to run the github action generation everytime euro.txt is changed to that the .json is also up-to-date.

Could you point me out where the script is?
thanks

@geraldb
Copy link
Member

geraldb commented Jun 18, 2024

@CyrilNb
Copy link
Author

CyrilNb commented Jun 18, 2024

I can't find any Github Action in the Actions section on top menu?

@geraldb
Copy link
Member

geraldb commented Jun 18, 2024

fyi - the "old" (github action) setup (for json generation) was / is here https://github.com/yorobot/football.json/actions . for euro.json i am preparing a new setup.

@CyrilNb
Copy link
Author

CyrilNb commented Jun 20, 2024

I'm not very familiar with Action so I did not know how/what to change to run github action everytime euro.txt is changed to generate the .json.
Are you able to do that? Many thanks.

This would be very nice, as I can update the euro.txt almost live.

@geraldb
Copy link
Member

geraldb commented Jun 20, 2024

thks. yes, i will put together a github action / setup. thanks for your understanding. it will take two or three more days to prepare everything (bundle up the scripts in gems etc.)

@CyrilNb
Copy link
Author

CyrilNb commented Jun 20, 2024

great! let me know when it's operational 🙂

@geraldb
Copy link
Member

geraldb commented Jun 23, 2024

fyi: the (test) json generation via github action now works - see https://github.com/openfootball/euro/actions i try to add the trigger/run on commit plus the missing (auto-)commit to euro.json on Monday (tomorrow). thks for the score and goal updates. keep it up.

@CyrilNb
Copy link
Author

CyrilNb commented Jun 24, 2024

awesome! Thanks for your work :)

@geraldb
Copy link
Member

geraldb commented Jun 24, 2024

thks for your kind words and support. fyi: the auto-gen and update on commit (push) is now operational. next time you update euro.txt you should see an auto-gen update on euro.json.

@CyrilNb
Copy link
Author

CyrilNb commented Jun 24, 2024

with your work and my (for now) availability so we now have almost a live API json. so cool!

@CyrilNb
Copy link
Author

CyrilNb commented Jul 2, 2024

hey @geraldb , can I have access to the CopaAmerica as well? I want to update scores easily

@geraldb
Copy link
Member

geraldb commented Jul 3, 2024

@CyrilNb first thanks for all your updates / contributions. yes, of course. i added the missing repo. sorry. if any repo is missing, please tell. the list is here https://github.com/orgs/openfootball/teams/editors/repositories

@CyrilNb
Copy link
Author

CyrilNb commented Jul 3, 2024

No worries, thanks!

@Jgelke
Copy link

Jgelke commented Jul 11, 2024

thank you guys for your service. I have been using this to update the results with my company prediction game, which I am hosting. The prediction game platform (kicktipp) unfortunately does not provide a download of the actual results of the matches. So, I was lucky to have your data to integrate into my Power BI. Great job.
Please repeat this for the next major tournaments as well.

@geraldb
Copy link
Member

geraldb commented Jul 11, 2024

thanks for the kind words. i try my best this summer to make the football.db machinery easier to use. i am sure back for the world cup 2026! what (upcoming) tournament(s) do you have in mind?

@Jgelke
Copy link

Jgelke commented Jul 11, 2024

Yes that sounds great. World cup 26 is definitely the next highlight. UEFA Championsleague may also be one from interest, but not as important.
I wonder why UEFA FIFA and the other big associations do not provide a live data feed. They should actually be the source of truth.

@geraldb
Copy link
Member

geraldb commented Jul 11, 2024

there is an unofficial / undocumented uefa api (used by uefa app itself). uefa (fifa) want to keep all rights to its data (for licensing etc.). ask your public national tv for the data or newspaper etc.. they all have the data but only use it for their own apps / pages. basic match data / facts are not copyrightable but all want to make money or be the exclusive owner. not sure if anything is left from the "open data movement". anyways, i try to do all five european leagues (eng, de, it, es, fr) for the 2024/25 season and i look into (updating/adding) the (uefa) champions league.

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

3 participants