11ty and podcasting

11ty is a static site generator. At the top of this list, they include “eleventy-base-blog”, a template that you can fork to start a… basic blog.

It didn’t take a huge amount of work to add a podcast template to that base. The result is my extremely-just-a-hobbyist, simple take on a podcast platform — hc-podcast.

The ‘base-blog’ has an RSS helper already installed, so most of the work of adding a podcast feed to it comes from this pod.njk template, and data from two sources:

  1. A bunch of one-time data at the top of the feed that comes from _data/metadata.json. Like the RSS helper code, that JSON file was already in the starter; I just added a bunch of podcast-specific key-value pairs. You’d obviously customize these for your own podcast.
  2. Per-episode data from markdown files. I’ve cleverly saved them in a subfolder called episodes. At the bottom of pod.njk, there’s a loop that goes through collections.podcasts. In practice what this means is that 11ty will look for markdown files with a podcasts tag, and create an XML entry for each.

Random notes:

  • I have no idea what industry-standards exist around podcast XML files. Googling the subject results in a cesspool of spam. I created my template after skimming a couple of feeds from well-known podcast studios.
  • My image(s) and audio files are hosted on a $5/mo Linode server (that also does a bunch of other dumb things) and would not likely stand up to high traffic. I’m sure there are a thousand solutions out there, for this issue, but I’m just building a goof for myself with free or nearly-so tools. (If you do a global repo search for porknachos.com, you’ll see the files I’m hosting externally. As of this writing, it’s just a 1600px square image for the overall feed and an audio file for each markdown episode.)
  • Because I’m not actually a podcaster, I needed some sample audio. I wanted something that I could generate routinely, so I dipped into an older goofy project and found a way to make it even weirder, thanks mostly to ffmpeg and Mac OS’s say command. The way I’m creating the episodes might be the subject of a different post; in any event, anyone giving this repo a try would clearly come to it with their own audio files.
  • Which reminds me that the biggest headache here is that you have to create the markdown files more-or-less by hand. Type in all the frontmatter (title, keywords, etc), and get the audio’s byte-length and duration from the Finder (or whatever). I’ve automated this for myself, in connection with the autogenerated content, but I haven’t incorporated a more-generic form into this repo, for auto-generating the markdown files and their frontmatter.
  • And which reminds me, if you delete all my markdown files and restart before you add any of your own, 11ty will crash because collections.podcasts is empty. I stubbed my own toe on that, once or twice.

What I read in January 📚

  • Agency, William Gibson. Wm.G. doesn’t write vital books anymore, he writes William Gibson books. Like U2 doesn’t release vital records, now. They just got really good at making U2 records. Maybe you like ’em, maybe not. Maybe it’s… (hate to say)… tedious.
  • The Quantum Thief, Hannu Rajaniemi. H.R,. on the other hand, is writing b a n a n a s fiction. I almost gave up on this as too wacky. I wish I were 15 again and there was no internet and not enough books so you just read the ones you had, over and over. This needs to be read over and over.
  • The Forever War, Joe Haldeman. A supposed “classic” from the Vietnam era. I knew I wouldn’t like it; I roll my eyes at pretty much all fawning-over-the-military sci-fi. I was right. I’m stunned that Scalzi wrote a worshipful intro for a recent reprint. “The UN forced the planet’s men to live `homolife`!” Okay, sure. That’s how it works. Yep. (If you read it as a right-wing “this is what will happen if you don’t vote for Goldwater!”, it’s still f-ing stupid.)
  • Full Throttle, Joe Hill. Stephen King’s son writes modern-era Stephen King stories. I stopped halfway through.

Somehow that’s all I read but I feel like I’ve been going non-stop all month. I’m 33% into another A. Reynolds monster (the sequel to Blue Remembered Earth) it’s good but a bit of a slog. Maybe that’s it.

A brief NPM uninstall headache

It started with create-react-app telling me A template was not provided. This is likely because you're using an outdated version... Quick search and I learned that locally-installed CRA is now a bad idea; suggestion was to uninstall and, in lieu of upgrading, always rely on the npx create-react-app my-app command.

Okay but I tried a simple npm uninstall -g create-react-app and CRA was still local, somehow.

More searching… oho, it was a question of which create-react-app. Mine was in /usr/local/bin, not an npm folder somewhere. This comment got me to realize that I had a bunch of globally-installed packages under the “system” version of Node, back before I installed NVM and started relying on it.

So, nvm use system && npm ls -g --depth=0 told me what those packages were. Now that I was nvm useing the system version of Node instead of the latest, I could do a global uninstall of CRA and it actually disappeared from usr/local/bin.

For good measure, I deleted all the NPM stuff there; it was all years out of date anyway. A different SO answer gave me an awk command to tack on to the prior list command and delete everything at once: npm ls -gp --depth=0 | awk -F/ '/node_modules/ && !/\/npm$/ {print $NF}' | xargs npm -g rm

