diff --git a/ChangeLog b/ChangeLog index fc183a9..1fb7963 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +v4.3.0 + * Adds 'conference' to details display (michaelhoffman) + v4.2.1 * Remove python2 support * Allow flexible notion for durations (flicken) diff --git a/gcalcli/__init__.py b/gcalcli/__init__.py index c8c4a9f..3486c10 100644 --- a/gcalcli/__init__.py +++ b/gcalcli/__init__.py @@ -1,5 +1,5 @@ __program__ = 'gcalcli' -__version__ = 'v4.2.1' +__version__ = 'v4.3.0' __author__ = 'Eric Davis, Brian Hartvigsen, Joshua Crowgey' __API_CLIENT_ID__ = '232867676714.apps.googleusercontent.com' __API_CLIENT_SECRET__ = '3tZSxItw6_VnZMezQwC8lUqy' diff --git a/gcalcli/argparsers.py b/gcalcli/argparsers.py index 12de2eb..07e5e4a 100644 --- a/gcalcli/argparsers.py +++ b/gcalcli/argparsers.py @@ -11,7 +11,7 @@ import locale DETAILS = ['calendar', 'location', 'length', 'reminders', 'description', - 'url', 'attendees', 'email', 'attachments', 'end'] + 'url', 'conference', 'attendees', 'email', 'attachments', 'end'] PROGRAM_OPTIONS = { diff --git a/gcalcli/gcal.py b/gcalcli/gcal.py index ade8f60..0cfcad1 100644 --- a/gcalcli/gcal.py +++ b/gcalcli/gcal.py @@ -603,6 +603,21 @@ output += '\t%s' % (event['hangoutLink'] if 'hangoutLink' in event else '') + if self.details.get('conference'): + conference_data = (event['conferenceData'] + if 'conferenceData' in event else None) + + # only display first entry point for TSV + # https://github.com/insanum/gcalcli/issues/533 + entry_point = (conference_data['entryPoints'][0] + if conference_data is not None else None) + + output += '\t%s' % (entry_point['entryPointType'] + if conference_data is not None else '') + + output += '\t%s' % (entry_point['uri'] + if conference_data is not None else '') + output += '\t%s' % self._valid_title(event).strip() if self.details.get('location'): @@ -710,6 +725,15 @@ hlink = event['hangoutLink'] xstr = '%s Hangout Link: %s\n' % (details_indent, hlink) self.printer.msg(xstr, 'default') + + if self.details.get('conference') and 'conferenceData' in event: + for entry_point in event['conferenceData']['entryPoints']: + entry_point_type = entry_point['entryPointType'] + hlink = entry_point['uri'] + xstr = '%s Conference Link: %s: %s\n' % (details_indent, + entry_point_type, + hlink) + self.printer.msg(xstr, 'default') if self.details.get('location') \ and 'location' in event \ diff --git a/setup.py b/setup.py index 3425761..0377d89 100644 --- a/setup.py +++ b/setup.py @@ -28,6 +28,7 @@ license='MIT', packages=['gcalcli'], data_files=[('share/man/man1', ['docs/man1/gcalcli.1'])], + python_requires='>=3', install_requires=[ 'python-dateutil', 'google-api-python-client>=1.4',