[2022-05-24 Tue 08:54]
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 posts.md Hugo archetype.
Code Sample
---
title: "[{{ time.Format "2006-01-02 Mon 15:04" .Date }}]"
author:
- 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.
Code Sample
#!/usr/bin/env ruby
require "tty-command"
require "tty-editor"
POST_PATH = "content/posts/%Y/%m/%s.md"
post_path = Time.now.strftime POST_PATH
cmd = TTY::Command.new
cmd.run "hugo new #{post_path}"
TTY::Editor.open 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.
Activity Log
hackers.town: 2022-05-24 Tue 07:23
Got some new pens for paper notes. The cats think new pens are a great idea, because they were tired of knocking the old ones off my desk and into dark corners.
hackers.town: 2022-05-24 Tue 07:25
@anjannath Hey awesome! I’m glad it helped!
hackers.town: 2022-05-24 Tue 12:40
Ate breakfast in a meeting. Eating a steadily cooling but otherwise delicious lunch during an emergency bugfix consultation between meetings.
Must be a Tuesday.
hackers.town: 2022-05-24 Tue 13:47
You can tell how important a thing retroactively is by how many tabs are open to the exact same URL.
Working on a five tab task.
hackers.town: 2022-05-24 Tue 14:10
This would have been a great day to have my knitting out. Why did I not think of that until 2pm?
hackers.town: 2022-05-24 Tue 20:19
Tonight in Subnautica Bad Driving: got my seamoth stuck in a hole.
hackers.town: 2022-05-24 Tue 23:21
Switched to mainly digital for dev books by 2009 due to the terrible shelf life of hot tech topics. Looking through that library in 2022 and it’s time to cull. Many of those titles are way past their best-by date.