Okay so what was that previous bleet about? I wanted to be able to quickly pound out one of these microposts so I worked with macOS’ Automator to make it happen.

Even though I’ve been a mac user since GW was in office, I’ve never really dipped my toes into automator. Part of this was to just get a working automator app as practice.

What does it do?

The first thing I did was add a shell script:

#!/bin/zsh

# Change to the CBI Hugo Folder
cd ~/Websites/cyberbuff/

# get date/time for folder name
cdt=$(date +"%Y-%m-%dT%H%M%S")

# run hugo to make new faketweet
/opt/homebrew/bin/./hugo new content faketweet/$cdt

# open new md file
open -a TextEdit content/faketweet/$cdt/index.md

# wait for textedit to close
wait

# move to new folder
cd content/faketweet/$cdt/images

cwd=$(pwd)
echo "$cwd"

Next, I pass that $cwd variable down into automator. The script opens the newly created bleet in text edit and opens a finder window where you can select images. Save the .md file, quit, select any images if you want them and hit choose. Then, the script copies the images into the page bundle image folder, runs hugo to generate the site and pushes it to neocities. The big holdup is that it takes a few minutes to fully publish the site. Maybe’ll I’ll turn hugo into a chronjob or something of the like and just push it out every few hours. Still thinking, but a nice tinker!