--- date: "2025-06-08T04:00:00-07:00" title: "TUI Challenge: Day 1" tags: ["cli","tui"] categories: ["personal","sa"] #image: "" series: ["tuichallenge"] summary: "TUI Challenge starts" --- *tap, tap* Is this thing on? When was the last time I published anything? Oh, back on [January 15, 2024](/posts/2024/01/check-in-2024-01). Oops. Well, I had to clean up a few things to get this back working with updates to [hugo](https://gohugo.io), 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](https://jupiterbroadcasting.com), including one called [Linux Unplugged](https://linuxunplugged.com), and they are running a [7 day TUI Challenge](https://github.com/JupiterBroadcasting/linux-unplugged/blob/main/challenges/TUI-Challenge.md). 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](https://www.qutebrowser.org) 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 '