Fun with software today

What if I decided to use only web-based tools? I asked myself that question this morning, and spent much of the day finding out. I had a blast.

Tasks

I normally use Org-mode and OmniFocus for task management. Today, I tried two alternatives, Nirvana and TickTick.

Nirvana adheres closely to the Getting Things Done workflow, which I appreciate. It looks nice and has been around for a long time. People do complain about a lack of updates, but since I just started I don't really feel that yet. Nirvana seems a bit light on keyboard shortcuts, which is a shame. Overall, it feels similar enough to OmniFocus that I could adapt quickly.

TickTick is more like Things. It lets me organize tasks using lists and tags. Once things are scheduled, I can view everything upcoming. It goes way beyond Things, though. There are Kanban and Timeline views, a calendar, habit tracking, Pomodoro timers, etc. I feel like I've barely scratched the surface.

RSS Feed Reader

I have used NetNewsWire for years, but if I want to live in a browser, I need something else. There are tons of options. I decided to look at FeedbinFeedly, and Inoreader.

Feedly was out immediately. At first glance, it looks nice, but it felt all wrong after that. I can't explain it, but we didn't click.

Feedbin is what most people I know recommended. I used Feedbin for a while years ago. It's good. It took too long to figure out how to tidy up the column showing the list of articles. By default it's filled with giant images, which means only a handful of articles fit on the screen. Once I fixed that, it was better.

Inoreader comes up a lot, but had never looked at it. Once I did, we clicked immediately. It just felt right, if that makes sense. It has a zillion features that I don't need, and I'm hoping I can filter out any "trending" or "recommended" nonsense. I signed up for a year.

Notes

This is funny. I pinned a Roam tab. It's unlikely this will last more than a hot minute, but man Roam was great. Still is, honestly. It's hard to justify using Roam these days, even though I still have 6 months remaining on my 5-year subscription. I have to admit that hammering notes into a Roam outline with super easy linking/backlinks/transclusion/etc. is still pretty cool.

Next?

This was only meant to a fun, very temporary experiment to kill a few hours this morning. It still is, but it's been so fun that I'll probably continue doing it tomorrow.

Permalink #

Adding an ID property to Org-mode files in directory

This is a bit esoteric, but I'm writing it down here anyway.

I have switched between using Denote and Org-roam for my Org-mode notes several times. They are mostly compatible, so this hasn't been too troublesome.

One thing I needed to do was make sure that all the .org files included an :ID: property at the top so that Org-roam includes them in its database. The ID property looks like this:

:PROPERTIES: :ID: 4def7046-3ef8-4436-a079-09362bf66aff :END:

Many of my Denote files already include this because I like to drag and drop files and images into the notes, and the ID property makes this work correctly. But there were maybe 300 files without an ID, and I had no desire to add the property manually to every one of them.

I started to write a shell script to do this, but got hung up on some bit of syntax, so I searched for the error and found the fix. Then I had trouble with the sed command, etc.

Sometimes I forget that ChatGPT exists. Sometimes I ignore it because I want to learn stuff on my own. But sometimes I just want the answer, and, problematic as LLMs can be, there's no denying their usefulness.

A couple of prompts, a few iterations, and I had what I needed in about 10 minutes.

#!/bin/bash

# Directory containing the Org-mode files
ORG_DIR="${1:-.}" # Defaults to current directory if not provided

