Skip to content

aandrewchen/googleCal.cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

93 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

googleCal.cli

googleCal.cli is a command-line interface tool built with Python3, Pytest, Typer, Google client library, and the Google Calendar API. It's designed to automate procedures and manage Google Calendar events.

Features

  • Create, read, update, and delete Google Calendar events πŸ“…
  • List upcoming events πŸ–ŠοΈ
  • Support for recurring events βœ…
  • Display events in a table format πŸ“‹
  • Start a timer for a quick event ⏱️

Requirements

Python 3.6+

Installation

Step 1:

Clone the repository and install the dependencies:

git clone https://github.com/aandrewchen/googleCal.cli.git
cd googleCal.cli
pip install -r requirements.txt

Step 2:

Create a Google Cloud project! Go to "Credentials" > "Create Credentials" > "OAuth client ID" (please select "Desktop app")

Download the credentials.json file and place it in the same directory as googleCal.cli!

Step 3:

Head over to your Google Calendar and find the calendar you want to manage!

Click on the three buttons on the side and go to "Settings and Sharing" > "Integrate calendar" > "Calendar ID" (it should end in @group.calendar.google.com).

Create a .env file with CALENDAR_ID="Calendar ID"

Step 4:

When you use googleCal.cli for the first time, the CLI will ask you to allow the application to access your Google Calendar. After that, you can start automating and managing your Google Calendar πŸ“… !

Usage

You can use the --help flag with any command to get information about how to use it.

Screenshot 2024-01-14 at 3 11 58 AM

Here are some examples of how to use googleCal.cli:

Get the next 3 events and display them in a table

python cli.py get 3 --table y

Screenshot 2024-01-14 at 3 09 31 AM

Create a new event

python cli.py create

Kapture 2024-01-14 at 22 36 35

Here is how to create that same event with arguments:

python cli.py create --summary "Dentist Appointment" --isrecurring n --date 2024-01-17 --start 11:00 --end 12:00 --color Peacock --confirm y

List ID of the next event in your calendar

Optionally include count to get the specified number of upcoming events

python cli.py list-id <count>

Delete an event by ID

Replace required id with the ID of the event you want to delete

python cli.py delete <id>

Screenshot 2024-01-14 at 3 24 58 AM

Start a timer for a quick event

python cli.py start

Stop timer

python cli.py stop

Screenshot 2024-01-14 at 11 15 51 PM

Testing

You can run the tests with Pytest:

pytest

To see test converage, run:

coverage run -m pytest

Contributing

Contributions are welcome! Please create a new issue if you find a bug or have a feature request. If you want to contribute code, please fork the repository and create a pull request.

Made by Andrew Chen

About

CLI Tool to automate procedures & manage Google Calendar πŸ“…

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages