A blog about everything, by Jack Baty

Blot and Org-mode

According to the latest Blot.im newsletter, Blot now supports Org-mode files. I haven’t found much documentation, but my one .org test file is not rendering. (This post is written in Markdown). I’ll keep digging.

I see in Blot’s release notes they it now supports .org files. If this is italic then huzzah! Otherwise, maybe later.

Blot and Dropbox issue

Some of the older posts in this Blot blog were rendering as empty documents. I figured it was some sort of Dropbox issue, so I rebuilt the index in Maestral and suddenly there were 287 conflicted copies, each right next to the original zero-byte files. This took me about an hour to fix, but that’s not a situation I want to be in again.

I’m feeling a little gun-shy here.

Blot permalinks

I just noticed that my emacs function for creating Blot posts included a slug” element in the front matter. Slug is not an officially supported item, and doesn’t work like one would expect. I have links configured as YYYY/slug so I would expect this post to end up at /2023/blot-permalinks, but if I put slug: blot-permalinks in the front matter, the URL ends up as just /blog-permalinks (no year).

I normally add slugs to front matter so that if I change the post title later, old links will still work. While I could add a Link:” front matter element that includes the year, I think I’ll just leave it out and let Blot handle things.

Quick blogging from Emacs

You see, thing is, when I’m using Emacs for so much of my life already, it makes sense to also use it for creating quick blog posts in Blot. This post, for example, took maybe a minute, start to finish, and I never had to leave Emacs.

Canceling SmugMug

I’ve decided I don’t get $110/year of value from SmugMug so I’ve canceled my subscription. Instead, I’ll be investing my time in jAlbum and publishing static galleries to photos.baty.net. I’ve owned a copy of jAlbum for years but never really dug in. Now I’ll dig in.

Using .bike files as templates in DEVONthink

(originally posted on my wiki, but thought it would be more discoverable here)

I keep several template files in DEVONthinks Templates.noindex folder so I can easily create copies using Data->New from template…

When doing that with a Bike App template, DEVONthink would create an .html file instead. After some digging, I learned that there’s a hidden preference called “AdditionalPlainTextExtensions” and I needed to add .bike to the list.

First, I checked to make sure there were no current additional extensions (one line):

defaults read com.devon-technologies.think3 AdditionalPlainTextExtensions

Then, I added .bike (one line):

defaults write com.devon-technologies.think3 \ 
         AdditionalPlainTextExtensions -string .bike

Fixed.

Grab the weather forecast using weatherapi.com

I like to record the weather in my journals. For several years, I’ve used https://wttr.in via curl. Recently, wttr has often been unreachable or would throw errors, so I took a look at https://www.weatherapi.com/

Designed for developers by developers, Weather API is the ultimate weather and geolocation API

The free account limits are generous, so I created an account. The default JSON results are very thorough. I created a little shell script that returns only the high/low temps and a text summary of the forecast:

#!/bin/sh
# Jack Baty, 2023 (https://baty.net)

jq=/opt/homebrew/bin/jq
weatherfile=`mktemp`

curl -s "https://api.weatherapi.com/v1/forecast.json?key=MYAPIKEY&q=MYZIPCODE&days=1&aqi=no&alerts=no" > $weatherfile

condition=`${jq} -r .forecast.forecastday[0].day.condition.text ${weatherfile}`
high=`${jq} -r .forecast.forecastday[0].day.maxtemp_f ${weatherfile}`
low=`${jq} -r .forecast.forecastday[0].day.mintemp_f ${weatherfile}`

echo "Low ${low}, High ${high} - ${condition}"

The output looks like this:

Low 52.1, High 72.6 - Patchy rain possible

Easy enough. I wrote a small lisp function for inserting the weather in Emacs:

(defun jab/insert-forecast ()
  "Use weatherapi.com to insert the weather forecast at point"
  (interactive)
  (let ((w (shell-command-to-string "~/bin/getweather")))
  (insert w)))

RSS feeds as emails using Notmuch and rss2email

I’m all-in with Emacs after once again failing to get along with Obsidian.

I’d stopped using Notmuch in Emacs for email, but I brought it back after re-reading Paul Ford’s article in Wired: I Finally Reached Computing Nirvana.

Could I too start storing things as email and find them later using Notmuch?

So far, I’ve solved RSS feeds. Rather than reading feeds in NetNewsWire or Elfeed, I’m using rss2email to convert RSS feeds to emails and reading them in Notmuch.

A good reference for getting started with rss2email is LinuxBabe’s How to Install and Use rss2email on Ubuntu

The tricky part of rss2email is actually sending the emails. I eventually got things working using msmtp, which would have been fine, but it’s a lot of extra hoohah. If only I could save the RSS items directly into Notmuch. Guess what, I can!

rss2email supports writing to Maildir files. It was as easy as adding the following to my rss2email config:

email-protocol = maildir
maildir-path = ~/Mail/Baty.net
maildir-mailbox = Feeds

rss2email supports importing OPML files, but I decided to clean things up and add feeds one at a time, like this:

r2e add BatyBlog https://baty.blog/feed.rss

Then, when I want to read my feeds I run r2e run and everything ends up right in Notmuch. I don’t want them tagged with inbox” along with my real email, so I added a filter to the post-new hook in Notmuch.

notmuch tag +feed -inbox -- '(from:jack+rss@baty.net)'

I have the rss2email sender configured as so it’s easy to filter just those messages. With that hook, new RSS feed items do not appear in the inbox, but I can easily read them in Notmuch by searching for tag:feed AND tag:unread.

So there, I’ve moved my RSS feeds into emails and manage them via Notmuch.

Pebble.is and AI

Wired: X Challenger Pebble Thinks AI-Generated Posts Can Help Lure Users Away From Elon Musk:

Pebble, a Twitter-style service formerly known as T2, today launched a new approach: Users can skip past its What’s happening?” nudge and click on a tab labeled Ideas with a lightbulb icon, to view a list of AI-generated posts or replies inspired by their past activity. Publishing one of those suggestions after reviewing it takes a single click.

I hate this so much.