# Loop through all .org files in the specified directory
for file in "$ORG_DIR"/*.org; do
	# Skip if no Org-mode files are found
	[ -e "$file" ] || continue

	# Check if the :ID: property exists in the first 5 lines
	if ! head -n 5 "$file" | grep -q "^:ID:"; then
		# Generate a unique ID (UUID)
		id=$(uuidgen)

		# Create the :PROPERTIES: block with the :ID:
		properties_block=":PROPERTIES:\n:ID: $id\n:END:"

		# Insert the :PROPERTIES: block at the very top of the file
		gsed -i "1i $properties_block" "$file"

		echo "Added :ID: $id inside a :PROPERTIES: block to $file"
	else
		echo ":ID: already exists in the first 5 lines of $file"
	fi
done

The only change I needed to make was to substitute  gsed for sedbecause the macOS version of sed was missing a switch and throwing an error.

While I was in there, I asked ChatGPT for a version of the script in Emacs lisp, just in case. I had it write the function for use in a Dired buffer, since that's where I'm most likely to want it. Here's the function...

(defun add-id-to-org-files-in-dired ()
  "Add :ID: property inside a :PROPERTIES: block at the top of all Org files in the current Dired buffer."
  (interactive)
  ;;(require 'uuidgen) ;; Ensure `uuidgen` is available
  (dired-map-dired-file-lines
   (lambda (file)
	 (when (and (string-suffix-p ".org" file t) (file-exists-p file))
	   (with-temp-buffer
		 (insert-file-contents file)
		 ;; Check the first 5 lines for an existing :ID: property
		 (unless (save-excursion
				   (goto-char (point-min))
				   (search-forward ":ID:" (line-end-position 5) t))
		   ;; Insert the :PROPERTIES: block at the top of the file
		   (goto-char (point-min))
		   (insert ":PROPERTIES:\n:ID: " (org-id-uuid) "\n:END:\n\n")
		   (write-region (point-min) (point-max) file))
		 (message "Added :ID: to %s" file))))))

Done and done. There may be better, cleaner ways to do this, but my problem is solved, which is all I wanted.

Permalink #

Adding an Edit link to Ghost posts

When reading one of my posts in Ghost, it would be nice if there was a quick way to get to the control panel to make edits. I always make typos, but don't always catch them until later. Or I might be reading, say, the /now page and decide to update it. By default, this involves going into the control panel and browsing or searching for the post/page in order to make the edits.

I found a solution to this on Jonas Liljegren's blog. Here's my slightly modified version of their solution.

Add the following to the post.hbs template:

    <div id="pi-pos">
      <a href="/ghost/#/editor/post/{{post.id}}">π</a>
    </div>

Add a similar one to the page.hbs template:

    <div id="pi-pos">
      <a href="/ghost/#/editor/page/{{page.id}}">π</a>
    </div>

Then add some custom CSS:

    /* Backdoor edit link */
    #pi-pos {
      position: fixed;
      bottom: 1em;
      right: 1em;
    } 
    #pi-pos a {
      position: absolute;
      bottom: -1.6px;
      right: 3.2px;
      text-decoration: none;
      color: black;
      opacity: .2;
    }

Now, at the bottom right of every post and page, there's a subtle π link that takes me directly to that content in Ghost's control panel. I've already used it several times this morning.

Permalink #

Floating images in Ghost

There is no built-in method in Ghost for floating an image and having text flow around it. It's a significant omission, and one which they say is "too hard" and have no plans to change. OK fine, I'll do it myself.

I found a reasonable solution in this post on the forums. Here's how I'm using it.

Add the following to the header in the code injection area:

/* small images to float but not look stupid on mobile */
@media (min-width: 40rem) {

.float-left-half figure,
.float-left-two-thirds figure {
    float: left;
    margin: 8px 20px 6px 0;
}
.float-right-half figure,
.float-right-two-thirds figure {
    float: right;
    margin: 8px 0 6px 20px;
}
.float-left-half figure,
.float-right-half figure {
    max-width: 50%;
}
@media (min-width: 64em) {
	.float-left-two-thirds figure,
	.float-right-two-thirds figure {
    	max-width: 67%;
    }
}

}

Then, in a post or page, I add an HTML block before the image card I want to float (e.g to the right).

Then close the </span> after the image card.

Permalink #

Roll-185 (Canon AE-1 Program HP5)

Alice enjoying herself at the park.

The Canon AE-1 Program was my first real camera. Unfortunately, I no longer own that original from 1982, so I bought another one in 2013. It's not a great camera, but it works. I like to put a roll through it now and then.

Permalink #

Roll-184 (Leica MP/HP5)

All he wants to do is walk around. (Photo: Jessica S.)

I spent the morning of the election with my daughter and grandson. It was a nice way to spend part of an otherwise anxiety-filled day.

Permalink #

The pros and cons of moving back to Ghost

OK, it's happening again. Hugo broke my site for the second time in two updates. I got mad (again) and decided it was time for us to break up.

I dusted off the version of the blog that I'd built using Eleventy and started working on getting everything updated. Except it didn't work. I don't know what I was missing or what had changed since I stopped using it, but things were broken. I then decided that I would start fresh with Eleventy's base blog repo. That was also a mistake. After several hours, I had built an ugly blog, without some of the features I'd wanted. I gave up.

In the meantime, the Hugo devs had fixed the bug that had broken things earlier. That meant I could stop what I was doing and get back to using Hugo and the template that I quite like. The problem was that I'd already decided I no longer wanted to use Hugo, even though it was working again.

Ghost logo

So, I did something I told myself I would never do again; I spun up a Ghost instance. I have a complicated relationship with Ghost. It's fast, simple, and clean. Its editor is as good or better than everyone else's, and I can run an instance for under $5/month using PikaPods.

