Collecting my attempts to improve at tech, art, and life

[2022-05-24 Tue 08:54]

Tags: now workflow ruby

Brain insists on a CLI flow for this tumblelog. So of course I have to mess up my perfectly functional flow.

I know I’ll fiddle with it more later, but here’s what I got at the moment.

I consider the Org inactive timestamps title core to the tumblelog flow. Better let time.Format produce something plausible in my Hugo archetype.

title: "[{{ time.Format "2006-01-02 Mon 15:04" .Date }}]"
- Brian Wisti
date: {{ .Date }}
tags: []
draft: false

The archetype uses YAML frontmatter instead of ox-hugo’s default TOML. I find manually managing the tags is easier that way.

My brain picked Ruby for the script to generate and open a new post, thanks mainly to the convenience of Piotr Murach’s TTY toolkit.

#!/usr/bin/env ruby

require "tty-command"
require "tty-editor"

POST_PATH = "content/posts/%Y/%m/"

post_path = POST_PATH
cmd = "hugo new #{post_path}" post_path

All it does is ask Hugo to create a new post based on the archetype, and then open that post file in my $EDITOR.

I’ll get to more later. I know from past experience I can use tty-command to manage the git bits after I’m done writing.

But apparently if I want to pay rent I need to work.

Added to vault 2024-01-15. Updated on 2024-02-01