Coder Social home page Coder Social logo

calendly-cli's Introduction

Calendly on the Command Line

Why?

I had a specific problem I wanted to solve:

  • Lots of scheduling emails each day
  • Scheduling emails between more than one party. Normally, I'd just send my calendly link, but that doesn't work well with groups of people.
  • I hate finding open times in my calendar, especially if I'm sending multiple time options to multiple people. It's weirdly time consuming for me, mainly because I have complex "rules" for calendaring to coordinate between family life, day-job, personal committments, and side projects.

The solution? A CLI tool to spit out a bunch of open times in my calendar.

Implementation Details

There are some specific features I wanted:

  • Exclude weekend times
  • Easily select times in a different timezone
  • Command line interface so I can easily connect to Alfred/Raycast
  • Pick a "nice" list of times: semi-randomized, across multiple days, etc to allow the receiver to have a nice array of options

Usage

Usage: cli.py [OPTIONS]

  Generate time options based off of a calendly account

Options:
  --duration INTEGER       Number of minutes to schedule  [default: 30]
  --days INTEGER           Number of days in advance to pick from  [default:
                           30]
  --timezone TEXT          Default timezone to pick times from  [default:
                           America/Denver]
  --after-hour INTEGER     Only pick events after this hour (24hr format)
  --total INTEGER          Number of slots per event  [default: 5]
  --events INTEGER         Number of events to schedule  [default: 3]
  --slots-per-day INTEGER  Number of slots per day  [default: 3]
  --api-key TEXT           API key. Sourced from CALENDLY_API_KEY as well
  --help                   Show this message and exit.

Development

poetry install
poetry shell

# either use ipython with `run main.py` to play around with the code
ipython

# or run the command directly and start tinkering

API Hacking

You can play with the calendly API using httpie really easily.

source .env

http GET https://api.calendly.com/users/me Authorization:"Bearer $CALENDLY_API_KEY" Content-Type:application/json

The "current_organization" key contains the org URL which doesn't seem to be exposed in the UI at all (at least on basic accounts).

calendly-cli's People

Contributors

dependabot[bot] avatar iloveitaly avatar jaycuthrell avatar noinarisak avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.