I was, as usual, immediately smitten with Ghost's editor. I made the usual tweaks to permalinks and other settings. I killed everything related to subscribing. Within an hour I had a nice, clean, easy blog that was ready to go. Except there was no content. I had an old backup from earlier this year, so I was able to import about 80 posts from that.

There are dozens of blog posts around that claim to have a solution for importing Hugo's Markdown files to Ghost's JSON format. None of them worked for me. I even asked ChatGPT for a script, and it was surprisingly good, but it imported pages and no posts.

Unless I can find a way to automate the import, I'm left with the task of manually moving about 250 posts. It's almost enough to put me off the whole affair, but I'm typing this in a browser on my laptop in bed, and I'm not worried about Hugo versions or sync status or SSH keys or any of that. It's pretty compelling, so I'm planning to move ahead with the migration.

Oh, I almost forgot the pros and cons.

Pros

  • Great editor: Images, callouts, linking, fancy blockquotes. It's very nice.
  • Can post from anywhere with a working browser
  • Fast
  • Reasonably cheap to run
  • Decent selection of themes and it's simple to switch between them
  • I can send emails out for new posts if I choose
  • They are working on ActivityPub integration
  • It doesn't break every 5 minutes

Cons

  • It's not a static website
  • While I could edit posts and somehow post them using Emacs, it's not really worth it.
  • Themes are expensive
  • I lose some nerd cred
  • They're focused on "monetizing your audience". Gross.
Permalink #

Wednesday, November 06, 2024

What have we done?

In 2016 I was shocked and disappointed. This time, I feel anguish and hoplessness. I have to believe this will pass, just as it did the last time. An old man getting older always ends the same way. And time does that thing that time does, but JFC how did this happen? My mental model of the world and the actual world no longer align.


I thought maybe I'd give up on blogging for a while, but this is one of the few things that helps.


A Doom Emacs status update after several days

Some quick notes on my move back to Doom Emacs after a few days.

After once again hitching my wagon to Doom Emacs, I have been both elated and frustrated. I'm elated because Doom adds so many nice little quality-of-life improvements that make using Emacs downright pleasant right out of the gate. On the other hand, it ruins a few things and sometimes breaks for no reason that I can understand. It's nice having someone maintain the basics of my config, but it's also frustrating when those someones do it "wrong". And sometimes running ./bin/doom upgrade breaks things. I can usually recover, but don't love that I have to think about it. This is a side effect of having others do things for me, and it's a fair trade.

So far, I've resolved most of the little issues. One of those was with Elfeed. Elfeed is unusable for me when using Doom's default configuration. Doom includes the elfeed-extras package, and I don't like it. The split window is annoying. What's worse is that there's no date column in the list of articles and there's no simple way to include it. That's just dumb, imo. So I disable that package and modify a few little things and it's much better.

The remaining problem is that I sync my entire .config/emacs and .config/doom directories, and this somehow breaks because Doom adds $TMPDIR to the .config/emacs/.local/env file. Apparently, my tmp directory is not the same on both the Mini and the MBP, so I get permissions errors every time I switch machines. The workaround is to run ./bin/doom env before starting emacs when switching machines. That's not sustainable. I'll figure it out, but it's one thing that still bugs me.

And oh, the key bindings! Around six months ago, I moved back to my vanilla config and decided to stop using Evil mode. It was a painful transition, but I got used to it and now the stock key bindings feel normal. The problem was that I also use several tools that only offer Vim bindings. Switching between Emacs and Vim bindings has been chaotic, to say the least. I keep tripping over myself and there's been a lot of swearing. Going back to Doom and Evil mode has been tricky, but the muscle memory is returning, and I like the consistency in the apps I use most.

Something I dislike is using Doom's abstractions like after! and map!. It just makes things even less "normal". Handy, but it will make moving out of Doom harder. Not that I'd ever do that, though, right? 😆.

Right now, I'm happy with the setup. I love when Doom does something and it makes me say, "ooh, nice!". As long as that happens more often than me saying, "WTF?! That's dumb.", I should be fine in Doom.

Permalink #

Tuesday, November 05, 2024

I hope you're voting for Harris today. Other than that, I'm shutting my political brain down for the rest of the day. My heart can't withstand this level of sustained anxiety.

I have a lot of anxiety around flying, so before and during a flight, my brain and body sort of shut down and go into internal, primary-systems-only mode.

That's how I'm reacting to the election.

This is mostly because of two things:

  1. Things will probably be OK, but they could end in catastrophe.

  2. Once we take off, the results are completely out of my control.

It's terrifying.


Post: A Doom Emacs status update after several days | Baty.net


Monday, November 04, 2024

Do you ever feel like your life's wake is littered with missed opportunities?


