duckland.org

TUI Challenge: Day 1

tap, tap Is this thing on? When was the last time I published anything? Oh, back on January 15, 2024. Oops.

Well, I had to clean up a few things to get this back working with updates to hugo, the static blogging engine I use for the site.

So, what prompted me to fire this up again, and actually make it work (unlike the last few times I was going to start this)?
Well, I listen to a bunch of podcasts from Jupiter Broadcasting, including one called Linux Unplugged, and they are running a 7 day TUI Challenge. Now, since I normally read my email and RSS feeds in a TUI app, and I use VIM as my editor and IDE, I figured it would be fairly easy for me to take part.

The two big things I use a GUI for are web browsing with qutebrowser and watch youtube vids with MPV, I should be able to adapt.

Anyway, Day 1 challenge is to write document using a TUI editor of at least 200 words. There are bonus points for using scripts to help things out, and I guess the script I use to start editing a file should work:

#!/usr/bin/env bash
#===============================================================================
#
#          FILE: dopost
# 
#         USAGE: ./dopost
# 
#   DESCRIPTION: make a new post for hugo
# 
#       OPTIONS: ---
#  REQUIREMENTS: ---
#          BUGS: ---
#         NOTES: ---
#        AUTHOR: Don Harper (), duck@duckland.org
#  ORGANIZATION: 
#       CREATED: 02/02/2019 08:35:34 PM CDT
#      REVISION: Based off of genpost.sh
#===============================================================================

set -o nounset                              # Treat unset variables as an error
trap onexit 1 2 3 15 ERR EXIT
#--- onexit() -----------------------------------------------------
#  @param $1 integer  (optional) Exit status.  If not set, use `$?'

function onexit() {
	local exit_status=${1:-$?}
	if [ "${exit_status}" == 0 ]
	then
		exit
	fi
	notify-send "Exiting ${myname} with $exit_status"
	cd
	exit "${exit_status}"
}

myname="$(basename ${0} .sh)"
Title="untitled"
Category="none"
TAGS="tagless"

while getopts "t:T:c:h" OPTIONS
do
	case ${OPTIONS} in
		t) Title="$OPTARG" ;;
		c) Category="$OPTARG" ;;
		T) TAGS="$OPTARG" ;;
		*)
			echo "$0 -t '<title>' -c '<category>' [-T '<tags[,tags2]>']"
			exit 1
			;;
	esac
done
shift

if [ "${Title}" == "untitled" ]
then
	echo "Missing title"
	echo "$0 -t '<title>' -c '<category>' [-T '<tags[ tags2]>']"
	exit 1
fi
if [ "${Category}" == "none" ]
then
	echo "Missing category"
	echo "$0 -t '<title>' -c '<category>' [-T '<tags[ tags2]>']"
	exit 1
fi
if $(echo "${TAGS}" | grep -q ' ')
then
	TAGS=$(echo "${TAGS}" | sed 's/ /", "/g')
fi

BASE="${HOME}/src/WWW/sites/duckland.org"
DATE=$(date +%F)
YEAR=$(echo $DATE | awk -F- '{print $1}')
MON=$(echo $DATE | awk -F- '{print $2}')
Name=$(echo ${Title} | sed -e 's/^ //' -e 's/,//' -e 's/ ://' -e 's/ /-/g' -e 's/\?//' -e 's/\!//' | tr '[A-Z]' '[a-z]' )
cd ${BASE} 
git co draft
printf "title - %s\nname - %s\n" "$Title" "$Name"
OUTPUTDIR="${BASE}/content/posts/${YEAR}/${MON}/"
mkdir -p ${OUTPUTDIR}
OUTPUT="${OUTPUTDIR}/${Name}.md"
echo "---" > ${OUTPUT}
echo "date: \"${DATE}T04:00:00-07:00\"" >> ${OUTPUT}
echo "title: \"${Title}\"" >> ${OUTPUT}
echo "tags: [\"${TAGS}\"]" >> ${OUTPUT}
echo "categories: [\"${Category}\"]" >> ${OUTPUT}
echo "#image: \"\"" >> ${OUTPUT}
echo "#series: [\"\"]" >> ${OUTPUT}
echo "summary: \"\"" >> ${OUTPUT}
echo "Victor_Hugo: \"true\"" >> ${OUTPUT}
echo "Focus_Keyword: \"\"" >> ${OUTPUT}
echo "---" >> ${OUTPUT}
echo "" >> ${OUTPUT}
#cd ~/src/www.duckland.org
#tmux neww -n "New Post" -t 30 "cd ~/src/www.duckland.org ; hugo serve -D -F"
#tmux split-window -h "${EDITOR} ${OUTPUT}"
#tmux select-layout main-vertical

#. ~/.myapps
#$TERMPROG -e tmuxp load duckland
tmuxinator start duckland

As the TUI Challenge has a scoring system, I am claiming 10 points for editing a file under vim, and an additional 10 points as my script does a bit of formating, for a total of 20 points.

Check-in, 2024-01

Time Has Past

Hum…it has been almost 6 months since I last posted here, And only two total last year. Not very good record on my part.

The ${JOB} has not change, still building Linux stuff for a large bank. The family is still doing well. And the weather sucks. It is currently 27F (-2C) with a windchill nocking it even colder. This time, it supposed to only be 36-48 hours, unlike two years ago

Computer and such

My NixOS Challenge documenting my start into NixOS was supposed to be me keeping track of what I am testing there, but the experiment is going great. I have not loaded a different OS on my XPS13. In fact,everything I documented as not working back then is now working, and the XPS is my primary machine. I have since installed it on my HP and my x260.

I also got a PineTab2 this past year, and it is also running NixOS. My next two goals are to change my public web server over, and to unify my NixOS config across all my machines, including the PineTab2.

Photos

I have been working on my P52 (post a photo a week for 52 weeks) for a bit over 5 years now. Every so often, I want to post more, so here are some photos from the past 7 or so days:

Finding Film

I was talking with a friend of mine who is into all sorts of things vintage (he is a trained archaeologist), and I mentioned that I had an old Kodak Brownie Starflex sitting around. He happened to have some extra expired color 160 film which the Brownie takes and offered it to me. While, I used to shoot lots of 35mm, I have never done any medium format photography. So, I figured out how to load the film, and I went to a local park to test the camera out. The following are the photos which I did not mess up (mainly, too close to the subject): img img img img img

This prompted me to pull out my old 35mm gear. I have a pair of Minolta cameras, and X-7 and a STR-202.

The X-7 was the first SLR I ever bought. The STR-202 has a reputation of being solidly built, and I found many examples of it still being heavily used today, even though it was built between 1976 and 1980.

This set was from a roll of Kodak Color film I found in my STR-202 which I forgot to finish up about 10 years ago: img img img img img img img img img img

My keeper rate was much higher. :) I have bought two new rolls of film, one color and one black-and-white. I am not too worried about not seeing the results as soon as I take a picture, but there are no easy places for me to get the film developed any more, so I have found a lab in California to use, but it takes about 10-14 days to turn around a roll due to shipping.

Hopefully, more to come.