Recent techbro adventures
Most of my creative hobby time is being spent on coding at the moment, although this doesn’t seem to mean I’ve been doing huge amounts of it. Nonetheless I feel like I have most of what I need on this domain now. I was looking at the omg.lol suite out of interest the other day and realised I offer basically all those services to myself …. Nice.
1. Opengist
I now have a wee subdomain for hosting code snippets that I don’t want to manhandle into full git repositories. This was quite fun to set up because there was something in the documentation relating to either the systemd service file or the nginx config or both that wasn’t right, but I was able to work out what that was and fix it successfully, which made me feel accomplished. Naturally two of the snippets I’ve since added are sample configs for systemd services and nginx to make that process even smoother and more comprehensible in the future. The more I learn about nginx, the more incredibly leet I feel (on which more later).
2. FastAPI
Why did I ever make accounts on websites when I can just do something involving Python, HTTP requests, a sqlite file and RSS feeds. There’s no question mark at the end of that question because it has no answer. I’ve replaced last.fm with a very simple API endpoint that accepts my music scrobbles and stores them in a sqlite database, then returns the latest thousand of them in an RSS feed and the latest one in a JSON response that I can easily parse using JS and display on the homepage. After I got this working I deleted my last.fm account, then reinstated it a week later because I realised it was the only place I’d been tracking gig attendance lmao, but afterwards I moved the gigs into my standard journal files, so those no longer rely on having an account on someone else’s website either. Clearly this method doesn’t natively offer all the statistics stuff that last.fm provides, but look, I have the data and I could, if I so desired, write yet more Python scripts to analyse it.
This has given me a tiny bit of experience with SQL and manipulating it using Python scripts, as well as using Python as an actual web app backend. I’m so pleased about being able to take some input and, like, do things with it using the various Python functions I’ve been increasingly familiar with since 2017, and output something that has some value or significance … I really feel like I’m at a point where I can do whatever I want with Python. This is definitely not true and I’m sure that even many of the things I can do aren’t being done in anything like the most optimised way. But, as established, I love not having accounts on other people’s websites.
The API also receives webmentions, so I no longer have to ask webmention.io to gather these on my behalf. That is, I think the API receives them but I think I’ve only had one in the last four years, so maybe this will get genuine use about once before the end of the decade, ha. But with this and scrobbles covered, I’ve been able to reduce my list of third-party services I use for things relating to tre.praze.net to one, which is my increasingly problematic reliance on LiveJournal as an OpenID provider. This is possibly something I can integrate into the API as well, if I can bring myself to learn anything about how OpenID works. Or I could stop using OpenID on Dreamwidth, which is the only place I use it, given that I do actually have a normal Dreamwidth account and haven’t used the OpenID one for some time. But if I ever want to comment on anything that a. doesn’t allow anons and b. isn’t TCG-related, I do want to be able to do it from the tre.praze.net identity … well, it’s on the to do list anyway. I actually tried installing what was billed as a simple PHP-based OpenID provider on the server a while ago, but I couldn’t get it working.
3. Server-side includes (aka, turns out nginx itself is the static site generator)
This was this morning’s activity. I finally came to the realisation this week that instead of updating the <nav> element on every individual page of the site plus the various generation scripts for the parts of the site built by my (mumbles) three or four static site generators, I could shove a server-side include into all the pages and get my beloved nginx to provide the HTML from a single file that I can then keep updated as I please. For various reasons this also led to having to replace the client-side XML → HTML conversion I had for the changelog to a server-side script that I’ve put on the crontab, but I guess this is futureproofing the site for the threatened death of client-side XSLT, ho ho.
4. Moving towards … something
I saw a post on someone else’s blog called “my ideal tech stack” and for a hot minute it made me think I could write something with the same title here, before I remembered I am not yet capable of using the phrase “tech stack” unironically. Nonetheless, I feel like I’m moving much closer to what I want from praze.net, which I suppose is self-sufficiency (er, apart from the “renting a VPS” aspect). There’s more I want to do on the static site generator side, specifically relating to parsing my journal files and presenting the data in different ways … I’m toying with the idea of some kind of Listography clone, which has led me into the horrifying world of Listography’s HTML/CSS setup (it’s tables. Inside tables. The same as it’s been since 2006), and I also went to a really nice stationery shop today and saw loads of ultra-aesthetic Japanese notebooks, so I’m thinking once again about what else I can do to harness the bujo/scrapbook/planner style in the virtual space. Now that I’m a sqlite chad (I exaggerate hugely) there’s an argument for moving away from the static site realm and not relying on a big fat build script every time I log a single page I’ve read in a book, but the “keeping everything in little text files” approach seems to be the best placed for longevity/compatibility purposes. I take comfort in knowing my text editor is something like twenty years older than I am.

Comments
You can comment on this post if you like. Comments will be posted below after moderation. All comments are anonymous and email addresses, if provided, will not be published.