Calculate total time for month, day and events - grouped by the same event name
Report Bug
·
Request Feature
- Fetch all events from specified Google Calendar
- Calculate total time for events grouped by event name
- Calculate total time for each day
- Calculate total time for each month
- Python
- Google calendar
Clone repository
git clone https://github.com/DEENUU1/google-calendar-time-tracker.git
Create virtual env (this may be different on Linux / MacOS)
python3 -m .venv .venv
.venv/Scripts/activate
Install requirements
pip install -r requirements.txt
Create .env file and set up Google account
- You need to add
credentials.json
in this directory - see how to get it - https://www.youtube.com/watch?v=B2E82UPUnOY&t=1037s - Then add CALENDAR_ID to the
.env
file - see how to get it - https://it.umn.edu/services-technologies/how-tos/google-calendar-find-your-google
cp .env_example .env
Run script and add optional parameters
python main.py
python main.py --skip="Deadline, deadline, ..."
# For example if the Event starts with "Deadline" it's gonna be skipped
# and not counted to the finall result
python main.py --year=2024 --month=5
python main.py --skip="Deadline, ..." --year=2024 --month=5
See LICENSE.txt
for more information.