openfootball / help

help & support incl. frequently asked questions (FAQs) and answers - let's keep all support question in one issue tracker, thanks
5 stars 4 forks source link

will score be added after a match? #42

Open CyrilNb opened 3 weeks ago

CyrilNb commented 3 weeks ago

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 commented 3 weeks ago

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 commented 3 weeks ago

Sure, thanks again for your work!

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

CyrilNb commented 3 weeks ago

Any way I can get this in JSON?

geraldb commented 3 weeks ago

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 commented 3 weeks ago

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 commented 3 weeks ago

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?

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 commented 3 weeks ago

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

geraldb commented 3 weeks ago

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 commented 3 weeks ago

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 commented 3 weeks ago

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

Yes I was wondering if I could!

geraldb commented 3 weeks ago

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 commented 2 weeks ago

Great! Thanks.

Nice work!

CyrilNb commented 2 weeks ago

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 commented 2 weeks ago

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 commented 2 weeks ago

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 commented 2 weeks ago

it's here (step 1) -> https://github.com/sportdb/sport.db/blob/master/build/build_euro2024.rb and here (step 2) -> https://github.com/yorobot/football.json/blob/master/sandbox/gen_euro.rb for now.

CyrilNb commented 2 weeks ago

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

geraldb commented 2 weeks ago

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 commented 2 weeks ago

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 commented 2 weeks ago

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 commented 2 weeks ago

great! let me know when it's operational 🙂

geraldb commented 2 weeks ago

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 commented 1 week ago

awesome! Thanks for your work :)

geraldb commented 1 week ago

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 commented 1 week ago

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

CyrilNb commented 5 days ago

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

geraldb commented 4 days ago

@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 commented 4 days ago

No worries, thanks!