Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Zoom meeting functionality for Google Calendar #13

Open
califa opened this issue Aug 16, 2017 · 9 comments
Open

Add Zoom meeting functionality for Google Calendar #13

califa opened this issue Aug 16, 2017 · 9 comments

Comments

@califa
Copy link
Contributor

califa commented Aug 16, 2017

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!

@tamayg
Copy link

tamayg commented Sep 21, 2017

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

@califa
Copy link
Contributor Author

califa commented Sep 21, 2017

@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.

@jeeftor
Copy link
Owner

jeeftor commented Sep 23, 2017

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
Copy link
Owner

jeeftor commented Sep 23, 2017

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.

@califa
Copy link
Contributor Author

califa commented Sep 23, 2017

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

@califa
Copy link
Contributor Author

califa commented Sep 23, 2017

@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 🤔

@jeeftor
Copy link
Owner

jeeftor commented Sep 23, 2017

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. :)

@tamayg
Copy link

tamayg commented Sep 25, 2017

@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.

@jeeftor
Copy link
Owner

jeeftor commented Sep 26, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants