Open califa opened 7 years ago
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 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.
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
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 I'll open a PR and ask for review since I don't actually know Python lol
@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 🤔
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 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.
Awesome!
Sent from my iPhone
On Sep 25, 2017, at 7:16 PM, tamayg notifications@github.com 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.
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:And excludes meeting rooms listed before or after, or parentheses:
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!