alfredToday icon indicating copy to clipboard operation
alfredToday copied to clipboard

Add Zoom meeting functionality for Google Calendar

Open califa opened this issue 8 years ago • 9 comments

Many companies don't use Hangouts, but rather Zoom (or Bluejeans) URLs, which they include as part of either the event's location or description (or both!)

This could also just mean enabling the Meeting Detection Regex option for Google Cal. I'm no regex expert, but as far as I can tell (http)s?:\/\/.*zoom.us\/.+\/\w+ seems to match everything for Zoom:

http://zoom.us/j/5551112222
https://company.zoom.us/j/483719928
https://company.zoom.us/my/vanityurl
https://zoom.us/my/vanityurl

And excludes meeting rooms listed before or after, or parentheses:

http://zoom.us/j/5551112222, MeetingRoom
Meetingroom, http://zoom.us/j/5551112222
(http://zoom.us/j/5551112222)

My last gig used Hangouts and the ability to open my next meeting directly from Alfred felt like magic. I'd love to help make this happen for Zoom as well :)

Thanks!

califa avatar Aug 16 '17 14:08 califa

this could get you started. find the matching lines in event_processor.py and replace ..


       # Pick icon color based on end time
       now = datetime.now(pytz.utc)

       if dateutil.parser.parse(enddt) < now and not all_day_event:
           self.PAST_ITEMS.append(Item3(title, subtitle, arg=url, quicklookurl=description_url, type=u'file', valid=True, icon="img/eventGoogleGray.png"))
       else:
           iconfile = 'img/googleEvent_' + str(event.get('color',1)) +'.png'
           self.FUTURE_ITEMS.append(Item3(title, subtitle, arg=url, quicklookurl=description_url, icon=iconfile, valid=True))
           try:
               hangout_url = event.get('hangoutLink')
               #this code always prefers zoom links over hangouts. zoom links from event location are preferred over event description.
               zoom_url = self.check_zoom(loc) if self.check_zoom(loc) else self.check_zoom(body_html)
               conf_url = zoom_url if zoom_url is not None else hangout_url
               conf_title = u'\u21aa Join Conference'
               conf_subtitle = "        " + conf_url
               self.FUTURE_ITEMS.append(Item3(conf_title, conf_subtitle, arg=conf_url, valid=True, icon='img/hangout.png'))
           except:
               pass


   def check_zoom(self, searchContent):
       import re
       m = re.search('(https?:\/\/.*zoom.us\/.+\/\w+)', searchContent)
       return m.group(1) if m else None

tamayg avatar Sep 21 '17 15:09 tamayg

@tamayg thanks so much! That didn't work as is, but adding the contents from check_zoom directly into the try: area seemed to do the trick.

califa avatar Sep 21 '17 23:09 califa

Do you one of you guys want to add a pull request? Would make stuff easier to do! :) I suspect you already implemented the code @califa since it looks like you have this setup in #16

jeeftor avatar Sep 23 '17 01:09 jeeftor

My ultimate goal - of course - was to have a much more generic and/or usable meeting detection logic. I know there is GoTo meeting, WebEx and other assorted meeting URLs i've run into.

jeeftor avatar Sep 23 '17 01:09 jeeftor

@jeeftor I'll open a PR and ask for review since I don't actually know Python lol

califa avatar Sep 23 '17 08:09 califa

@jeeftor Actually, it seems like a bunch of things changed in master recently and I'm not well versed enough to code this in a non-hacky way. You can see I did almost exactly what @tamayg advised here, but with hard coded conditionals: https://github.com/califa/alfredToday/blob/master/src/event_processor.py#L117

I think maybe this stuff should exist as its own select_voip method, but I'm not sure how to implement that 🤔

califa avatar Sep 23 '17 08:09 califa

I'll put this on my infinite to-do list. And will probably eventually get to it. Don't have as much time to work on fun projects as i used to lately. :)

jeeftor avatar Sep 23 '17 11:09 jeeftor

@jeeftor you can leave this to me. I'll just have to finish some stuff this week and will create a more generalized variant afterwards and submit PR.

tamayg avatar Sep 25 '17 23:09 tamayg

Awesome!

Sent from my iPhone

On Sep 25, 2017, at 7:16 PM, tamayg [email protected] wrote:

@jeeftor you can leave this to me. I'll just have to finish some stuff this week and will create a more generalized variant afterwards and submit PR.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

jeeftor avatar Sep 26 '17 14:09 jeeftor