this post was submitted on 27 Jun 2023
9 points (100.0% liked)

Hockey

2432 readers
1 users here now

Rules

List of Team-Specific Communities:

Metropolitan Division

Atlantic Division

Central Division

Pacific Division

founded 3 years ago
MODERATORS
 

cross-posted from: https://midwest.social/post/865159

I've started work on a lemmybot that can be run using python to automatically run a score-tracker in a post! There's still some work to go to make it more user friendly but getting the link out early. There will be a few updates to the script to cache some information and to make it easier to pick the team without needing the teamID from the nhl api prior to the preseason.

If anyone who codes wants to help I'll also gladly merge pull requests as they come in.

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 2 points 1 year ago* (last edited 1 year ago) (1 children)

Wow, what a straightforward little bot script. Haven't played with lemmy bots at all yet, but if this is all it takes to do something useful, we're going to have a lot of fun little toy robots running around. I just hope people use their powers for awesome :)

edit: from where do you source the plemmy library you import? This one? https://github.com/tjkessler/plemmy

[–] [email protected] 2 points 1 year ago (1 children)

Yes that is the source for plemmy! it is super straightforward. Honestly easier than scraping the NHL api and that wasn't all that hard either. There's also "https://enterprise.lemmy.ml" that's a public server set up for testing scripts on that has been invaluable in testing things without making a mess of my community while testing.

I'm super excited to see how easy these bots are, I thought I'd need to start now to barely have this done by preseason but at this rate it'll be done well in advance!

[–] [email protected] 2 points 1 year ago (1 children)

Oooh, nice! We should also set up /c/test or something one whatever local server you're on. Actually, that's a good idea. I'll do it now on my instance, if it isn't already.

[–] [email protected] 1 points 1 year ago

That is a great idea. Once I get a bit of the outstanding issues resolved I'll have an update to the readme posted in the dev branch with some info on how to test it against a game that's already completed as well. I want to finish figuring out the post body info/formatting before doing much more testing. Once this thing seems ready I'm going to ask my server about creating a bot account to use for at least my community. Ultimately once the 1.0 is finished it might be worth extending this so a single server could have a daemon of sorts to scrape upcoming games and post on the respective community's (if their mods request it).