The summer tires on my Kia Soul EV have whatever gizmos inside them needed to allow the car to read the tire pressure. The winter tires do not.

When I switch from winter tires to summer tires, it takes the car a few kilometres to realize this, resulting in a yearly, fleeting, “oh no, something’s broken” feeling in the car.

Documenting this here to remind myself of this in spring 2022. And to record May 10 as my winter to summer tire switchover date.

OPML is much in the air these days: Ton is experimenting with federated bookshelves, and Paul is using OPML of yesteryear to explore his feed-reading past.

Which got me thinking about blog post archaeology, and using the blogs that I read every day as a corpus to explore in different ways.

My first thought was: export my list of feeds as OPML, then write code to parse the OPML to get the RSS feed for each blog, then write more code to retrieve the archive of each blog, and then write more code to parse the body of each post. In theory that would all be possible, as many languages have plug-and-play libraries to make parsing OPML and RSS relatively easy.

But then I realized that my RSS reader, FreshRSS, maintains a long archive of blog posts in its local database. And I thought, as a first experiment, it might be interesting to extract all the quotes from that archive–anything wrapped in “blockquote” in the body of the post–by way of providing an alternate interface for experiencing the posts all over again.

Here’s what I did to make this happen:

I used the command line interface for FreshRSS to export a JSON representation of the archive, one file per blog:

cd freshness
./export-zip-for-user.php --user peter > peter.zip

I copied the resulting peter.zip file to my local machine, unzipped it into a folder called peter, and then used the following PHP, which depends on PHP Simple HTML DOM Parser, to generate an HTML file of the quotes:

<?php

require_once("simplehtmldom/simple_html_dom.php");

$path = "./peter";

if ($handle = opendir($path)) {
    while (false !== ($file = readdir($handle))) {
        if ('.' === $file) continue;
        if ('..' === $file) continue;
        parseJSON($path . '/' .  $file);
    }
    closedir($handle);
}

function parseJSON($file) {
	$json = file_get_contents($file);
	$feed = json_decode($json);
	if ($feed) {
		print "<h1>" . str_replace(' articles', '', str_replace('List of ', '', $feed->title)) . "</h1>\n";
		foreach ($feed->items as $item) {
			$html = str_get_html($item->content->content);
			if ($html) {
				if ($html->find('blockquote')) {
					echo "<h2><a href=\"" . $item->id . "\">" . $item->title . "</a></h2>\n";
					foreach($html->find('blockquote') as $element) {
						echo "<blockquote style='border: 1px solid grey; padding: 20px'>" . $element->innertext . "</blockquote>\n";
					}
				}
			}
		}
	}
}

I ran the script, dumping the result into an HTML file:

php parse.php > quotes.html

It turns out that the blogs I follow include a lot of quotes, and the file is–quotes.html–is, to some degree, impenetrably useless.

Which got me thinking: what if I rejigged this output as an OPML file, which, among other things, I could load into OmniOutliner to browse.

So, I rejigged the code:

<?php

require_once("simplehtmldom/simple_html_dom.php");

$path = "./peter";

print '<?xml version="1.0" encoding="UTF-8"?>' . "\n";
print '<opml version="2.0"><head><title>Quotes in Posts</title></head>';
print '<body>' . "\n";

if ($handle = opendir($path)) {
    while (false !== ($file = readdir($handle))) {
        if ('.' === $file) continue;
        if ('..' === $file) continue;
        parseJSON($path . '/' .  $file);
    }
    closedir($handle);
}

print '</body>';
print '</opml>';

function parseJSON($file) {
	$json = file_get_contents($file);
	$feed = json_decode($json);
	if ($feed) {
		print "<outline text=\"" . str_replace(' articles', '', str_replace('List of ', '', htmlspecialchars($feed->title))) . "\">\n";
		foreach ($feed->items as $item) {
			$html = str_get_html($item->content->content);
			if ($html) {
				if ($html->find('blockquote')) {
					echo "<outline text=\"" .  htmlspecialchars($item->title) . "\">\n";
					foreach($html->find('blockquote') as $element) {
						echo "<outline text=\"" . htmlspecialchars(strip_tags($element->innertext)) . "\"></outline>\n";
					}
					print "</outline>\n";
				}
			}
		}
		print "</outline>\n";
	}
}

And, sure enough, the result is somewhat less impenetrable. And kind of cool:

Visualizing block quotes in OPML in OmniOutliner.

The result also shows one of the limitations of HTML as currently practiced, which generally leaves quotes without machine-readable attribution, something that using more semantic HTML, as illustrated here, would help alleviate:

