Manage time on your calendar by adding events directly from your terminal and committing them to a database later.
Follow these steps to set up and manage time on your calendar:
- Create a Google Cloud Project: Visit console.cloud.google.com and create a new project.
- Enable Google Calendar API: Navigate to APIs and Services and enable the Google Calendar API.
- Configure OAuth Consent Screen: Go to OAuth consent screen and follow the instructions. Add all Google Calendar scopes.
- Add Test Users: Add yourself as a user for the application by adding your email in the "test users" section.
- Create OAuth Credentials: Go to Credentials and create credentials. Choose OAuth client ID and then choose desktop app. Create and download credentials.json.
- Move Credentials: Move the credentials.json file to the same folder where the TimeManager.py script is located.
Configure the TimeManager.py script by following these steps:
- Fill the spots marked on the TimeManager.py file with your time zone and calendar id (you can get that from your calendar).
To set up the database, follow these steps:
- Run CreateTable.py once to generate the hours.db file (all your commits will be found there).
Follow these steps to execute the TimeManager.py script:
Make sure you have Python updated first.
pip install -r requirements.txt
python TimeManager.py add hours and " Enter Description"
Example:
python TimeManager.py add 2 "Coding"
python TimeManager.py commit
For added convenience, you can follow these optional steps:
- Add the credentials.json to your root folder.
- Make the TimeManager.py executable.
- Add an alias to it on your "bashrc" file so that you can run the commands above from your terminal directly.
We welcome contributions from the community! Feel free to submit pull requests or open issues if you encounter any problems or have suggestions for improvement.