https://github.com/mtyszkiewicz/tomhrm-autoreporting
Automate daily work time reporting in tomHRM. Install once and forget about manual input.
https://github.com/mtyszkiewicz/tomhrm-autoreporting
automation docker hr playwright python time-reporting time-tracking timesheet tomhrm
Last synced: 3 months ago
JSON representation
Automate daily work time reporting in tomHRM. Install once and forget about manual input.
- Host: GitHub
- URL: https://github.com/mtyszkiewicz/tomhrm-autoreporting
- Owner: mtyszkiewicz
- License: mit
- Created: 2025-05-09T18:06:31.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-17T14:39:28.000Z (about 1 year ago)
- Last Synced: 2025-06-08T08:49:59.595Z (about 1 year ago)
- Topics: automation, docker, hr, playwright, python, time-reporting, time-tracking, timesheet, tomhrm
- Language: Python
- Homepage:
- Size: 14.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tomhrm-autoreporting
Browser automation to report 8 hours to your default project every day at 17:00.
## Limitations
- No support for project selection (uses default)
- Hardcoded schedule (17:00)
- Only supports username/password authentication
*Pull requests to address these limitations are welcome.*
## Quick Start (Docker)
1. **Clone the repository:**
```bash
git clone https://github.com/mtyszkiewicz/tomhrm-autoreporting.git
cd tomhrm-autoreporting
```
2. **Configure credentials:**
Create a `.env` file in the root directory:
```.env
TOMHRM_USERNAME=your@email.com
TOMHRM_PASSWORD=yourpassword
TOMHRM_WORKSPACE=your-workspace-name
```
3. **Run:**
```bash
docker compose up -d
```
## Notifications
The script uses [Apprise](https://pypi.org/project/apprise/) to notify you on failures (e.g., unexpected 2FA or layout changes).
To enable **Telegram** notifications, add these to your `.env` file:
```.env
TELEGRAM_BOT_TOKEN=yourbottoken
TELEGRAM_CHAT_ID=111222333444
```
## Local Development
Use this setup to run the script manually or contribute code.
1. **Install Dependencies**
Using uv:
```bash
uv sync
playwright install firefox
```
Using poetry:
```bash
poetry install
playwright install firefox
```
2. **Set Environment Variables**
Export these manually or use [direnv](https://direnv.net/):
```bash
export TOMHRM_USERNAME="your@email.com"
export TOMHRM_PASSWORD="yourpassword"
export TOMHRM_WORKSPACE="your-workspace-name"
```
3. **Usage**
```bash
# Run once immediately
python3 main.py
# Run with browser visible (debug mode)
python3 main.py --headed
# Run on schedule (loop forever)
python3 main.py --schedule
# Save screenshots on error
python3 main.py --screenshot-dir ./screenshots
```