A script to extract calendar data from an Outlook for Mac archive and format it for use in an Excel Sheet. Participants will be attempted to be matched to contacts, also saved in an Excel Sheet.
-
Install dependencies using the
init.sh
script by running./init.sh
in the terminal. -
Create a .env file in the root directory with the following variables. See .env.example for an example:
YOUR_EMAIL
: Your email addressIGNORE_PHRASES
: A comma-separated list of phrases to ignore in the calendar eventsCONTACTS_FILE
: The name of the contacts file to use. This file should be in thedata
directory.SAVE_FILE
: The name of the file to save the calendar data to. This file will be saved/read from thedata
directory.
- Add a
Contacts.xlsx
(or otherwise specified in .env) file in the root directory with the following columns:
Name
: The name of the contactAffiliation
: The affiliation of the contactType
: The type of contactRole
: The role of the contactEmail
: The email address of the contact
-
Extract the calendar data from Outlook for Mac and save it in the
data/Outlook for Mac Archive
directory. It will be exported as an .olm file, extract it like a normal .zip file. -
Run the script by running
python CalendarExtract.py
in the terminal, oruv run CalendarExtract.py
if using uv. -
The script will create an
Calendar.xlsx
file in the data directory (name specifified in .env, or different location set in .env).