Jump to content
jeffsui

Today View for Google Calendar and Microsoft Exchange

Recommended Posts

Wow, I completely missed it. It is great !We even have the description in there !

I agree that it could use some work (less empty space and more color ? ), but it is definitely impressive already.

I can't thank you enough for your workflow !

Share this post


Link to post

Hi,

 

Not sure this is a big issue or maybe I did something wrong.

But I am getting a message when I hit Today just on top of my schedule saying "A newer version is available"

I was on 4.1, so I hit enter and nothing.

Went on GitHub, seen there was a 4.3, updated to it, but still getting the same message.

 

I capture of this message.

Screen Shot 2016-09-30 at 05.24.09.png

 

And my logs just in case :

 

05:25:03 today.py:290 INFO             ______          __
05:25:03 today.py:291 INFO            /_  __/___  ____/ /___ ___  __
05:25:03 today.py:292 INFO             / / / __ \/ __  / __ `/ / / /
05:25:03 today.py:293 INFO            / / / /_/ / /_/ / /_/ / /_/ /
05:25:03 today.py:294 INFO           /_/  \____/\__,_/\__,_/\__, /
05:25:03 today.py:295 INFO                                 /____/
05:25:03 workflow.py:2156 DEBUG    Workflow version : 4.3.0
05:25:03 workflow.py:1568 DEBUG    Reading settings from `/Users/EH/Library/Application Support/Alfred 3/Workflow Data/org.jeef.today/settings.json` ...
05:25:03 workflow.py:2438 DEBUG    Update check not due
05:25:03 workflow.py:1799 DEBUG    Loading cached data from : /Users/EH/Library/Caches/com.runningwithcrayons.Alfred-3/Workflow Data/org.jeef.today/__workflow_update_status.cpickle
05:25:03 workflow.py:2368 DEBUG    update_data : {u'available': True, u'version': u'v4.3', u'download_url': u'https://github.com/jeeftor/alfredToday/releases/download/v4.3/Alfred_Today-4.3.0.alfredworkflow'}
05:25:03 today.py:43 DEBUG    query : u'0'
05:25:03 today.py:67 INFO     2016-09-30T04:00:01.220320+00:00			2016-10-01T03:59:59.220376+00:00
05:25:03 today.py:86 DEBUG    -- FG: CacheKey (Google)   google.Today
05:25:03 today.py:87 DEBUG    -- FG: CacheKey (Exchange) exchange.Today
05:25:03 today.py:105 DEBUG    Max Age: 9000  Cache Age Google:  55   Exchange: 0
05:25:03 today.py:127 DEBUG    --FG:   Use Exchange:False
05:25:03 today.py:128 DEBUG    --FG: Exchange Fresh:False
05:25:03 workflow.py:1799 DEBUG    Loading cached data from : /Users/EH/Library/Caches/com.runningwithcrayons.Alfred-3/Workflow Data/org.jeef.today/google.Today.cpickle
05:25:03 background.py:188 DEBUG    Command arguments cached to `/Users/EH/Library/Caches/com.runningwithcrayons.Alfred-3/Workflow Data/org.jeef.today/update_google.argcache`
05:25:03 background.py:192 DEBUG    Calling [u'/usr/bin/python', '/Users/EH/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows/user.workflow.99B79A2E-BEFC-461A-AC92-48A0C11015D2/workflow/background.pyc', 'update_google'] ...
05:25:03 workflow.py:2156 DEBUG    Workflow version : 4.3.0
05:25:03 workflow.py:2194 DEBUG    Workflow finished in 0.017 seconds.
05:25:03 workflow.py:2194 DEBUG    Workflow finished in 0.018 seconds.
05:25:03 background.py:236 DEBUG    Task `update_google` running
05:25:03 background.py:237 DEBUG    cmd : ['/usr/bin/python', u'/Users/EH/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows/user.workflow.99B79A2E-BEFC-461A-AC92-48A0C11015D2/query_google.py', '2016-09-30T04:00:01.220320+00:00', '2016-10-01T03:59:59.220376+00:00', '0']
05:25:03 background.py:197 DEBUG    Executing task `update_google` in background...
05:25:03 today.py:231 DEBUG    **FG --- Google: All Day Extreme prema. ethique
05:25:03 today.py:250 INFO     Event Count   Google: 1
05:25:03 today.py:251 INFO     Event Count Exchange: 0
05:25:03 today.py:252 INFO     Event Count    Total: 1
05:25:03 workflow.py:2351 DEBUG    Set last run version : 4.3.0
05:25:03 workflow.py:2194 DEBUG    Workflow finished in 0.192 seconds.
05:25:03 workflow.py:2156 DEBUG    Workflow version : 4.3.0
05:25:03 query_google.py:25 DEBUG    BG GOOGLE: STARTED
05:25:03 query_google.py:36 DEBUG    BG: query : u'2016-09-30T04:00:01.220320+00:00'
05:25:03 query_google.py:42 DEBUG    [u'2016-09-30T04:00:01.220320+00:00', u'2016-10-01T03:59:59.220376+00:00', u'0']
05:25:03 query_google.py:63 DEBUG    -- BG: CacheKey  (Google)   google.Today
05:25:03 query_google.py:64 DEBUG    -- BG: NotifyKey (Google)   Today
05:25:03 workflow.py:1799 DEBUG    Loading cached data from : /Users/EH/Library/Caches/com.runningwithcrayons.Alfred-3/Workflow Data/org.jeef.today/google.Today.cpickle
05:25:03 query_google.py:15 INFO     BG: Querying Google Calendar
05:25:03 query_google.py:16 INFO     BG:     param: start_google = 2016-09-30T04:00:01.220320+00:00
05:25:03 query_google.py:17 INFO     BG:     param:   end_google = 2016-10-01T03:59:59.220376+00:00
05:25:03 query_google.py:18 INFO     BG:     param:   date_offset = 0
05:25:03 workflow.py:1568 DEBUG    Reading settings from `/Users/EH/Library/Application Support/Alfred 3/Workflow Data/org.jeef.today/settings.json` ...
05:25:03 GoogleInterface.py:170 INFO     Querying calender [9c5fm2sp93jh69uglm3tqevn0s@group.calendar.google.com]
05:25:03 GoogleInterface.py:177 INFO     * Google returned 1 events
05:25:03 GoogleInterface.py:170 INFO     Querying calender [rrnb0pc7e8ans3qva0ql55d188@group.calendar.google.com]
05:25:03 GoogleInterface.py:177 INFO     * Google returned 0 events
05:25:03 GoogleInterface.py:170 INFO     Querying calender [945l8upqsp7bimpijb9hr9hcko@group.calendar.google.com]
05:25:03 GoogleInterface.py:177 INFO     * Google returned 0 events
05:25:03 GoogleInterface.py:170 INFO     Querying calender [assonef@gmail.com]
05:25:03 GoogleInterface.py:177 INFO     * Google returned 0 events
05:25:03 workflow.py:1834 DEBUG    Cached data saved at : /Users/EH/Library/Caches/com.runningwithcrayons.Alfred-3/Workflow Data/org.jeef.today/google.Today.cpickle
05:25:03 query_google.py:77 DEBUG    **BG --- Google Old: {u'date': u'2016-09-30'} Extreme prema. ethique
05:25:03 query_google.py:83 DEBUG    **BG --- Google New: {u'date': u'2016-09-30'} Extreme prema. ethique
05:25:03 query_google.py:98 DEBUG    Old Set: set([u'kp864fud8g7bifhhe3tevk8i0k:2016-09-29T06:56:30.277Z:All_Day'])
05:25:03 query_google.py:99 DEBUG    New Set: set([u'kp864fud8g7bifhhe3tevk8i0k:2016-09-29T06:56:30.277Z:All_Day'])
05:25:03 query_google.py:105 DEBUG    -- BG: Changed Event Count: 0
05:25:03 query_google.py:121 DEBUG    --- TERMINATING --
05:25:03 workflow.py:2351 DEBUG    Set last run version : 4.3.0
05:25:03 workflow.py:2194 DEBUG    Workflow finished in 0.499 seconds.
05:25:03 background.py:248 DEBUG    Task `update_google` finished
05:25:03 workflow.py:1568 DEBUG    Reading settings from `/Users/EH/Library/Application Support/Alfred 3/Workflow Data/org.jeef.today/settings.json` ...
05:25:03 workflow.py:2351 DEBUG    Set last run version : 4.3.0
05:25:03 workflow.py:2194 DEBUG    Workflow finished in 0.677 seconds.
05:25:08 workflow.py:2156 DEBUG    Workflow version : 4.3.0
05:25:08 workflow.py:1568 DEBUG    Reading settings from `/Users/EH/Library/Application Support/Alfred 3/Workflow Data/org.jeef.today/settings.json` ...
05:25:08 workflow.py:2438 DEBUG    Update check not due
05:25:08 workflow.py:1799 DEBUG    Loading cached data from : /Users/EH/Library/Caches/com.runningwithcrayons.Alfred-3/Workflow Data/org.jeef.today/__workflow_update_status.cpickle
05:25:08 workflow.py:2368 DEBUG    update_data : {u'available': True, u'version': u'v4.3', u'download_url': u'https://github.com/jeeftor/alfredToday/releases/download/v4.3/Alfred_Today-4.3.0.alfredworkflow'}
05:25:08 magic.py:17 DEBUG    query : u''
05:25:08 workflow.py:2351 DEBUG    Set last run version : 4.3.0
05:25:08 workflow.py:2194 DEBUG    Workflow finished in 0.019 seconds.
05:25:16 workflow.py:2156 DEBUG    Workflow version : 4.3.0
05:25:16 workflow.py:1568 DEBUG    Reading settings from `/Users/EH/Library/Application Support/Alfred 3/Workflow Data/org.jeef.today/settings.json` ...
05:25:16 workflow.py:2438 DEBUG    Update check not due
05:25:16 workflow.py:1799 DEBUG    Loading cached data from : /Users/EH/Library/Caches/com.runningwithcrayons.Alfred-3/Workflow Data/org.jeef.today/__workflow_update_status.cpickle
05:25:16 workflow.py:2368 DEBUG    update_data : {u'available': True, u'version': u'v4.3', u'download_url': u'https://github.com/jeeftor/alfredToday/releases/download/v4.3/Alfred_Today-4.3.0.alfredworkflow'}
05:25:16 workflow.py:1335 DEBUG    Opening workflow log file
05:25:16 workflow.py:2194 DEBUG    Workflow finished in 0.159 seconds.

 

Share this post


Link to post

This is strange.  It's the second time its popped up: (https://github.com/jeeftor/alfredToday/issues/5)

 

They did the command:

dbgtoday workflow:deletecache

 

And that seemed to fix the issue.

 

 

 

So looking at your  logs here it pulls down:  

Quote

05:25:03 workflow.py:1799 DEBUG    Loading cached data from : /Users/EH/Library/Caches/com.runningwithcrayons.Alfred-3/Workflow Data/org.jeef.today/__workflow_update_status.cpickle
05:25:03 workflow.py:2368 DEBUG    update_data : {u'available': True, u'version': u'v4.3', u'download_url': u'https://github.com/jeeftor/alfredToday/releases/download/v4.3/Alfred_Today-4.3.0.alfredworkflow'}
 

 

version 4.3

 

Quote

05:25:03 workflow.py:2351 DEBUG    Set last run version : 4.3.0
 

 

But its also reporting the the last run version is 4.3.0

 

I wonder if this is at all related???

 

 

@deanishe Am I calling the workflow update stuff correctly?

 

 

if __name__ == '__main__':
    wf = Workflow3(libraries=['./lib'],
                   help_url=HELP_URL,
                   update_settings={
                       'github_slug': 'jeeftor/alfredToday',
                       'frequency': 7}
                   )

 

def main(wf):

  # A bunch of imports statements go here..

  # Check to see if updates are available
    if wf.update_available:

        wf.add_item('A newer version is available',
                '↩ to install update',
                icon='update-available.png', arg='update', valid=True)

 

Share this post


Link to post

Hi Jeff,

 

the delete cache command did the trick ! Will keep it in mind.

 

It appears when I was still on v4.1 in fact.

I tried to update, but nothing happened. That is when I went to GitHub to download the latest version.

 

Not sure how it could have been able to update "automatically" in fact. What is supposed to happen when typing enter on this update message ?

 

Thanks 

Share this post


Link to post
3 hours ago, jeffsui said:

 

@deanishe Am I calling the workflow update stuff correctly?


if __name__ == '__main__':
    wf = Workflow3(libraries=['./lib'],
                   help_url=HELP_URL,
                   update_settings={
                       'github_slug': 'jeeftor/alfredToday',
                       'frequency': 7}
                   )

 

 

This bit looks correct.

 

Quote

 


def main(wf):

  # A bunch of imports statements go here..

  # Check to see if updates are available
    if wf.update_available:

        wf.add_item('A newer version is available',
                '↩ to install update',
                icon='update-available.png', arg='update', valid=True)

 

 

I don't know what's going on here because you've wrapped up the magic args in your own code.

 

To be honest, I deleted the workflow when you turned off SSL certificate verification. I'm not comfortable with a workflow designed to be insecure.

 

2 hours ago, MEs said:

Not sure how it could have been able to update "automatically" in fact. What is supposed to happen when typing enter on this update message ?

 

Normally, the Alfred-Workflow library will intercept that call, download the latest release from GitHub and then ask Alfred to install it. Jeff has wrapped his own code around that, but I think he's still using AW's update mechanism. It only checks for updates automatically. It won't download or install anything without the user telling it to.

 

I can't say why the update mechanism is playing up because, as noted, Jeff has wrapped his own code around it and I've deleted the workflow from my system.

Edited by deanishe

Share this post


Link to post

To clarify:

 

SSL IS ENABLED BY DEFAULT (as of version 3.9.2)

 

a user does have the ability to disable it in the TC menu

 

So if i understand magic arguments must be working correctly for the download to work.  That explains something I think...

 

But you cant have magic arguments + alfred result filtering correct?

 

Thanks.

 

 

If you want to give the workflow another shot security is completely baked in.

Edited by jeffsui

Share this post


Link to post

AHA (potentially)

1) The update script wasn't included in the workflow

2) there was an indentation issue with the code so it wouldn't have worked anyways.

 

New update coming soon - and then maybe i'll push another update out the next day to test the update functionality.

Share this post


Link to post
3 hours ago, jeffsui said:

SSL IS ENABLED BY DEFAULT (as of version 3.9.2)

 

I know you turned certificate verification back on. Ultimately, I'm paranoid, and your deliberately breaking SSL by default is a big, red flag to me. I understand that you need to build security holes into the workflow or it won't work for you, but that's a "feature" I really don't want in my workflows. If it isn't in there, there can't be bugs in it.

 

3 hours ago, jeffsui said:

So if i understand magic arguments must be working correctly for the download to work.

 

No, it's not necessary for magic args to work. By design, they all point to various Workflow methods that you can call yourself.

 

3 hours ago, jeffsui said:

But you cant have magic arguments + alfred result filtering correct?

 

Right. If you have Alfred filters results turned on, Alfred doesn't pass the user's query to your script, so AW has no input it can check for magic args.

 

But as I mentioned before, I think Alfred filters results is a bad fit for this workflow because Alfred doesn't understand that the Hangout/Skype items are "sub-items" of the event results. If you leave the filtering up to Alfred, it may hide all the Hangout/Skype items, hide everything but the Hangout/Skype items, or place them alongside the wrong event items.

 

To keep the Hangout/Skype items in a filtered results list (and keep them in the right places), you'll have to implement that logic yourself (e.g. by using Workflow.filter() on your events, then adding the corresponding Hangout/Skype items as you call Workflow.add_item() on each event).

Edited by deanishe

Share this post


Link to post

Since 4.3.1 (not sure if 4.3.0 has been affected too), Tomorrow shows me tomorrow events AND the day after tomorrow full day events. I guess this has something to do with the fact full day events are scheduled by default in Google to begin at midnight (12:00AM).

 

Not a big issue, but maybe something to consider.

 

Regrads

Share this post


Link to post

How would you sugg st I do this? 

 

Show just the remaining days in the week below? 

 

Or... show the full week? And you just have to navigate through?

 

happy to give it a whirl

Share this post


Link to post

Would be great, but not sure the result would be so great if you have too much appointments every day... might be a long and messy list of results.

So far I am pleased with the today and tomorrow feature. But if a view of a full week is possible, why not !

 

By the way, have you been able to get around the "full day" bug ?

Share this post


Link to post
2 minutes ago, hakin said:

This is the error I am getting. Any ideas ?

Screen Shot 2016-11-28 at 9.40.25 AM.png

Hmm..

 

obviously i'm pointing something out that i thought was always going to be a string.  Do you have any meetings that have a number as their name or something?  Are you using google or outlook or both?

 

Could you open the: dbgtoday and open the log and send me the output?

 

That might help things.  In about 2 weeks i'm going to be on travel and have some time to work on making changes on the airplane.  Did the plugin ever work before also?  If we can find the line where its erring this should be an easy fix and i can get that done prob today.

 

Share this post


Link to post
5 hours ago, jeffsui said:

Hmm..

 

obviously i'm pointing something out that i thought was always going to be a string.  Do you have any meetings that have a number as their name or something?  Are you using google or outlook or both?

 

Could you open the: dbgtoday and open the log and send me the output?

 

That might help things.  In about 2 weeks i'm going to be on travel and have some time to work on making changes on the airplane.  Did the plugin ever work before also?  If we can find the line where its erring this should be an easy fix and i can get that done prob today.

 

 

 

Sent the log. Yeah,  I just checked my meeting names, they have [],-,/,: characters in them. 

 

I installed this yesterday and I didnt have any meetings yesterday. Butt it wasn't giving any errors either. I am using only Outlook. Thanks a lot. 

Edited by hakin

Share this post


Link to post

Can you try to set a regex in the Exchange Detection Regex   just put something like TEST in there and see if it works (its under the tc menu)

 

It crashed on line 200:      self.wf.logger.info('Regex: ' + REGEX)

 

which to me looks like its trying to print out something that does not exist (aka the REGEX variable).  

Edited by jeffsui

Share this post


Link to post

Hi everyone, I'm using the latest version of this workflow however I'm having this weird issue where when I query today the workflow show tomorrow's events not today's events. I tried to reset the workflow but that didn't work. Any suggestions? Thank you.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...