Post ASIHGS69gOq8RQZZ1E by patricia_gerstenberger@mastodon.world
(DIR) More posts by patricia_gerstenberger@mastodon.world
(DIR) Post #ASHxhz5F9cd5TkzsTA by simon@fedi.simonwillison.net
2023-02-03T02:38:04Z
0 likes, 0 repeats
Ported my @covidsewage over to MastodonEvery morning it posts an image with the latest Covid sewage charts for various locations around the San Francisco Bay Area - because the sewage charts are the only figures I still trust!The sewage doesn't lieThe screenshots come from https://covid19.sccgov.org/dashboard-wastewater - here's the latest image:
(DIR) Post #ASHxwn0MLSBMMRlwJ6 by simon@fedi.simonwillison.net
2023-02-03T02:39:15Z
0 likes, 0 repeats
The bot runs entirely from this GitHub scheduled actions workflow: https://github.com/simonw/covidsewage-bot/blob/main/.github/workflows/toot.ymlIt uses my https://shot-scraper.datasette.io/ CLI screenshot automation tool and the excellent https://toot.readthedocs.io/ Mastodon CLI utility
(DIR) Post #ASHxwrqyJmdzOmQ0rw by simon@fedi.simonwillison.net
2023-02-03T02:40:17Z
0 likes, 0 repeats
Amusingly, I found toot because I sat down to build myself a CLI tool for posting to Mastodon (an equivalent of my existing https://github.com/simonw/tweet-images tool) and checked PyPI to see if the name "toot" was available... and it had already been taken by a tool that did EXACTLY what I wanted to do
(DIR) Post #ASI00bFwAUwezQ0GiO by simon@fedi.simonwillison.net
2023-02-03T03:04:09Z
0 likes, 1 repeats
Here's a TIL describing how the new Mastodon bot works - should be handy for anyone else who wants to create their own bots too: https://til.simonwillison.net/mastodon/mastodon-bots-github-actions
(DIR) Post #ASI1wc5bKOzOK9OaAq by webology@mastodon.social
2023-02-03T03:26:21Z
0 likes, 0 repeats
@simon Have you thought about turning shot-scraper into it's own image with the browser pre-installed? If you did this, it could be called as it's own GHA step and greatly reduce the number of steps needed to invoke it.
(DIR) Post #ASI2Jx39YzoTzaNYki by simon@fedi.simonwillison.net
2023-02-03T03:30:26Z
0 likes, 0 repeats
@webology I had not! I've not looked at that side of GitHub Actions at all, do you know if there are any good examples I could borrow from?
(DIR) Post #ASI4ecc0wfvCayfXnc by cebolleta@mastodon.gamedev.place
2023-02-03T03:56:26Z
0 likes, 0 repeats
@simon well done, unfortunately last time i checked botsinspace had registrations closedš¢
(DIR) Post #ASI56G1QWp5GdqjWjY by case@freeradical.zone
2023-02-03T04:01:33Z
0 likes, 0 repeats
@simon for some reason, Ivory just sits here spinning? Any other Ivory app users here able to Follow this new bot account?
(DIR) Post #ASI7mIJQbRzvoeKFxQ by simon@fedi.simonwillison.net
2023-02-03T04:31:44Z
0 likes, 0 repeats
@case how odd! I just unfollowed and followed in Ivory and it worked OK
(DIR) Post #ASI869ynIHWdlQ9Aq8 by case@freeradical.zone
2023-02-03T04:35:08Z
0 likes, 0 repeats
@simon got it working. Iād pasted the https link and was relying on Ivory to parse the āuserā URL, which has worked in the past. Maybe thereās a subtle bug in there somewhere.
(DIR) Post #ASI8HmDZSt9nXkb8pk by dws@mastodon.cloud
2023-02-03T04:36:01Z
0 likes, 0 repeats
@simon You can coax a 'last 30 days' out of that page, which might be more useful.
(DIR) Post #ASI8Ugj7BzjeHFVd4K by webology@mastodon.social
2023-02-03T04:37:43Z
0 likes, 0 repeats
@simon the tl;dr is you add a Dockerfile (shot-scrapper install + playwright install) and an action.yml file to your repo and then you can call it / pass args/options to it like any other action step you use. https://docs.github.com/en/actions/creating-actions/creating-a-docker-container-action is actually pretty good.
(DIR) Post #ASI8hHgdbMoINjMB8a by simon@fedi.simonwillison.net
2023-02-03T04:41:09Z
0 likes, 0 repeats
@webology and then GitHub build the image once and reuse it for their workers? Neat, I should try that
(DIR) Post #ASI918f6rg1iBT6qA4 by hlesesne@fosstodon.org
2023-02-03T04:45:37Z
0 likes, 0 repeats
@covidsewage @simon this is terrific and extremely interesting. It seems to imply (unless Iām reading it wrong - and I may be) that the latest surge was the worst (in terms of total infections - not necessarily deaths or difficulties) and that we should be expect more surges, more rapidly. Is that right?
(DIR) Post #ASI9EivXLNT6QFGqfI by webology@mastodon.social
2023-02-03T04:47:55Z
0 likes, 0 repeats
@simon since it's been >6 months since I last played with it, I think I had to build the image and then push it on my own. Then I had a Dockerfile which reference that image referenced in my actions.yml file. I need to try it out again because they may have updated it to just work without the build/push step.
(DIR) Post #ASIAfqGUGm5KxAZ5sm by simon@fedi.simonwillison.net
2023-02-03T05:04:18Z
0 likes, 0 repeats
@hlesesne @covidsewage I'm not qualified to comment really! I just keep an eye out for the spikes
(DIR) Post #ASIHGS69gOq8RQZZ1E by patricia_gerstenberger@mastodon.world
2023-02-03T06:17:56Z
0 likes, 0 repeats
@simon @covidsewage I worked in healthcare many years and I, too, am amazed that this is our best source of information about viral spread.
(DIR) Post #ASIOpDw91g9WKpPxVg by pagessin@hep.social
2023-02-03T07:42:12Z
0 likes, 0 repeats
@simon @covidsewage Doesnāt GitHub Actions stop running scheduled jobs after some (short) amount of time without activity on the repo?
(DIR) Post #ASISI1Mr8XFPc3KpVY by __steele@hachyderm.io
2023-02-03T08:21:25Z
0 likes, 0 repeats
@simon @webology Last time I did this, it would rebuild the image on every usage. Got much better performance by building the image and storing it on ghcr.io, but then youāve got *another* pipeline
(DIR) Post #ASIiqxFu13HkGFlJHU by simon@fedi.simonwillison.net
2023-02-03T11:27:06Z
0 likes, 0 repeats
@pagessin @covidsewage not if you commit a change back to the repo every time the action runs!
(DIR) Post #ASIj8javXstN6a4f32 by bassistance@chaos.social
2023-02-03T11:30:00Z
0 likes, 0 repeats
@simonThanks for sharing!I realized my bot built with https://cheapbotsdonequick.com/ will likely die soon, along with the access to the "source code" (mostly text). Have you used this, and know of any way to migrate from there to Mastodon?My bot https://twitter.com/homerlines just posts a random line of text from a big list, and needs to avoid obvious duplicates. I don't know how to store the necessary state with GitHub Actions...
(DIR) Post #ASIjMVkLpRrWD73FIm by pagessin@hep.social
2023-02-03T11:30:21Z
0 likes, 0 repeats
@simon @covidsewage I might be wrong but I believe thatās what I did and they ignored those commits. I suppose if you do it with your personal SSH key it might work.
(DIR) Post #ASIjYeVr3ugasD3nkW by simon@fedi.simonwillison.net
2023-02-03T11:33:31Z
0 likes, 0 repeats
@pagessin I've been doing it for 100+ repos for a few years now without running into that problem, see https://simonwillison.net/2020/Oct/9/git-scraping/
(DIR) Post #ASIjjCdb2dTRbbiDc8 by simon@fedi.simonwillison.net
2023-02-03T11:34:30Z
0 likes, 0 repeats
@bassistance easiest way to store state in a GitHub Actions run is to commit a text file back to the repo itself
(DIR) Post #ASIjv5iiaOU1cumDQ0 by pagessin@hep.social
2023-02-03T11:35:29Z
0 likes, 0 repeats
@simon well fair enough š
(DIR) Post #ASIkKihan0jrlZTFlw by bassistance@chaos.social
2023-02-03T11:42:08Z
0 likes, 0 repeats
@simonMakes sense! I can put the text input in one file, and reference the last x published lines in another, than find a good shuffle algorithm that would also work for a song playlist... Or just shuffle the input once, then store the current line and roll over from the end back to the beginning... (and shuffle again?)
(DIR) Post #ASJ7LAf18eBBQKRzJA by marcoshuerta@vmst.io
2023-02-03T16:00:14Z
0 likes, 0 repeats
@simon I kept seeing Toot CLI in the client application _name data and I was confused. I though it was like a pine/elm/nano thing.I didnāt think that people would of course use it to make bots! Seems obvious now.(Iāve been using the `mastodon.py` module)
(DIR) Post #ASJAQZQolez7Ym4iEC by webology@mastodon.social
2023-02-03T12:43:03Z
0 likes, 0 repeats
@__steele @simon that seems reasonable and potentially more stable than pointing people to a git repo. A
(DIR) Post #ASJAQZy8lldjE7fKAS by simon@fedi.simonwillison.net
2023-02-03T16:35:34Z
0 likes, 0 repeats
@webology @__steele I'm still pretty uncomfortable with any GitHub Actions pattern that could allow someone lee to break your workflows by updating their action that you're reusing - most of mine tend to stick to the official https://github.com/actions building blocks for that reason
(DIR) Post #ASJCdxvVCumBCbwUeO by jpanzer@mastodon.social
2023-02-03T17:00:14Z
0 likes, 0 repeats
@simon Oh awesome! Also I did t realize this was your bot. Thanks for the info!
(DIR) Post #ASM5KSiwsQ5Oirhfcm by kweerious@hachyderm.io
2023-02-05T02:22:42Z
0 likes, 0 repeats
@simon maybe consider tagging with the #sfba hashtag for visibility?