Skip to content

Generates availabilities as text to be inserted anywhere, checking with Google Calendar API

License

Notifications You must be signed in to change notification settings

ndeville/calendee

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

calendee

Python scripts interfacing with Google Calendar.

availabilities.py

Notes: https://notes.nicolasdeville.com/projects/calendee

Working code, used via keyboard shortcuts using Alfred (optional).

variables

are available_days, available_hours & timezones:

available_days = [ # comment lines below to make unavailable
    "Mon",
    "Tue",
    "Wed",
    "Thu",
    "Fri",
]

available_hours = [ # comment lines below to make unavailable
    # "08:00",
    # "09:00",
    # "10:00",
    "11:00",
    # "11:30",
    "12:00",
    # "13:00",
    # "14:00",
    # "15:00",
    "16:00",
    # "16:30",
    "17:00",
    # "18:00",
    # "19:00",
]


timezones = { # This will define the return time & format
    "CET": 0, # default
    "UK": 1, # timezone offset in hours
    "ET": 6,
    "MT": 7,
    "PT": 9,
}

outputs

Standard:

(CET / Germany time)

- tomorrow 11:00, 12:00 or 16:00
- Mon 20th 11:00, 12:00, 16:00 or 17:00
- Tue 21st 11:00, 12:00, 16:00 or 17:00

or see all at https://cal.com/ndeville

UK:

(UK time)

- tomorrow 10am, 11am or 3pm
- Mon 20th 10am, 11am, 3pm or 4pm
- Tue 21st 10am, 11am, 3pm or 4pm

or see all at https://cal.com/ndeville

PT:

(PT)

- tomorrow 2am, 3am or 7am
- Mon 20th 2am, 3am, 7am or 8am
- Tue 21st 2am, 3am, 7am or 8am

or see all at https://cal.com/ndeville

meetings.py

Added 16 Mar 2023

Notes: https://notes.nicolasdeville.com/projects/calendee#Meetings

Working code.

Fetches all events with attendees from a Google Calendar, and returns a list of events objects with the following attributes:

class Meeting:
    def __init__(self):
        self.id = '' # from Google
        self.summary = ''
        self._date = '' # from Google 'start' in YYYY-MM-DD format
        self.htmlLink = ''
        self.attendees = set() # unique emails from both 'attendees' and 'organiser'
        self.description = ''
        self.domain = '' # WARNING: this caters only for 1 domain per meeting

About

Generates availabilities as text to be inserted anywhere, checking with Google Calendar API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages