Automated updates: 2023-05-01

This commit is contained in:
John Colagioia 2023-05-01 07:05:10 -04:00
parent aa67ea5f6f
commit e4dac0622d
1 changed files with 72 additions and 0 deletions

72
2023-05-01-workers.md Normal file
View File

@ -0,0 +1,72 @@
---
layout: post
title: Developer Diary, International Workers' Day
date: 2023-05-01 07:04:05-0400
categories:
tags: [programming, project, devjournal]
summary: Progress on assorted projects
thumbnail: /blog/assets/Socialists-in-Union-Square-NYC.png
teaser: This week's projects include my Mastodon Trunk Rummager, my Morning Dashboard, and the blog code itself.
proofed: true
---
Today, but for the infamous American allergy to communism, everybody would celebrate [May Day](https://en.wikipedia.org/wiki/May_Day) as Labor Day. However, because the United States associated the holiday with the Soviet Union we have our own Labor Day in September, and this day became referred to as [International Workers' Day](https://en.wikipedia.org/wiki/International_Workers%27_Day), celebrated pretty much everywhere except the United States.
![A large audience, some members holding signs saying such slogans as "Agitate, Educate, Organize," "One Big Union," "The Workers Fight the Wars While Bosses Reap the Profits," and so forth](/blog/assets/Socialists-in-Union-Square-NYC.png "I appreciate that, in this large crowd, a handful of people spotted the camera and decided to pose...")
I can't exactly unionize against myself for these little projects, so let's move on...
## Mastodon Tool Trunk
{% github jcolag/tool-trunk %}
The *Rummager* now wraps toots with content warnings in an appropriate manner, along the following lines. It probably should have done *something* like this from the beginning, but considering how few users actually bother to use content warnings {% sfx grr... %}, it didn't make too much difference...
```html
<summary>
Content Warning
<details>
Status that came with a warning.
</details>
</summary>
```
This allows Mastodon's content warnings to function as intended.
You should also see some basic improvements to the code itself. It now mostly complies with ESLint's advice. I refactored the timeline-generation code so that it didn't consist of dozens of nearly identical lines. And the CSS makes a bit more sense.
Finally, while I haven't connected the buttons to anything, the toot-footer buttons now display, so that users can *eventually* like, boost, and so forth.
## Morning Dashboard
{% github jcolag/dash %}
After finding a new API to play with via [AirNow](https://www.airnow.gov/), my **Morning Dashboard** now includes air quality information.
As I get used to it, I may change the specific API endpoint that I use, but for now, I get a numerical value (0 -- 500), the descriptor of the air quality value---good, moderate, unhealthy for sensitive groups, unhealthy, very unhealthy, and hazardous---and the variety of pollutant (ozone or particulate matter) likeliest to cause problems.
Personally, I'd prefer an hourly forecast to go with the weather forecast, but I also don't know if that makes any sense.
## Entropy Arbitrage
{% github jcolag/entropy-arbitrage-code %}
This probably requires some back-story, to make sense of a tiny change.
For [Friday's social media roundup]({% post_url 2023-04-28-week %}#802--thu-27-april-2023), I referenced a toot that I made that included a tiny image. In previewing the blog post, I noticed that it stretched the tiny image to an obnoxious degree, because the CSS set `width: 35%` for those off-to-the-side images, a choice that I made forgetting that small images might exist, too.
In this case, I had a straightforward fix, changing that style rule to `max-width: 35%`. Now, a tiny image---such as what appeared in that toot---will show at its actual size, whereas larger images get scaled down to (slightly more than) a third of its container.
And yes, it horrifies me that I needed to write eighty-odd words to help explain why I needed a four-*character* addition to a file.
In addition to that, the configuration file makes a bit more sense; three years into the blog, the boilerplate comments explaining a domain name no longer seem useful.
And pretty much every page on the blog should now (invisibly) reference my Mastodon account, using the [`rel="me"` identity standard](http://microformats.org/wiki/rel-me). I *think* that this will work for tools like [StreetPass](https://streetpass.social/), so such tools should light up, even if someone visits a random page on my blog, instead of my [home page](/).
## Next
I imagine that I'll continue working on the *Rummager*, probably looking mainly into how to represent boosts. Right now, the code ignores them, because they don't include a status, but I do sometimes want to read what the people I follow share from third-parties. And that should probably look like a good time to start adding the assorted filters that I want to put in place, which will itself require uploading data to Pantry.
* * *
**Credits**: The header image is [Socialists in Union Square, N.Y.C.](https://loc.gov/pictures/resource/ggbain.10505/) by the Bain News Service, long in the public domain.