CBDQ update : videos, every two hours

This is a crosspost from my Patreon page, but with the bits thanking people for their support removed. However, if you do support me there: thank you. And if you don’t and use Cheap Bots, Done Quick!, please consider doing so. It keeps the servers humming & pays for my time doing this kind of tweaking and fixing.

So, after leaving Niantic, I put a bit of time into rejuvenating and restoring CBDQ. I had neglected it a bit, what with having a full time job and falling mysteriously ill. It was running fine, but the thing about maintenance is that you can keep putting it off and it’ll be fine until one day it’ll just fall over. So it was a good time to go in and update and upgrade things, sand off the barnacles and apply some fresh paint.

So, to switch out of marine analogies, I migrated CBDQ from running on my server that I’ve had for about a decade now, and onto a fresh shiny one where everything is up to date and there are fewer weird configuration bits hanging around from this project or that. I replaced the old SVG rendering solution, as the old one was very much deprecated and was in danger of stopping working - this was kind of frustrating, as there was nothing that was a good drop in replacement. So I ended up putting together a package myself, which wraps “puppeteer”.

(sidenote: SVG is a language for describing vector images. So far, so straightforward. However, SVG can also contain arbitrary bits of HTML… and in fact, if you want to do stuff like “render text, in a font, with linebreaks”, you pretty soon start to make use of this functionality. So, rendering it is complicated! And in fact, the server actually does this by spinning up a little instance of Chrome for every SVG it’s trying to render, loading the SVG in as a webpage, loading any images or custom fonts or whatever it might contain, taking a screenshot, and then closing again. Whew! This also means the new SVG rendering might change the output of SVGs a little - sorry if this broke your bot!)

What else? A lot of work trying to trace down an annoying bug where sometimes CBDQ’s processes would get stuck, not doing all the tweets they were supposed to and also taking up system resources. But also not emitting any errors or giving any indication of what was wrong. I am still not fully convinced I’ve ironed it out, but I have at the least made it happen less often. And not need me to come in every so often and turn it off and on again to fix it. And as part of that I did a lot of work to make the internal error logging cleaner and more sensible. Boring work, I know, but it’s this kind of thing that keeps an exciting service running. Sometimes I think making tools is like 5% exciting shiny things, and it’s like 95% doing a load of boring stuff so that people who use them don’t have to think about it themselves. I also went through and upgraded all the node dependencies. Fixed up the admin panel that I use to block spammers.

Here’s where I talk about new features

You1 asked, I listened! You can now set your bots to tweet every 2 hours. For when every 1 hour is too frequent, and every 3 hours too infrequent.

And this is an exciting feature that almost snuck in for free - you can now use CBDQ to post videos! Just use the vid tag to link to a video (in a format that Twitter supports), in the same way that you’d link to an image. Here’s an example: {vid https://cheapbotsdonequick.com/example.mp4}.

And also I made a bot, inspired by my love of the band Dry Cleaning. I mainly mention this here because the source might be a helpful reference if you’re trying to make a lyricsbot.

Long live the bots!

-v

  1. Okay, two people asked. 


23 March 2022