I wrote earlier of the very useful command line utility called gcalcli (short for GoogleCALendarCommandLineInterface). Click here to read that post. One of the options is called “agenda” which spits out, by default, the next five days of calendar entries. If you would prefer a different range of time than five days, then you can specify two dates and the utility will give you that set of entries.
But I find that to be a bit of a pain, typing in the dates to start and end the list, when I generally want a quick and dirty “next several days.” That, I suppose, is why there is a default of five days. But five days is not a good default. If it is Wednesday, I want to see what I’ve got on my calendar for the rest of the current week, as well as what is on my calendar for ALL of next week. For me, a better default would be 14 days. With 14 days, you always get a full look at the present week and the next week, plus, sometimes, a bit after that.
One can imagine writing a bash script that figures out what day it is, and then adds enough days that you get an agenda for the remainder of the present week plus all of the next week, but no more days than that. Such a script could make use of bash’s ability to manage and manipulate dates as they occur in our periodic system, with 24 hours in a day, 7 days in a week, work days being a subset of five of those days, etc. etc.
One could also imagine writing a bash script to poke one’s eyes out with hot soldering irons.
A simpler solution is this:
Continue reading Hacking a Google Calendar CLI Tool