Developer Diary, Aztec New Year (Belated)
Yesterday marked Año Nuevo Mexicano, the Aztec New Year, still celebrated by some Nahua communities. Many apparently dispute the “actual” date equivalent on the Gregorian calendar, but I feel like I probably need to side with the people who have genuinely carried on the tradition.
And I guess that we can try celebrating a new year with some talk about projects.
After someone kindly notified me via Cohost that it obstructed their view of blog posts here, I added a media query to the blog’s CSS. Now, when you look at the page on a smaller screen, it overrides the placement of the “pull-out trays” along the side of the page, moving them to the bottom of the page.
I set the break-point to 800px, if I have that right, slightly wider than the standard 740px width of the main body of posts. It probably never once occurred to me that someone might try to read my blog on a mobile device, so I definitely appreciate that kind of input, especially as I’ve tried to improve image description and link names.
Along the way, I also updated the generator script for social media roundup posts to no longer include hashtags in the “bonus” articles. They would only make sense if I actually posted those articles to social media, so I see no reason to spend time thinking about what I would use to tag them.
Mastodon Tool Trunk
I updated the scheduler script to take care of the majority of warnings that Rubocop provided. I left a few code issues in place, because the amount of work involved in, for example, chopping up the setup for the
OptionParser code seems like it would overwhelm any benefit gained by doing so. While dealing with Rubocop, I also updated the Rubocop configuration to check all “new cops.”
The scheduler will also now exit with an error (
exit!, in Ruby), when it can’t download the specified header image. By doing that, the parser will have the ability to download the image through a different route and try again, though better ways of doing that probably exist.
And it took a few tries, but the parser also works, too…well, mostly. As discussed previously, the actual parser didn’t take much effort, since the nine kinds of lines either have straightforward ways to identify or don’t become part of the post, so I could get by with a series of
.start_with? conditions in a long conditional.
However, because you can’t always directly download an image file, the parser could only schedule seven out of ten of the week’s toots. In the remaining cases, I needed to download the images manually and try again.
This week, I’d like to figure out how best to improve the odds on scheduling a toot with an image, though I don’t know if I can handle every case.
People also have unofficial libraries to post to Cohost, and I’d like to have one less site to manually post blog announcements on. On the other hand, Cohost probably has the friendliest interface and the highest signal-to-noise ratio, so I also have the least problem making a quick stop there when a new post goes out. We’ll see.
I have some possible ideas for the blog, too, though I’d rather not announce anything before I know that I can make it work without it turning into a months-long project that needs to happen in secret because half-finished blog functionality does more harm than good.
Credits: The header image is Huitzilopochtli, the Principal Aztec God by (presumably) Juan de Tovar, long in the public domain.
By commenting, you agree to follow the blog's Code of Conduct and that your comment is released under the same license as the rest of the blog.Tags: programming project devjournal