A Python application that records time spent doing certain activities, primarily built to keep track of how much time you spend coding each day.
- Python 3.x installed on your machine.
- Git installed on your machine (for cloning the repository).
- Basic familiarity with using command line interfaces.
- Open your Command Line Interface (CLI): This can be Terminal on macOS/Linux or Command Prompt/Powershell on Windows.
- Navigate to the Directory where you want to store the project.
- Clone the Repository:
git clone https://github.com/notzune/habit-tracker.git
This command downloads the code to your local machine.
- Navigate to the Project Directory:
cd habit-tracker
- Create a Virtual Environment:
python -m venv venv
- Activate the Virtual Environment:
- On Windows:
venv\Scripts\activate
- On MacOS/Linux:
source venv/bin/activate
- On Windows:
- Install Required Packages:
pip install -r requirements.txt
This command installs all the necessary Python packages.
- Run the Main Script:
python main.py
This starts the application.
Now you should have habit-tracker running on your machine. If you have any issues or questions, feel free to reach out for support by opening a ticket.
This guide will help you set up access to the Google Calendar API for habit-tracker. You'll create your own Google Cloud project, enable the Google Calendar API, and obtain the credentials needed to run the application.
- A Google account.
- Basic familiarity with using web browsers.
- Open Your Web Browser: Go to your preferred web browser.
- Visit Google Cloud Console: Click here or type
https://console.cloud.google.com/
in the address bar and press Enter. - Sign In: Use your Google account to sign in.
- Create a New Project:
- On the top navigation bar, you'll see a dropdown with the name of a current project (if any). Click on it.
- In the new window, click the "New Project" button at the top right.
- Give your project a fun and easy name, like "MyCalendarProject".
- Click "Create".
- Open the Dashboard: After creating your project, you'll be taken to the dashboard.
- Enable APIs & Services:
- Find and click on "Enable APIs and Services" at the top.
- In the API Library, search for "Google Calendar API".
- Click on it and then click "Enable" to activate the API for your project.
- Access Credentials Page:
- On the left sidebar, click "Credentials".
- On the Credentials page, click "Create Credentials" at the top and choose "OAuth client ID".
- Configure the OAuth Consent Screen:
- Select "External" and click "Create".
- Fill in the "App name" (like "MyCalendarApp"), your email in "User support email" and "Developer contact information".
- Click "Save and Continue".
- Skip the "Scopes" section for now, just click "Save and Continue".
- In the "Test users" section, click "Add Users" and enter your Google email address. Click "Save and Continue".
- Create OAuth Client ID:
- Now back in the "Credentials" tab, click "Create Credentials" again and select "OAuth client ID".
- For "Application type", choose "Web application".
- Name it (like "MyWebClient").
- Under "Authorized redirect URIs", click "Add URI" and enter
http://localhost:8080/
(or the redirect URI you plan to use in your app). - Click "Create".
- Download the Credentials:
- After creating your client ID, you'll see a confirmation screen. Click the download icon (looks like a down arrow) next to your new client ID.
- This downloads a file named
credentials.json
. Keep this file safe; you'll need it for the next step.
- Locate the Downloaded File: Find
credentials.json
in your Downloads folder. - Move the File: Drag this file into the same folder where you have habit-tracker. This is important for the application to connect to Google Calendar.
- Start habit-tracker: Now, when you start the application, it will use these credentials to access your Google Calendar.
- Follow Any On-Screen Instructions: The application might ask you to log in to your Google account and grant access to your Google Calendar.
Congratulations! You've successfully set up habit-tracker with Google Calendar API access. If you have any issues or questions, feel free to reach out for support by opening a ticket.