Commit Graph

69 Commits (58f85b30ac7320dbcfe8be4a40b23c5ee68e4e77)

Author SHA1 Message Date
Mike Lang 58f85b30ac youtubebot: Show the video title
This is an additional 1 quota per video, but with a cache (it's ok if it's out of date)
this should be no issue.
4 weeks ago
Mike Lang b1dbb4f042 give up on timezone crap and use a hard-coded number again
the python version in our container has no timezone data?
2 months ago
Mike Lang 2232bafe95 fix stupid timezone crap 2 months ago
Mike Lang a2403b56cd schedulebot: fix time zones 2 months ago
Mike Lang c53c5a98d5 pubbot: work in years besides 2024 2 months ago
Mike Lang 2c423f65fb prizebot: Fix year regex 2 months ago
Mike Lang 6b7ae95c1f prizebot: make it work for years besides 2024 2 months ago
Mike Lang 54fd356b39 Add youtubebot
This adds a zulip bot that polls the youtube API for new comment threads, and posts them to Zulip.
Some limitations:
- It doesn't keep any state, so it won't post anything it "missed" while not running.
- It can only find top-level comments, not replies
- For quota reasons, we shouldn't poll more often than every 1 minute (at this rate we consume approx 1 upload worth of quota per day)
- If somehow there are more than 100 comments within 1 minute, it will miss all but the last 100.
2 months ago
Mike Lang bbee33afb2 It's ben 8 months ago
Mike Lang 941050aea9 end of run memes 8 months ago
Mike Lang cb08f49003 pubbot: update total var before sending to zulip
so if zulip is down it still saves
8 months ago
Mike Lang 5012c2cee2 prizebot: fix urls 8 months ago
Mike Lang 8ccb6a6e60 pubbot: Post prize names 8 months ago
Mike Lang e794b0cf7d prizebot fixes 8 months ago
Mike Lang 968e6ec273 make prizebot work with new website 8 months ago
Mike Lang 3b1c837bfa Import prizebot 8 months ago
Mike Lang f0fb2fb281 pubbot: Don't send updates with 0 increase
These double messages happen occasionally, we want to just ignore them.
8 months ago
Mike Lang e161e97bb4 pubbot: Flush log, fix type, fetch current total on start 8 months ago
Mike Lang 1956063c67 upgrade to alpine 3.19
- gets us a slightly newer ffmpeg with more transitions
- requires deleting the EXTERNALLY_MANAGED flag file that makes pip not work
8 months ago
Mike Lang bad4f55cab upgrade to alpine:3.18 8 months ago
Mike Lang 6b1989ec4c Revert "Instead of backport libraries, just upgrade to alpine 3.20 (python 1.12)"
and the later attempts to make it work
8 months ago
Mike Lang ca6f589e30 but only AFTER installing pip 8 months ago
Mike Lang cf9cd114ed Stop pip from refusing to work inside our containers 8 months ago
Mike Lang 9960accc0f Instead of backport libraries, just upgrade to alpine 3.20 (python 1.12) 8 months ago
Mike Lang e7983b8cf7 pubbot: trying again... 8 months ago
Mike Lang a051f8f6fc pubbot: fix giveaways code 8 months ago
Mike Lang 0c871b7f6c fix dollars vs cents 8 months ago
Mike Lang cf9abeb307 pubbot typo 8 months ago
Mike Lang 27c6abfca9 pubbot: Re-add giveaway support 8 months ago
Mike Lang 6bb3edab41 schedulebot: Fix having hour as float 8 months ago
Mike Lang 69d3892101 pubbot: Get channel ids from config and handle prizes in the new website 8 months ago
Mike Lang 653f651491 schedulebot: Use correct division for calculating hour
int() is truncation, // is floor
8 months ago
Mike Lang a56f7e7ecb blogbot: can't hash strings 9 months ago
Mike Lang 2a12687473 blogbot: need to save the string version of the html 9 months ago
Mike Lang a648dee902 Fix typo in blogbot 9 months ago
Mike Lang fbbe37ca9e blogbot: Save blog contents by hash when seen
For every unique hash of the blog html, it will save a copy.
Blogs are saved as JSON files in {segments_dir}/blogs
9 months ago
Mike Lang ce9a8309a2 blogbot: Changes to integrate into wubloader repo 9 months ago
Mike Lang 2618cc076d blogbot changes to work with 2024 website 9 months ago
Mike Lang de52f7dbff Import blogbot from previous years 9 months ago
Hubbe 3ba01dda11 Don't check for active giveaways
The old API is no more, so we can't check for active giveaway. Simply disable it for now.
9 months ago
Mike Lang f2a6420634 pubbot: only listen on this year's channel
the other one was last year's
9 months ago
Mike Lang 177fad17e2 pubbot: listen on both "total" channels we've seen
The difference? No idea.
9 months ago
Thomas Chick f15dcaf545 fix message parsing bug with donation total 9 months ago
Mike Lang 211036a4d4 pubbot: try to get correct new url for db total 9 months ago
Mike Lang 4cd0ef1327 schedulebot: Take creds as a file
Avoids needing to put the creds in docker-compose.jsonnet.
The existing "import" trick didn't work due to the way we run jsonnet in docker.
9 months ago
Mike Lang 3fb6676fbe pubbot: Add more detail to logging
Wrap raw pubnub messages in a metadata object containing:
- time
- our hostname
- our pid
- any inferred information

Plus make a message-less log write on startup so we know where there might be gaps.

Also do more error handling so that we don't completely lose messages on error.
9 months ago
Mike Lang 9b19c12a53 Add pubnub-watching zulip bot
Which also records all pubnub messages for archival to a file SEGMENTS/pubnub-log.json.
We ran this for most of last year, but not as part of wubloader.
9 months ago
ZeldaZach e7a839c6cd Remove need to download twice on startup 1 year ago
ZeldaZach 07fc84e85e Relabel Comment to show new config values 1 year ago
ZeldaZach 8bbc72184c Support hot reload of Zulip Schedule
- Move sheets API into common dir, since multi use
- Live download from Google Sheets using Config
- Falls back on old schedule if new one can't be downloaded for some reason
1 year ago