This project is a desktop application that integrates with the TimeFlip device and Toggl to track time spent on various tasks. The application uses a GUI to configure facets and associate them with Toggl projects.
- GUI Interface: Configure facets and associate them with specific Toggl projects.
- Time Tracking: Automatically track time based on the current facet detected by the TimeFlip device.
- Toggl Integration: Send time entries to Toggl with descriptions and project IDs.
- System Tray Icon: Minimize the application to the system tray for background operation.
- Python 3.x
- Required Python packages:
ctypes
,tkinter
,requests
,bleak
,pytimefliplib
,asyncio
,threading
,json
,base64
,socket
- TimeFlip device
- Toggl account and API token
- Install Dependencies
Use pip to install the required Python packages:
pip install -r requirements.txt
- Configure Environment
Create the src/config.py
file with the following variables (there is a config.sample.py
provided in the src
folder):
DEVICE_MAC = 'your-device-mac-address'
DEVICE_PASSWORD = 'your-device-password'
TOGGL_API_TOKEN = 'your-toggl-api-token'
TOGGL_WORKSPACE_ID = 'your-workspace-id'
TOGGL_PROJECT_IDS = {
1: 'Project One',
2: 'Project Two',
3: 'Project Three'
}
LISTEN_PORT = 12345
Also create a data
folder to store the facet values in a facet_values.json
file.
- Run the Application Execute the main script:
python src/main.py
Soon I will be releasing some binaries for Windows, MacOS and Linux.
- GUI Configuration: Use the GUI to enter facet descriptions and select associated Toggl projects. Click "SAVE" to store these settings.
- Time Tracking: The application will automatically track time based on the current facet detected by the TimeFlip device.
- STOP Functionality: Assign the "STOP" description to a facet to stop all current tasks in Toggl without starting a new one.
Initializes the application, sets the App User Model ID, and starts the GUI and TimeFlip threads.
Creates the main window using Tkinter, allowing users to input facet descriptions and select projects.
Handles loading and saving of facet values and project IDs to/from facet_values.json.
Manages communication with the TimeFlip device and sends time entries to Toggl based on the current facet.
Contains functions to interact with the Toggl API, stopping current tasks and sending new time entries.
This project is licensed under the MIT License.
- Toggl, for the time tracking API.
- pytimefliplib, for the TimeFlip device library.
- TimeFlip, for the device that inspired this project.