Fun.

What I read in December 📚

Fiction

  • The Cruel Stars: A Novel, John Birmingham. I want to say I liked it, but its been 3 weeks and I have no memory of reading it. (reads blurb) Oh yeah! It’s okay enough to check out the sequel, at least.
  • Waiting for Tom Hanks, Kerry Winfrey. It was the middle of the night and I couldn’t sleep and there was nothing on my kindle phone app so I went to Libby and there was nothing good available through the local library (at least nothing that I could quickly find), so I downloaded this and read 40 percent of it and I am 40 percent stupider now. I should’ve stared at the ceiling all night, instead. “A novel can’t just be a list of things you like,” is a thing I read somewhere, once. Deeply, gravely, sub-Hallmark Channel-ly dumb.
  • Bellwether, Connie Willis. This is the first CW book I haven’t enjoyed. Too much gimmick, not enough plot. Early in her career, but after some big success. That surprised me. (You can tell, once again, how she’s the master of research… but she made that part of the plot, instead of part of her behind-the-scenes job as author, which didn’t serve it well.)
  • Machines Like Me, Ian McEwan. I knew this author by reputation but had never read anything by him. It’s “Literature.” I read a while back that he sneered at “genre” fiction, which makes him an asshole (see this, and the zinger from Ken MacLeod immediately under it). It’s alternate-present because computers came along sooner because Turing lived, and now there’s a sentient robot in the main character’s kitchen. If that’s not sci-fi I dunno what is. The plot was supposed to be dramatic but it just felt like a series of deuses exing the machina. Meh.
  • “2 B R 0 2 B”, Kurt Vonnegut. A short snark about population control. Not nearly as striking as “Harrison Bergeron,” his best (AFAIK) story in this vein. (That’s supposed to be a “naught” in the middle, there. To Be R Naught To Be, get it. I’d rather read “Too Bro To Be,” honestly. “The guy who could not even.”)

Non-fiction

  • You Might Remember Me: The Life and Times of Phil Hartman, Mike Thomas. A well-done downer.
  • Hello. This bullet-point is here because the markdown plugin I’m using appears to only wrap bulleted paragraphs in p tags if there are 2 or more bullet points, but not a standalone bullet. Not sure that’s a “bug,” particularly if the idea is somehow rooted in the world of outlining, where you shouldn’t create a new indented subsection (or whatever) if you only have one item for that subsection (or whatever). But here’s the thing: I only read one non-fiction thing so there’s only the one bullet point and I need it wrapped in a p tag or the max-width and slightly-lighter color CSS attributes don’t get applied. See?

Ye Olden Tymes Fiction

  • “The Kit Bag”, Algernon Blackwood. Somewhere, probably on Metafilter, someone said “Give me some old-time short story scares!” Not my usual thing but I followed a few links and found two stories easily downloadable so I figured I’d give them a shot. This one was fun; I could see a young Stephen King being inspired by this and working up his own modernized version.
  • “Between the Lights”, E.F. Benson. …whereas this one was completely terrible. Not in a “old timey writing is dumb!” way, but in a “the day this was released this person should’ve been roundly criticized for writing a non-story story” way

Things I read in November 📚

Medallion Status, John Hodgman. I’m going to automatically 4- or 5-star anything from the Judge on principal. I think I might’ve liked Vacationland, his last, a little more than this one, but then we saw him perform “Vacationland” as a live performance, so maybe that’s tilting the scales a little.

Also: the hook that organizes this book is airplane travel, and I intentionally held off reading until I was on a plane. Length of book and flight matched almost perfectly. I was 5 pages from the Acknowledgements when the row in front of me started de-planing. If I hadn’t been pinning my stepson into the window seat, I’d have let the remaining passengers skip me, sitting there for another 3 or 4 minutes, to finish it up, just because.

Also also:

Midnight Riot, Peter Grant. Last month, I said of The Municipalists, “Loved the premise (sort-of Laundry Files humor-tech but focused on civil infrastructure instead of Cthulhu.)” This is even more like the Laundry Files, supernatural-wise… but without the tech. Or the humor, really. Saw this recommended by a Londoner and with the very detailed descriptions of London neighborhoods and transport, maybe being a Brit is required context. DNF but strangely, would recommend.

In Xanadu, Lavie Tidhar. A short story that is hopefully a prologue for something bigger. AIs and interplanetary computer hidey-holes. Fun. (read free @ Tor)

Things I read in October 📚

Non-fiction:

  • Play Anything, Ian Bogost. I like his shtick on twitter, @ibogost. (I skimmed the heavier philosophical bits.)
  • Lingo: Around Europe in Sixty Languages, Gaston Dorren. One of those fun books that comes around every now and then, full of language factoids. (It was near the Bogost book; I have a habit of grabbing one random-nearby-book for every book I intentionally seek out.) I just noticed while grabbing a URL for this entry, that other versions have different subtitles. Weird.

