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

ENH/WIP: add a free command #528

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

jklymak
Copy link

@jklymak jklymak commented Apr 18, 2020

This is not at all feature complete, but I was looking for a way to see when I am free during the working day. Here is a quick hack of that that I thought I would share fi anyone else was interested in taking it up.

% gcalcli free

Availability Apr 18 - Apr 26
----------------------------

Sat Apr 18 09:00 to 17:00

Sun Apr 19 09:00 to 12:00
           14:00 to 17:00

Mon Apr 20 09:00 to 10:30
           11:30 to 12:00
           13:00 to 13:30
           14:30 to 17:00

Tue Apr 21 09:00 to 12:00
           13:00 to 17:00

Wed Apr 22 09:00 to 12:30
           13:30 to 13:30
           14:30 to 14:30
           15:30 to 15:30
           16:30 to 17:00

Thu Apr 23 09:00 to 15:00
           16:00 to 17:00

@jcrowgey
Copy link
Collaborator

This looks really useful, thanks! I hope someone can push this over the finish line.

@jklymak
Copy link
Author

jklymak commented Dec 6, 2021

@jcrowgey Thanks for the encouragement. I think it is close now, including timezone help. I invested a day doing this because a) I cannot find any other way to get free blocks, and b) I'm 9 h timezone away from most of my firm meetings so requests like "when can you meet 6 Dec to 16 Dec" were becoming onerous...

Now we have:

gcalcli --calendar='My Calendar' --calendar='Busy' free --timezone='US/Pacific' --daystart=07:00 --dayend=18:00 --mintime=30

to return free slots in my calendar 30 minute or longer, between 07:00 and 18:00 PST.

Availability Dec 05 - Dec 13
----------------------------
Timezone: PST
Sun Dec 05:
Mon Dec 06:
        07:00 to 08:30
Tue Dec 07:
        10:15 to 13:30
Wed Dec 08:
Thu Dec 09:
        07:00 to 08:15
Fri Dec 10:
        07:00 to 08:15
        12:00 to 13:30
Sat Dec 11:
        07:00 to 13:30
Sun Dec 12:
        07:00 to 13:30
Mon Dec 13:
        07:00 to 08:30

Needs tests, which I'm not finding easy to parse, so if anyone has suggestions for an example to follow...

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

Successfully merging this pull request may close these issues.

2 participants