I spend so much time looking backwards that I don't pay attention to what's ahead.


I don't understand people who post overconfident, often controversial posts on social media, and then say things like "This is NOT an invitation to debate!...". I mean, where do you think you are? I'll tell you where, you're in a place where everything is an invitation to debate, whether you like it or not.


Sunday, November 03, 2024

The time change around DST is not big deal to me. People get all dramatic about a single hour twice a year. I just go about my day as usual.


VOTE FOR HARRIS.

I did. You should too.


ChatGPT is really very handy sometimes. I just asked for a simple bit of lisp for Doom Emacs and it spit out a perfect working function with instructions and an explanation of every step. It's amazing and I'm a little ashamed for taking advantage of it.


Friday, November 01, 2024

I have a routine that I go through on the 1st of every month, during which I always tell myself that, "This one will be different.", but in the end they're all the same.


Thursday, October 31, 2024

Polariod of a tree in our yard

I'm so mad at Emacs right now. It's so frustrating when something stops working for no reason I can fathom. I sync everything related to my Emacs config via Syncthing, and the Emacs version is identical, and yet doom-modeline fails to load on the MBP but works fine on the Mini. It's crazy-making and I can't figure it out.

UPDATE: I had to re-install the "f" and "shrink-path" packages for no apparent reason. I still hate not knowing why things broke in the first place. Makes me want to throw in the entire Emacs towel.


The whole "Check your Halloween candy. I just found [some crazy thing] in a Snickers" thing is tired already.


Today's Emacs etc. fiasco reminded me of this day in 2020.


Diving back into Org-roam

I've decided to dive back into Org-roam and see how it feels. I've done this before, but eventually moved back to Denote. I love Denote's simplicity, but I have noticed that I don't take advantage of many of its main advantages. For example, I always use Org-mode files, never Markdown or plain .txt. I almost never filter my files based solely on components of their names. I like using multiple tags, but doing so makes Denote filenames even more unweildy. And so on.

How did I end up back in Org-roam? I summed it up yesterday, so start there.

I'm getting over my internet-induced fear of "lock-in". I mean, Org-roam uses a (GASP!) database! Who in their right mind relies on a database for managing their precious plain-text notes? 🙄🙋‍♂️. You can call it lock-in if you want, but the first requirement for my notes is that they are as useful as possible to me...today. If that means there's a chance they end up less useful in some hypothetical scenario 20 years from now, I don't care. Besides, they will be useful in 20 years. They're still just plain text. The database is only a wrapper around a bunch of text files, so without that the only important thing I lose is the convenient linking and backlinks, etc. So they'll just be a little less useful, I suppose. That's fine, and a trade-off I'm willing to make.

One thing I'm doing to help with future-proofing is to use org-roam-dblocks from Chris Barrett. This lets me "burn" backlinks or query results directly into the files, removing the need for the database-ey bits. Here's an example:

A dblock with links to everything tagged Emacs
(use-package org-roam-dblocks
  :after org-roam
  :load-path "~/.config/emacs/lisp/nursery/lisp"
  :hook (org-mode . org-roam-dblocks-autoupdate-mode))

I have it configured to automatically update whenever the file is opened/saved. That helps. Without this, though, there's always search 😀.

Speaking of search, I've configured the wonderful Deadgrep as the default way I search in Org-roam. It required that I write a small lisp function, but it works great. I love Deadgrep.

(defun jab/search-roam (search-term dir)
      "deadgrep in org-roam-directory"
      (interactive (let ((search-term (deadgrep--read-search-term)))
                     (list search-term org-roam-directory)))
      (deadgrep search-term dir))

Here's what the Deadgrep search results look like:

Deadgrep results for

That earlier post explained why I like using Org-roam, but here's a quick list:

  • Any org heading can be a node
  • Aliases
  • Multiple tags without cluttering up the file names
  • Feature-rich Daily notes functionality
  • Org-roam-refile

I even like the Graph made possible by org-roam-ui, even though I make fun of it.

I am hedging my bets just a little, though. My default org-roam-capture-template creates new files using Denote's default format. It also includes the #+identifer: front matter that Denote uses. While I don't intend to use both Denote and Org-roam like I used to, it's nice to know that I can.

Permalink #

Tuesday, October 29, 2024

Notes for October 29, 2024

Roam > Obsidian


Org-roam vs other Roam-alikes | Baty.net

Me, in May, 2020:

My ~/org directory has everything. It’s not just my notes repository. It’s my Journal, my todo list, my authoring environment, my reference manager, my time tracker, my PDF viewer/annotator, and sometimes my email and RSS client. I love the idea that I can ripgrep in ~/org and find anything. I love that everything always behaves the same way (bindings, editing, file handling, etc.). I love that it’s all local and free and is more likely than any of the alternatives to be around for decades.