Fiction:

  • The Municipalists, Seth Fried. Loved the premise (sort-of Laundry Files humor-tech but focused on civil infrastructure instead of Cthulhu) but it dragged a bit; felt like a clever idea for a short story, stretched into a full-length novel.

Gatsby & images in RSS

Gatsby uses plugins to transform markdown and images into HTML. (I think they have parents or cousins that work more broadly, but I’m familiar with them inside a Gatsby context.) One of them, gatsby-remark-images, does a lot to improve performance (transforming images into different sizes, handling placeholders and using ”blur-up” tricks, etc).

This is great for a blog with images. BUT… when all of the HTML that wraps those images gets stuffed into an RSS feed, the result doesn’t always look great. In particular, when my feed is displayed on micro.blog, my images’ aspect-ratios are distorted based on the app’s window width.

The hacky solution I came up with was to do a string-replacement inside the RSS query. All the HTML in that function gets run through

html: html.replace('width: 100%; height: 100%; ', '')

and my images become fixed in size. Fixed!

(But wait … now I’m looking at the same image in my regular web-based feed reader, and the aspect ratio is fine, it’s just that the image remains 700px wide at all times regardless of window width. I wonder if setting CSS width and height to auto instead of just wiping them clean, would work?)

Next day, even more update: In Inoreader, on the web, the image is always, always fixed-width. In micro.blog, it scales correctly. In the new NetNewsWire it also scales correctly. So there’s something about the app-ness (as compared to web-ness) that makes it work.

It’s okay, it’s just not perfect.

Python & mac OS

I’ve touched Python in extremely limited ways, over the last couple of years, and always been frustrated at the version-weirdness and my lack of understanding (”I have 2 and 3 on my machine already? Should I change from one to the other? Is this gonna get into bash shell stuff I’ve never really grokked?”)

Anyway this article, The right and wrong way to set Python 3 as default on a Mac, looked authoritative so I followed it, installed pyenv (equivalent to nvm in node-world, I gather), and got it working. Shout out to commenter Arturo Mascarinas for noting the extra space in the final command, which was indeed stopping me from crossing the finish line.

on Micro.blog & Tumblr

Manton said, “…the more I’ve used Tumblr in the last couple of weeks, the more I think about Tumblr as a community first and a blog host second.”

(a) I had a very-lightly-used Tumblr blog for about a year before I realized that the fun part was the dashboard, not your own blog. Once I figured that out and started making Tumblr pals, I forgot about the actual _blog_ entirely. I haven’t looked at or linked to it in years, though my Tumblr _dash_ is my #1 social media “place,” ranking well ahead of Twitter or Instagram. (I think my wife skims it sometimes; I’m not sure how much context is lost when my posts appear alone, without the rest of my dash above-and-below those posts.)

(ß) Thinking about (1) and micro.blog together, I’ve been pondering a post explaining micro.blog to my Tumblr pals. “It’s two things in one, just like Our Tumblr is; there’s the part where you have a blog, except none of us are really using that part, and there’s the part where your stuff shows up in a feed alongside the stuff from your ‘followings’. And also it’s $5/mo.”

(ç) Actually, (ß) might be that post. Boom, done.

(4) Marginally related: when I was first futzing around with micro.blog, I tried sending my Tumblr RSS feed into it, and the result was mostly a mess. m.b’s (understandably(!) narrow) focus on text and images meant that other kinds of content were getting lost in the XML… particularly audio and YT stuff, which makes up a fair amount of my Tumblring. To re-visit, maybe…

Plex on Pop_OS with external USB files

It’s about file permissions, yeah, but the thing that eluded me for a few hours until I hit on this post, was that it’s also about mount points and security rules.

You gotta get the UUID of your ”plex files” partition(s) and edit /etc/fstab to have your system mount it/them somewhere other than the default.

I think the example the Plex employee uses in his walkthrough is unfortunate because on my Pop_OS drive /media is already used by the system. I created a new folder at the root level called /plexmedia, chmodded it to 755, and listed it as the mount point for a partition on my external USB drive. When the system rebooted, suddenly the Plex server could see all my subfolders. Hooray.

NOTE: Before figuring this out, I had already tried the following; now I don’t know if they were unnecessary fiddling or if they were also a needed part of the solution:

(1) The drive and media files were originally part of a Mac setup. The drive was formatted HFS+, journalled. I took the drive back to a Mac and turned off journalling using diskutil.

(2) Once I’d done (1) I could mount the drive in Linux in a write-able fashion and chowned the entire thing to user plex and group root. (As a read-only volume they had been showing up as ”503: root” where 503 is the ID of my everyday Mac user. I read some tricky posts about creating a Linux user with a matching ID and ”stealing” those ”orphan” files, but I’m glad I didn’t go down that route because the security/default-mount thing would still have been in the way… [I do think this mattered because once I discovered the Plex post linked above, I didn’t need to do the 755/644 stuff; it just worked.]