||      Phlog 32 - gcalcli (for OpenBSD)        ||
||                                              ||
||              OpenBSD ThinkPad                ||
||                Kitchen Table                 ||
||                                              ||


For at least the foreseeable future, Google Calendar is a necessary evil, both for some work-related items and home/family calendar sharing. It's tough to avoid as tons of mainstream appointments
and event reminders come in google calendar format.  Additionally, there are times where I can't have or don't want a mail client or browser open yet still would like my calendar at
the ready.  gcalcli is one of a few Google Cal API cli projects out there that givres exactly what I was looking for: console/terminal calendar access.  It's a nice, straight-forward install
on Linux, which is great for work and a couple environments at home.  It's a bit more involved for OpenBSD (see link to steps below) but still works just as well once it's configured.

The output is a lovely, minimal, text output that's been very readble across a variety of terminals
Example:

Sunday     │Monday    │Tuesday   │Wednesday │Thursday  │Friday    │Saturday  │
├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤
│05 Jan ** │06 Jan    │07 Jan    │08 Jan    │09 Jan    │10 Jan    │11 Jan    │
│          │          │          │          │          │          │          │
│Forecast  │Forecast  │Forecast  │Forecast  │00:00 On  │          │10:00     │
│          │          │          │          │Call -    │          │Netflix - │
│(-7° |    │(-6° |    │(-7° |    │(-5° |    │Server and│          │$8.47     │
│-17°)     │-12°)     │-17°)     │-11°)     │Storage   │          │          │
│          │          │          │          │Primary   │          │          │
│09:00     │08:00 On  │00:00 On  │00:00 On  │          │          │          │
│Twitch    │Call -    │Call -    │Call -    │12:00 On  │          │          │
│Resubscrip│          │Server and│Server and│Call -    │          │          │
│tions     │          │Storage   │Storage   │Server and│          │          │
│          │Datacenter│Primary   │Primary   │Storage   │          │          │
│----------│On-Call   │          │          │Secondary/│          │          │
│          │          │18:00     │19:00 Yo! │Intake    │          │          │
│20:00     │          │Lispy     │Make      │          │          │          │
│Garbage   │          │Gopher    │picks.    │          │          │          │
│out       │          │Show      │          │          │          │          │
│          │          │          │          │          │          │          │
└──────────┴──────────┴──────────┴──────────┴──────────┴──────────┴──────────┘

Adding items isn't as streamlined as a client-based or web interface may be (which could also be chalked up to user error...) but I ended up with a couple different scripts that allow for adding appointments.
Reminders - both setting them on the calendar item and the options that allow them to pop up - are still a work in progress for me in OpenBSD. There are .xsession and cron job options to allow for gcalcli to
alert, but neither work great on my laptop.  I'm just happy to set them so reminders on other devices & OS's fire, which is good for the time being.

A couple caveats for running gcalcli is that the authentication piece needed by google's API.  The tl;dr is that Google requires the user to have a project set as "Production" (vs. the initial status of
"Testing") in order to avoid the credentials encompassing the client-id and client secret expiring every 7 days.  Getting a google project approved for persional use isn't too daunting - don't make the
same mistake I did and add uneeded permissions beyond the default (the shared calendar API permissions are not as granular and at first glance it made me think I needed to add to be able to read them into gcalcli).
If the verification process for moving the project to Production starts requiring things like a logo, home page, developer email and/or YouTube video describing the app, some additional permission is set
that's prompting the extra scrutiny.

An alternate option to terminal output is the integrated Conky option if that's something that's utilized on your window manager/X session which is a very fun feature.  I like this option when the screen in
the environment allows for it.  Speaking of screen, there's a neat integration for Screen that allows for agenda line to be added to the status line.  I'm not a daily Screen user but I really, really like
this feature.

gcalcli is *well* worth investing the configuration time and effort if you spend any significant time in console-land!  I've been very happy that I've got this calendar option that I can refer to when I'm
in the middle of something and I get asked if I'm free for a meeting or knowing if I'm running errands after work, etc.  It's a small thing, but not having to switch away or fire up a new app to check
availability.




gcalcli project page:
https://github.com/insanum/gcalcli

gcalcli authentication doc:
https://github.com/insanum/gcalcli/blob/HEAD/docs/api-auth.md

Other CLI projects:
https://github.com/rust-dd/google-calendar-cli
https://github.com/pimutils/khal
https://github.com/horacehylee/gcalendar-cli


OpenBSD Install tweaks:
https://git.sdf.org/schroeder/OpenBSD-gcalcli