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.

  • Troy@lemmy.ca
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    1 year ago

    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

    • socphoenixOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 year ago

      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!

      • Troy@lemmy.ca
        link
        fedilink
        English
        arrow-up
        2
        ·
        1 year ago

        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.

        • socphoenixOP
          link
          fedilink
          English
          arrow-up
          1
          ·
          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).

  • supermurs@suppo.fi
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 year ago

    This is awesome! Not a coder myself but I’m looking forward to see the bot in action.

    • socphoenixOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 year ago

      It’s gonna be fun! I loved having that on the Flyers subreddit (I’m assuming other subs did the same).