Jump to content

Open Conference URL - Launch the Zoom/Meet call for your next calendar event


Recommended Posts

With the "new normal", many of us are working from home and jumping from one virtual meeting to the next to the next: from Zoom to Google Meet to GoToMeeting, etc. To save the pain of scrambling to open your next meeting link, I have written a workflow just for that!

 

It's called "Open Conference URL", and its usage is simple: type conf to see your upcoming calendar events. Hit Enter to launch Zoom/Meet/etc. immediately. And even if you are 15 minutes late, the workflow will know what to do. (Download Workflow)

 

screenshot.png.14661d01437ed11cc74517a66867043a.png

If there are no nearby calendar events, the workflow displays all events for today:

 

screenshot-noresults.png.9fa32e1731a641476eeaa6d49e4141ee.png

Download Workflow

 

For documentation on all the configurable preferences, see the project's GitHub page: https://github.com/caleb531/open-conference-url

Link to comment

I'm getting an error in cache.py:

 

  File "ocu/cache.py", line 42, in __init__
    self.refresh()
  File "ocu/cache.py", line 110, in refresh
    if self.get('event_blobs') != event_blobs:
  File "ocu/cache.py", line 77, in get
    return self.__dict__[key]
KeyError: u'event_blobs'

 

You’re using dict incorrectly. dict[key] always throws a KeyError if a key doesn’t exist.

 

    # Return True if the given key exists in the cache; otherwise, return false
    def has(self, key):
        if self.__dict__[key]:
            return True
        else:
            return False

    # Return True if the given key exists in the cache; otherwise, return false
    def get(self, key):
        return self.__dict__[key]

 

I think you mean to be using self.__dict__.has_key() and self.__dict__.get()? If you’re going to store data in __dict__, you might as well inherit from dict instead of object.

 

It's not a good idea to store user preferences in the workflow's own folder: they'll get overwritten by a workflow update. If you can't or don't want to store them in info.plist as workflow environment variables, put them in the workflow's data directory.

Link to comment
On 11/22/2020 at 11:46 PM, deanishe said:

I think you mean to be using self.__dict__.has_key() and self.__dict__.get()? If you’re going to store data in __dict__, you might as well inherit from dict instead of object.

 

Im having exactly this error, i'm just a rookie developer and tried this change you mention but still does not work for me, could you lend a hand?
 

    from ocu.cache import cache
  File "ocu/cache.py", line 130, in <module>
    cache = Cache()
  File "ocu/cache.py", line 42, in __init__
    self.refresh()
  File "ocu/cache.py", line 110, in refresh
    if self.get('event_blobs') != event_blobs:
  File "ocu/cache.py", line 77, in get
    return self.__dict__.get([key])
TypeError: unhashable type: 'list'

 

Link to comment
  • 3 weeks later...
  • 2 weeks later...
  • 3 weeks later...

Yeah it looks like the version that's current on master branch on github works great! BUT the most recent packaged version, v2.0.1 is broken.

 

@caleb531 If you release the current state of the master branch it'll fix this issue! But v2.0.1 throws an error and fails bc of the issue identified above (self.get() in cache.py is broken, it throws a KeyError bc neither it nor has() actually safely check whether the key exists)

 

Also btw... this workflow is EXTREMELY cool, thank you for building it!!

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...