Automate daily work time reporting in the tomHRM system.
Install once and forget about manual input.
- No support for project selection
- Report schedule is hardcoded
- Only supports username/password authentication
Feel free to fork the repo or submit a pull request if you’d like to add these or other features!
- Clone the repository:
git clone https://github.com/mtyszkiewicz/tomhrm-autoreporting.git
cd tomhrm-autoreporting
- Create a
.env
file in the root directory with your credentials:
TOMHRM_USERNAME=your@email.com
TOMHRM_PASSWORD=yourpassword
TOMHRM_WORKSPACE=your-workspace-name
- Run the app:
docker compose up
Use this setup if you want to run the script manually, modify the code, or contribute.
- Install dependencies
Depending on your environment:
# Using uv
uv sync
playwright install firefox # Or your browser engine of choice
# Using Poetry
poetry install
playwright install firefox
# Using pip
pip install schedule playwright
playwright install firefox
- Set environment variables
You can export them manually, or use a tool like direnv to automate this.
#!/usr/bin/env bash
export TOMHRM_USERNAME=""
export TOMHRM_PASSWORD=""
export TOMHRM_WORKSPACE=""
- Run the script
Run once immediately:
python3 main.py
Run with browser visible (headed mode):
python3 main.py --headed
Run on a schedule (uses hardcoded timing):
python3 main.py --schedule
Save screenshots on error:
python3 main.py --screenshot-dir ./screenshots