Click the pic to embiggen.
Rube Goldberg illustration via James Vaughan

Ended up too sick to even tinker, since I last wrote.
Well enough now, to scratch out some prose to get my brains in gear.
Let’s start with Huginn adventure #1.
Buckle up!


I found Huginn, and am using it as my man friday.1

The “Problem”

I run Hugo on two three machines.
I’m tired of updating to the latest release manually.
The computer can do it for me!

Why this way? Why? Why?!

  1. It’s fun!
  2. Yes, there are other (most likely simpler) ways to do it, but Huginn is my new shiny hammer … and well you know!
  3. Did I tell you it’s fun? :)

How now brown cow?

Some more background:

  1. I could just apt install, but I’m too posh for that 😂 I want the latest version of Hugo. And the extended version at that.
  2. I depend on two more helpers.
    a. Syncthing syncs the folder that the Hugo deb package downloads to, across all my machines
    b. Pushover sends me push notifications. Huginn integrates with it.

Having said that, here’s a pic of my four step scenario, followed by the output of each step.

  1. Scrape the Hugo github releases page to get the title.2

  1. Get the latest release title3 and fashion a url out of it.

  1. Download Hugo to a folder.

  1. Send myself a push notification.4

  1. And tada!

So we done? No, you silly goose!

We’re done downloading the installer. Said installer now needs installing.
So my very imaginatively titled script5, which runs once a day via a crontab entry …

  1. takes the file,
  2. checks to see if it’s downloaded in the last day
  3. and if so, installs it.

Mind you, it needs root privileges. And then it also …
4. deletes any stray debs more than a few days old.6

#! /usr/bin/env bash

cd /path/to/hugo/deb/file

# Install deb from the last 24 hours
find *.deb -maxdepth 1 -mmin -1440 | xargs -d '\n' dpkg -i

# Remove debs more than 2 days old
find *.deb -maxdepth 1 -mtime +2 | xargs -d '\n' rm -rf 

And now we’re done :)

Holy shiny hammer, Batgirl! It worked!

The scenario, should you install Huginn and want to import and play with, as well as the shell script are here, on Github.

Note: I had originally used the RSS agent in step one, instead of the Website agent I use now, and that was much easier. But it would detect the new feed entry and then just sit there hatching eggs, not doing anything. I wish I had a snapshot (of the missed events, not hatched eggs) but I digress. The website agent, for all its hacky xpath quackery works.

Feedback on this post? Mail me at

P.S. Subscribe to my mailing list!
Forward these posts and letters to your friends and get them to subscribe!
P.P.S. Feed my insatiable reading habit.

  1. it could have been girl friday too, but I call mine Bertuccio, after Edmond Dantes’ man friday ↩︎

  2. I cannot believe, I go scrape a website and learn all that xpath voodoo, just to get a measly text string. ↩︎

  3. And here’s where Huginn helps. It remembers the last title. And only proceeds if something has changed. ↩︎

  4. the push notification is just like that. something whimsical for me. It’s independent of the download. I should probably have called it Step 3a. or 2b. Never mind now. ↩︎

  5. which is also synced and available across all three machines ↩︎

  6. I let them be for a couple of days, in case a machine is not online that day. ↩︎