Today, the United Nations observes the World Day to Combat Desertification and Drought, which I assume that you don’t need me to explain to you, given all the plain-language words in the name. Like many United Nations observances, prior years have had themes, ranging from sustainable agriculture to refugees to recovery.

Corn shows the effect of drought in Texas on Aug. 20, 2013

And on we go to the projects.

Notoboto

GitHub - jcolag/NotobotoAnother attempt at a lightweight note-taking application - jcolag/Notoboto

Believe it or not, I needed to add anchors to the pattern that matches URLs, here. You know, the #whatever that you might hang off the end of an address to tell you where on the page you should look? For example, this-page#notoboto should try to move the title above to the top of your browser window.

It bothers me when I see issues like that slip through. Sure, Notoboto only needs to deal with syntax actually used by my notes at any given time, because I sincerely doubt that anybody other than me actually uses the thing. However, if I wrote the regular expression manually, then I shouldn’t have done that, for exactly this reason. And if I grabbed it from somewhere else, then they shouldn’t have provided an incomplete example. Oh, well…

Post.News

GitHub - jcolag/post.newsArchive of John Colagioia's Post.News content. Contribute to jcolag/post.news development by creating an account on GitHub.

I have promised this for the past two weeks, but…

You can now check out the archive of my Post.News content. It contains an index of all posts listed by title if available or first bunch of characters in the message if not. Each post then has a page of its own.

Much like my Pebble archive, the majority of the posts only announce blog posts, but especially early on—January and February 2023—I did run some “original content,” and capped off with a “final” post telling people where they can find me going forward. I do admit to some disappointment at not getting much reaction to my comments on George Santos getting himself elected to Congress, as I look over the brief history…

De-Post

GitHub - jcolag/depostScript to convert a Post.News export into a static website - jcolag/depost

It feels a bit redundant to describe this project, because the new depost.js script created the aforementioned Post.News archive.

I don’t believe that the code does much of interest, except for working around their silly export format. Inexplicably, they provide both an html field (the post as it should render) and a content field, which seems to strip out the HTML tags and some random spaces, but it does not store the post’s title anywhere separately. The URLs, including for embedded images that they supplied in the export, all point to a non-functioning sandbox domain. And as mentioned, it doesn’t always have a title. That has the script doing things like this.

body = body.replace(/<img src="([^"]+)"/g, (match) => {
  const url = match.split('"')[1];
  return '<img src="' + cleanUrl(url, '.png') + '"';
});
const match = body.match(/<h1>(.*?)<\/h1>/);
const title = match ? match[1] : `${p.content.slice(0,50)}...`;

The first replacement redirects images to the exported copies, rather than trusting their CDN to work in perpetuity. We then check to see if the post has a title—only identifiable as a top-level heading—and either extracts it or the first fifty characters of the de-HTML-ed post to name the page for the browser and in the index.

The script also gathers and generates pages for “topics,” which seem like community-assigned or maybe automated hashtags, which works out well enough, considering how thoroughly they broke the actual hashtags. Each topic also has its own page, so at least for later posts—it doesn’t look like topics existed early on—you can see related pages. For example, my announcement of the post on Ensign Ro, which will link you back to this blog—has a broken #StarTrek hashtag, but then has a series of links to topic pages, such as the television topic, allowing readers to see every post tagged with that topic. Alternatively, you can see the pages marked with the rant topic.

Mostly, though, it only wraps the stored HTML with some boilerplate HTML.

Oh, it uses styles from Boring CSS, so that I wouldn’t need to worry about adding CSS classes to the site or fussing around with light- and dark-modes, since I built the CSS specifically to not need to care about such things. And it uses the Nord color palette. I knew that CSS work would pay off eventually…

If you used Post.News and decide to use the script, I would consider it extremely brittle code and watch over its results carefully. I only had my own export to work with, so it only covers cases that I encountered, with no insight as to what else might lurk out there. Feel free to file issues or pull requests, if you spot any improvements to make.

The Light’s Edge

Codeberg — thelightsedgejcolag/thelightsedge The Light's Edge is an ongoing, multimedia space opera story. This repository will contain material needed to generate the main website

Once again, I haven’t pushed the results out, yet, because I haven’t finished the work on my end to make it all valid. However, the project now has the start of a page discussing how to get involved, both throwing me some money to defray costs, contributing art on commission, or diving completely in. I have also started working on the page(s) for (ultimate Earth-bound center of action) the fictional Fort Sheridan.

As a quick aside, if you review the latter additions and the Last Frontier Nitery’s page, then you might notice some “peculiarities” in some contact information. If you’d like the background on that—either for its own sake, or for use in your own projects—I have a somewhat beefy rundown (over a thousand words) detailing how the project plans to minimize the chances of a member of the audience accidentally harassing some unsuspecting person with the misfortune of having similar contact information to somebody or something in the stories. You can find that discussion in the upcoming issue of the Entropy Arbitrage newsletter in something of a behind-the-scenes/preview piece. I may eventually expand it and use it as a blog post, though, since it does have wider applicability than only The Light’s Edge, but it doesn’t seem to really warrant a full post, yet.

Next

I would expect more static site work from me. I want to tweak a few things in my Post.News archive. The De-Post script needs a ton of documentation and maybe a couple of other additions. And…I have a secret project (well, secret for another couple of days, at least) that I suspect will please a lot of the Free Culture people who read here…


Credits: The header image is 20130821-OC-RBN-2764 by Bob Nichols, released into the public domain as a work of the United States Department of Agriculture.