So I did the stonkcritter entry last time, but it was kind of vapourware since I couldn’t keep it going due to some random bug I couldn’t find where it would randomly stop updating the file. Feel pretty stink about that especially after the guys were nice enough to post a motherboard to the bottom of the planet as prize.
I really liked the subscription feature though and I put a lot of work into that, which has helped me a lot with other Telegram bots. I also experimented with recreating the entire thing in NodeRed which was kind of OK - great platform, pain to productionize.
However, what about making the politicians stock trades more accessible, so you don’t need a Telegram account to access them? Especially if it could be ActivityPub’d across the internet
In the middle of the year I added a renderer to stonkcritter that would take the stock trades JSON file and dump out ruby code that could be loaded into a mastodon instance via the rails console. I even got this running locally in a mastodon instance and it was pretty cool, so I’ve already proven the concept. I actually thought I lost this code but was able to restore it from an NVME that I thought had died.
With the renewed interest in mastodon this should be useful to some people who would like to pull such info into their own instances. I also have some as yet untested avatar generators too thanks to the congress website.
So this project will be about getting the Mastodon instance and productionizing that updating process, as I was able to get the whole dump in, but how about updating the database daily?
Perhaps a side effect of this would allow me to use the same update method to feed into stonkcritter to get it working for more than a few days too.
As a stretch goal I’m also interested in generating different kinds of reports, like which critters report the fastest, and which the slowest etc. This could be added to a post as well, but as an image. Suggestions here would be welcomed.
Not sure how far I will get because I have a lot on this month.
Repo will be here: GitHub - penguinpowernz/mastocritters: Track US politician stock trades in Mastodon
Last years project: [Devember 2021] [COMPLETE] A telegram bot that notifies you of congress critter stock trades - #33 by penguinpowernz
HACKATHON OVER
It is mostly complete at this URL: https://indoors.trade
- critters directory: Explore indoors.trade - indoors.trade
- all posts: See what's happening - indoors.trade
Things I did not finish, which were important goals (making this project a failure):
- updating is fragile and not idempotent
- I didn’t test the federability of the accounts