Today observes the International Day of Charity, trying to highlight platforms for charity, philanthropy, and volunteering. Charity never works as a viable replacement for government services, as we see time and again. But still, it does do some necessary good, in an economy where those in power frown on public services.

Really, though, tax wealthy people, and stop giving them ways to dodge taxes. Use that money to help everyone in the community. It would look almost exactly like charity, except without the unaccountable billionaires deciding who deserves to live and die, you know.

Sandstone vestige of a Jewish gravestone depicting a Tzedakah box

Does working on Free Software sometimes feel like the same problem? Absolutely. And yet, I enjoy the tinkering, so…

G.L.O.B.E. Archive

GitHub - jcolag/g-l-o-b-e-archiveArchive of old G.L.O.B.E. games. Contribute to jcolag/g-l-o-b-e-archive development by creating an account on GitHub.

After creating the repository last week, I moved my archives into it, and somehow thought that would take care of what I needed.

However, I outsmarted myself.

When I generated the daily files, I somehow imagined that they would always sit on my server with the same structure, and so the CSS and JavaScript references all had absolute paths, so I needed to update those. In case anybody needs to do something like this in the future, one straightforward approach involves the sed (“stream editor”) utility.

sed --in-place=.bak 's/\/globe\//..\//g' */index.html

While ugly, this takes the index.html file in each sub-folder, then replaces every time it sees the old absolute path /globe/ with a new relative path that references the parent ../. The --in-place parameter says to modify the target files, instead of reporting the results. By giving the parameter an argument (.bak), it saves the original file, just in case I fouled something up; once I confirmed that I did my work correctly, I delete the originals.

Finally, I added the background texture that I use for a lot of my personal work.

After changing the repository’s configuration, you can now browse and play the archived games.

Iungimoji Archive

GitHub - jcolag/iungimoji-archiveArchive of old Iungimoji games. Contribute to jcolag/iungimoji-archive development by creating an account on GitHub.

For this new repository, I followed the same process here as I did for the G.L.O.B.E. Archive, above, since the concepts overlap significantly. However, I also streamlined the process slightly.

Mostly for accountability, I still separated the big steps of uploading the archived games and changing the URLs from absolute paths to relative paths. After all, if something went wrong in that latter step, I wanted to have the ability to back out the change and try again. Without separating them, I’d need to undo the change—introducing the risk of incorrectly undoing it—and then work from that unstable point.

However, while I updated URLs, I also slipped in the background texture, since that didn’t seem to carry much risk.

And again, after changing the repository’s configuration, you can now browse and play the archived games.

What about Nonograms?

Oh, I feel like I should mention that, while I seriously considered doing so, I will not replicate the same process here for the Daily Nonogram archives. Even though they take up an order of magnitude or two more space than archives for the other two games use, I still need to generate the files on the server.

Well, yes, I could use fetch() to call up the “Random” page Wikimedia Commons, parse it as I currently do on generation, then request the linked URL, in theory. But doing that (a) makes the player wait for the game on every run, and (b) increases the game’s load on the Wikimedia Foundation servers from only me overnight, to every time a player visits the game. In other words, no, I won’t do that.

And because I won’t do that, I would need to update the archive repository every night with a script. And while that doesn’t sound so bad, it means that I would need to have the repository cloned on my server, which doesn’t actually keep the storage off the server at all, defeating the primary purpose of the exercise.

I may try to work out a compromise, at some point, such as updating the (as-yet hypothetical) repository on a monthly basis, or something similar.

G.L.O.B.E.

GitHub - jcolag/g-l-o-b-eA generator for daily scavenger hunt puzzles at. Contribute to jcolag/g-l-o-b-e development by creating an account on GitHub.

Now that I had the archived G.L.O.B.E. games off my server, it seemed natural to update the main game’s page to point to the archive.

Here, I stuffed a straightforward message into an HTML footer element. And while it seems entirely reasonable to expect footer elements to act like a page footers, they do not. Therefore, they require some quick CSS.

footer {
  bottom: 0;
  position: absolute;
  width: 99%;
}

For some reason, setting the width to 100% overflowed the window, so I backed down the number. I suppose that I probably should have used a vw measurement, though, regardless. Maybe I’ll experiment and update it, someday.

Incidentally, this reveals a mildly off-putting issue with treating these games as HTML and JavaScript applications, rather than generated pages: The browser only allows the fetch() method—that the games use to load initial data only—to work when it loads the page from a server. When running locally, it (probably rightly) declares the method a security risk and shuts it down. That makes it incrementally more irritating to test changes.

Library Updates

Rather than add a footer link to the Iungimoji archive, I needed to bump the version of a library for Dash.

Next

Most likely, the early week may go to (finally) adding configuration panels to G.L.O.B.E. and Iungimoji. I suspect that players might appreciate the possibility of playing more than once per day, updating the seed.

I may instead spend this week creating issues on repositories, again, to make sure that I don’t forget about something that I want to get done.

It also wouldn’t surprise me to discover that I have some changes that I forgot to commit.


Credits: The header image is Jewish cemetery in Otwock (Karczew-Anielin) by Nikodem Nijaki, made available under the terms of the Creative Commons Attribution Share-Alike 3.0 Unported license.