Using `cal` and plain text to track things, Part II
Mon 27 November 2023 by R.L. DaneBack in September, I posted about using the output of cal
and plain text to track things. Here is the example of that format I listed in the post:
August 2023
Su Mo Tu We Th Fr Sa
. 2 3 . 5
. 7 . . . . .
. . . 16 . . .
. . . . . 25 .
. . . 30 .
2023/08/02 326 45 3.0 1/1 ell
2023/08/03 Swimming ~30 minutes
2023/08/05 Swimming 50min med diff
2023/08/07 393 50 3.48 2/1 elliptical
2023/08/16 345 50 3.29 2/1 elliptical
2023/08/25 1 hour intense swimming
2023/08/30 333 44 3.00 2/2 elliptical
I got so much great feedback from some "FediFriends"* immediately after that post that the next day, I came up with a script to automate the process of creating the "filtered" cal output automatically: fcal.
* post about what that means (for the uninitiated) coming soon
The core of the script is only roughly* 20 lines of shell (glorious things can be done in 20 lines of shell, my good fellow!!), half of which processes command line options (I could never get into using getopt
/getopts
), the other half of which constructs a sed
one-liner to do the actual filtering.
* not counting spaces, comments, individual if
/do
lines, and super-simple functions like warn()
and die()
Feeding the same data printed manually above into fcal
yields the following:
~ $ fcal -o Aug 2 3 5 7 16 25 30
August 2023
Su Mo Tu We Th Fr Sa
. 2 3 . 5
. 7 . . . . .
. . . 16 . . .
. . . . . 25 .
. . . 30 .
Nobody ever said shell was beautiful, but dang if it isn't insanely useful and quick to construct basic things!
*Don't* use what works for you
I was watching a youtuber I rather like, and he closed out his video talking about his pragmatic approach to operating systems. He said he used multiple OSes (some FOSS and some non-FOSS), and he summed up his approach with "Use what works for you."
This is not a polemic …
read moreUNIX is "dead," Part II
I was re-reading my UNIX is dead. Long live UNIX article, and I realized something that helped me better classify the various types of UNIX OSes:
I see OSes like the BSDs as UNIXes, while I view MacOS and many Linux distros (particularly the Gnome-oriented ones, more about that later …
read moreUNIX is dead. Long live UNIX
I remember once watching a video of presenter at a Linux conference boldly proclaim, "UNIX is dead."
As someone who worked on UNIX systems for over a decade, and who's played with UNIX variants off and on for three decades, that is a pretty incendiary statement.
With apologies to Sophocles …
read moreUsing `cal` and plain text to track things
I know everyone's got their preferred notes app/platform, but I've been using SimpleNote for several years now, and I'm quite fond of it. Not only does it have very usable mobile and cross-platform desktop apps, it also has alternate apps like nvpy (a GUI) and sncli, an excellent command …
read moreFun with FreeBSD
Do *not* do the following :D
Please scroll down to the **Update** section below, instead
I was watching this video about FreeBSD last night, and the gentleman made mention of a blog which had extra information on FreeBSD. Looking at the blog, I found an excellent article describing how to …
read more