https://github.com/draud-egomann/clockodo_clock
Using Clockodo REST API to automatically clock in / out at certain times.
https://github.com/draud-egomann/clockodo_clock
automation clockodo clockodo-api python3 time-tracking
Last synced: 9 months ago
JSON representation
Using Clockodo REST API to automatically clock in / out at certain times.
- Host: GitHub
- URL: https://github.com/draud-egomann/clockodo_clock
- Owner: Draud-Egomann
- License: mit
- Created: 2024-03-08T07:06:37.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-30T14:02:38.000Z (about 2 years ago)
- Last Synced: 2025-01-26T13:17:38.778Z (over 1 year ago)
- Topics: automation, clockodo, clockodo-api, python3, time-tracking
- Language: Python
- Homepage:
- Size: 49.8 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ClockoDoClock
## Overview
This application integrates with the Clockodo API to to automatically clock in / out at certain times. It requires a correctly set up `.env` file to function properly.
## Requirements
- Python 3.x
- Pip for installing dependencies
## Setup
### Environment Variables
To run the application, you need to configure the following environment variables in a `.env` file located at the `root` of the project directory:
```plaintext
API_KEY = your_api_key_here
EMAIL = your_email_here
SUBDOMAIN = your_subdomain_here (default: my)
SERVICES_ID = your_services_id_here (set to 0 if unknown)
CUSTOMERS_ID = your_customers_id_here (set to 0 if unknown)
VARIABLE_CLOCKING_IN = True or False
WORKING_DAYS = ["Monday", "Tuesday", ..., "Sunday"]
SCHEDULES = [("08:00:00", "12:00:00"), ("13:00:00", "17:00:00")]
```
Alternatively, you can run the `src/create_env.py` script to generate a `.env` file with the necessary variables. The script will prompt you to fill in the missing values.
```bash
cd ./src
python ./create_env.py
```
### Installing Dependencies
To install the necessary Python libraries, run the following command:
```bash
pip install -r requirements.txt
```
## Usage
Once the environment and dependencies are set up, you can run the application with:
```bash
cd ./src
python ./main.py
```
The program will check the correctness of the `.env` variables and prompt you to fill in missing service and customer IDs via the Clockodo API if they are set to 0.
- If the program is directly called from the `src` directory, it will create an `data` folder in the `src` directory.
## Contributing
Contributions to this project are welcome. Please fork the repository and submit a pull request with your enhancements.
## License
The project is licensed under the MIT License. For more information, see the [LICENSE](LICENSE) file.