I contain multitudes (and I want them out!)


The best way to continue liking someone is to stop following them on social media.


Round and round with Roam and friends

I hate this feeling. My brain has been oscillating so quickly between my modes that it feels like it's vibrating. And not in a good way. Here's how it's been going:

I was reading my feeds early in the morning, and saw a couple of photos of some well-used notebooks. You know the ones, lots of bookmarks and edge markings and the whole thing looks swollen due to it being over-stuffed with interesting stuff. I've been struggling to continue using my Leuchtturm because the paper isn't great and I don't like tiny dotgrid pages. So I grabbed one of my half-filled Midori MD notebooks, which I love, and started writing with my favorite fountain pen.

Shortly after that, someone online mentioned Roam Research. I put down my pen, and started playing in my old Roam database. I felt a powerful wave of note-taking nostalgia. I don't know if you remember, but when Roam showed up it changed everything about note-taking for me. Links, backlinks, transclusion, daily notes, all of it.

In July of 2020, I paid $500 for a 5-year subscription to Roam. I was a "True Believer™".

Then Conaw got weird. The #RoamCult thing got embarrassing. Roam raised a ton of money and then seemed to mostly stop doing anything really new. Obsidian showed up. And Logseq, and Tana, and well, you know. There were suddenly alternatives. Cheaper ones that seemed to be getting more attention by the devs than Roam. So I switched (to all of the above, at least briefly).

Now this morning I re-installed and configured Org-roam and have been making my Denote notes work with it.

It's been quite a week, and it's only Tuesday!


Monday, October 28, 2024

With apologies to Groucho Marx...

I don't want to work for anyone who would hire me via LinkedIn.


The New Internet

I read a post recently where someone bragged about using kubernetes to scale all the way up to 500,000 page views per month. But that’s 0.2 requests per second. I could serve that from my phone, on battery power, and it would spend most of its time asleep.


I can always tell when someone is unserious about software by how much they complain about a "lack of updates". They're just bored and want something new to play with.


Links for October 28, 2024

Another Hugo deprecation

I sure wish Hugo would stop deprecating things.

This time it's site.Social. My theme uses that in a couple of files, and the theme's author is busy and doesn't always have time to fix things right away.

They now want site.Params.Social so I've temporarily fixed the problem myself by editing two files.

In twitter_cards.html:

{{ with site.Social.twitter -}}
# becomes
{{ with .Site.Params.Social.twitter -}}

And in opengraph.html:

{{- with site.Social.facebook_admin }}
# becomes
{{- with .Site.Params.Social.facebook_admin }}

At least now the error is gone and the site builds. I'll need to keep an eye on the PaperMod repo for a real fix.

UPDATE: See Issue #1573

Permalink #

Sunday, October 27, 2024

Self-portrait with M3 (2022)

Notes for October 27, 2024

Well, we're back on Hugo. I'm sorry. I like how the PaperMod theme looks and works and feels, more than I like the hand-made thing I was using with Eleventy.


I just noticed that I was using a /journal/ prefix to URLs with Hugo, but removed that on the 11ty version of the blog. This of course has broken existing links to journal entries. I'm ignoring it, but it'll bug me soon.


I'm bored already.


Emacs feels right. Obsidian doesn't. I don't know what else matters.


One thing about switching between different static blogging tools is that the mechanism for writing and publishing doesn't change. I type in Emacs and then type "make deploy" in a terminal. Same old.


Links for October 27, 2024

Saturday, October 26, 2024

Self-portrait as Autocord flash test.

I'm not saying anything new, but I feel like we've lost the battle for having good and useful products and services. Is it just me, or does every product seem to only grudgingly accept the actual user as a necessary evil? We're secondary to whatever is actually making the money. Call me a grumpy old man, but I hate this trend. "Enshittification" is an over-used meme word by now, but I can't think of a better one.


More like "Fed-UP-verse" amirite?


On days when I feel like "doing something different", I tend to stick to the same circular routine of either switching cameras or text editors or note-taking tools or email clients or blogging platforms and so on. I wish instead that I would create something different. Something new.


felix stalder:

If you automate the easy stuff, it's much harder to gain experience necessary to do the harder stuff


You can use Clean Up with a clear conscience – Six Colors

However, I don’t want to see silly, sweeping statements from people that foist their anxieties based on their ignorance onto other people.

Some reasonable points. Some not so much. Mostly it feels overly defensive. One person's "silly sweeping statement" is another's valid opinion.