<figure>
    <blockquote cite="https://www.huxley.net/bnw/four.html">
        <p>Words can be like X-rays, if you use them properly—they’ll go through anything. You read and you’re pierced.</p>
    </blockquote>
    <figcaption>—Aldous Huxley, <cite>Brave New World</cite></figcaption>
</figure>

I’ll try to start doing that with my own quotes.

From this New Yorker article about the Penobscot language:

Francis, who is in his early fifties, grew up on Indian Island in an era of burgeoning indigenous activism. He feels that the key to saving Penobscot culture is not just studying the language but using it. “Take the strawberry preserves off the shelf and spread it on a piece of toast” is how he put it to me.

That’s a powerful metaphor for life in general.

News about birch plywood from the DNA Lounge:

Birch is normally one of the more expensive woods, but as it turns out there’s some kind of supply-chain fuckery going on affecting most of the softer woods, so this is currently the least expensive plywood available, because the price of the lower quality stuff has gone through the ceiling!

Saturday and Sunday nights have always been my favourite ones to do the grocery shopping: whatever you give up in selection, you gain in store-emptiness and calm.

‘Twas not meant to be this week, however: at some point the grocery barons conspired, without telling me, to close at 8:00 p.m. on Sundays (where they once closed at 10:00 p.m.). I presume this started some time ago under the COVID-19 “we need time to do the extreme deep cleaning” and has remained, vestigially, even now that aerosols have won out over surfaces as The Vector.

“No matter,” I thought, “I’ll just go to Brighton Clover Farm.”

Nope. Also closed.

I can’t help but think this is karmic payback for my longtime anti-Sunday-shopping stance.

One of the things I’ve learned from my trans friends is that we who aren’t trans place an inordinate amount of effort on trying to anchor things to the past rather than the present—“Erica, who used to be called Eric, until…” and so on. We can tie ourselves up in knots.

So, to avoid that, I will simply introduce Olivia, who identifies as female, and uses she/her pronouns. And is my daughter. Who I love.

The process of becoming our true selves is something we all struggle with; there are a lot of feelings bundled up inside me that surface as a result of Olivia’s transition, many of them uncomfortable, and things I must reckon with. But overlaid is a tremendous sense of pride that she has found her way to this, and, in so doing, is a model for me as I struggle to find my own ways forward.

 Beau Miles in The Backyard Adventurer:

My Africa trip encouraged me to unlearn the habits of information overload. Two years of preparations went mostly out the door as soon as I landed on the giant continent. It turns out the key was sponging up the intricacies of a place with an entirely different set of rules instigated by people with an entirely similar set of humanisms. While catching a bus might be different in the way you get on, pay for and get off, the bus driver has a distinctly similar set of attributes to her Manhattan counterpart. In the same way you can read people with some time and attention, you can read the landscape. Heading in as many different directions as I needed to and trusting the first, second or third person I asked about any given thing was the main way that information flowed into the life force of that long expedition. People trumped maps, guidebooks and the internet, allowing me to be informed, just enough. A lack of knowledge loads up the venture with even doses of the unknown, which works well for me, and anxiety, which seems bad but is actually useful to an adventurer.

I have been thinking and talking a lot about risk, anxiety, growth, and travel lately, and this passage sums up a lot of it quite nicely: we need doses of the unknown to grow and thrive, and COVID, in eliminating travel, has robbed us of a significant wellspring.

When I think of the really great travel memories I carry with me, they are all the result of the happenstancery Miles writes about: looking for a movie theatre in South Korea, trying to find the circus in Munich, searching for long-lost relatives in Croatia, getting lost in Osaka.

Recent times have served to recast “doses of the unknown” as bogeymen: bone fractures, tumour growth, bad scans, death, emptiness. No wonder I’m emerging confused and anxious.

Clearly I need to fall in love with the unknown again.

My Tradescantia Alba, purchased on my birthday in early April, seems to be doing well in the front window at 100 Prince Street. It’s about to bloom.

The new retail packaging for Lil’ Darlings vegan sausages hit the shelves this week. I’ve been assured it will be possible to buy them at locations other than Founders’ Hall in the days and weeks to come.

About This Blog

Photo of Peter RukavinaI am . I am a writer, letterpress printer, and a curious person.

To learn more about me, read my /nowlook at my bio, listen to audio I’ve posted, read presentations and speeches I’ve written, or get in touch (peter@rukavina.net is the quickest way). 

You can subscribe to an RSS feed of posts, an RSS feed of comments, or a podcast RSS feed that just contains audio posts. You can also receive a daily digests of posts by email.

Search