gcalcli icon indicating copy to clipboard operation
gcalcli copied to clipboard

Add agenda detail option for `conferenceData`

Open michaelmhoffman opened this issue 5 years ago • 3 comments

The Zoom calendar extension for Google Calendar now stores data in a conferenceData object, as do Hangouts and Google Meet. It would be very helpful to have information on these in the agenda output.

Specifically, what I would like is to find the first entry_point in event["conferenceData"]["entryPoints"] with entry_point["entryPointType"] == "video" and output the URI.

conferenceData is described in the Google Calendar API for Events.

michaelmhoffman avatar May 13 '20 13:05 michaelmhoffman

What is needed is to create a new detail display. I would suggest --detail conference.

There is a lot of detail that could potentially be displayed but the conferenceData.entryPoints[].uri fields are the most important. Since I expect gcalcli is mainly run by power users, these might be the only outputs needed. I don't need to see the instructions or descriptions every time, just the entry point URIs.

For the text output, it is easy enough to display all entry points with their entryPointType. TSV output is slightly more challenging because there is a one-to-many relationship of events-to-entry points. So that the output is still a predictable, fixed number of columns for a given set of gcalcli options, I suggest adding only two columns: entryPoint.type and entryPoint.uri.

Alternatives for deciding which of the many entry points is added to the TSV output, with increasing complexity:

  1. Select only the first entry point (this works for my needs).
  2. Select only the first entry point that matches a specified priority entryPointType (default value: "video")
  3. Iterate over a set of priority entryPointTypes (default value: "video,phone,sip,more") and select only the first entry point that matches any of these. For example, if an event has both phone and sip entry points and the default priorities are set, only the phone entry point will be displayed.
  4. Display all entry points, space-separated. Spaces should not appear in URIs. Should escape any spaces with %20 in case they are supplied anyway. (This reduces complexity on the gcalcli side at the expense of added complexity on the side of whatever software consumes the output.)

Google Meet (built into Google Calendar) and Zoom for GSuite both populate the conferenceData properties and should be tested.

michaelmhoffman avatar May 13 '20 14:05 michaelmhoffman

Minimum of what needs changing for implementation:

  • [x] gcalcli.argparsers.DETAILS: add 'conference'
  • [x] gcalcli.gcal.GoogleCalendarInterface._PrintEvent(): text output
  • [x] gcalcli.gcal.GoogleCalendarInterface._tsv(): TSV output

Additional command-line or gcalclirc interface would be needed for prioritizing certain kinds of entry points (alternatives 2–3 above).

michaelmhoffman avatar May 13 '20 14:05 michaelmhoffman

This is implemented in michaelmhoffman/gcalcli@68fc986

michaelmhoffman avatar May 14 '20 16:05 michaelmhoffman