Skip to content

olincollege/i-can-ical

Repository files navigation

I Can iCal Code Guide

Welcome to I Can iCal! This is a python project that aims to remove the hassle of converting dates from emails into events in your calendar. When running, I Can iCal acts as an email bot that receives any email and returns an iCal event created based on context from the email body and header. For security reasons, I Can iCal requires you provide your own email address to act as a bot.


Libraries

To get started we need to need to download the libraries for I Can iCal. Below is a short description of each library along with the code needed to install it in linux terminal. Each name in red is hyperlinked to further documentation on the package.

Dateparser

Dateparser provides the parse function which allows us to convert most simple strings that contain a date or time into a datetime datatype.

pip install dateparser

icalendar

icalendar allows us to provide a start time, end time, and other event details to receive an ical file to email.

pip install icalendar

email

Email creates an email type datatype that allows us to easily parse through received emails as well as send our own.

pip install email

Overview

This section will provide a overview of how this code works. The diagram below illustrates the relationship between the main functions and classes within I Can iCal.

overall code diagram



To run the overall code one simply has to type:

python icanical_main.py

But lets take a closer look at what is happening under the hood. As you can see, the main function is what connects the everything with the help of the model, which stores all of the data between the two classes. Main will prompt the user for an email address and password to create an email bot, facilitating all of the interactions to follow.

The controller class is what handles everything that involves receiving an email, decoding its contents, and figuring out what times or dates are located in the email, if any. If at least a time is found, then the controller sends it to the main where it is stored along with the end time and email header in the model.

Now that these details are in the model, the view class is what handles creating an iCal file from them. Once this file is created, it then attaches it to an email that is sent to the user, which emailed the email bot.

The main function assures that all of this happens in an infinite loop so it never stops unless the user terminates the code. Main will also send an error email to whoever emails the bot when an error does occur in the code.


Attributes and License

This code was written by Isha Goyal, Malvina Clavering, and Phillip Post. All are students at Olin college of engineering class of 2025. This code is under an Attribution-NonCommercial (CC BY-NC) license.

Website

For more information, visit our website: https://olincollege.github.io/i-can-ical/

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages