Autofill missing King of Time (KOT) time records using Selenium
Reason this release was yanked:
This version contains a bug in calculating dates
Project description
kot-attendance-bot
Selenium helper for automating King of Time attendance tasks.
Installation
pip install kot-attendance-bot
Setup
On first run, the tool prompts for clock-in, break-start times, and browser selection, then asks whether to save them to config.toml.
Edit config.toml if you want different default times, auto-login, or proxy settings. HTTP_PROXY and HTTPS_PROXY environment variables override values in config.toml.
Credentials
Login is manual unless configured via config.toml or environment variables:
- Environment Variables: Set
KOT_USERNAMEandKOT_PASSWORD. This automatically enables auto-login. - Config File: Set
auto_login = trueand provideusernameandpassword.
Note: Auto-login stores the password in plaintext in config.toml. Using environment variables is recommended for better security.
Commands
Fill Missing Records
kot-attendance-bot fill [options]
Opens King of Time, prompts for login (if needed), switches to the requested month, and fills missing time records for weekdays.
- Default visibility: Visible (use
--headlessto run hidden). - Default month: Current month (checks previous month first during the first work week).
Holiday Lookup
kot-attendance-bot holiday [options]
Extracts holidays (system holidays and scheduled leaves) for a specific month.
- Default visibility: Headless (use
--visibleto see the browser). - Caching: Results are saved in
kot-attendance-bot.jsonto avoid redundant browser sessions. - Formats: ASCII calendar (default), lines of text (
--text), or JSONL (--json).
AI Agent Integration
This project is "Agent-Ready," featuring the kot-attendance-bot-runner skill—a set of procedural instructions that allow AI agents to handle your attendance tasks autonomously. Whether you use Gemini CLI, Claude Code, GitHub Copilot, or Codex, you can simply ask the agent to "fill my missing records" or "check my April holidays," and it will know exactly how to execute the commands with the correct flags and environment variables.
To use the skill:
- Gemini CLI: Install the packaged skill:
gemini skills install kot-attendance-bot-runner.skill --scope workspace /skills reload
- Claude Code, Copilot, Cursor, etc.: Point your agent to the
kot-attendance-bot-runner/SKILL.mdfile. The clear, imperative instructions in that file help any LLM-based agent understand the CLI's nuances, headless requirements, and credential handling.
Now you can just delegate your King of Time tasks to your favorite AI assistant!
Options
All commands support these shared options:
-c, --config PATH: Path toconfig.toml.-b, --browser BROWSER: Browser to use (firefox,chrome,edge,safari).--month MONTH: Month number (1-12).-y, --auto: Skip runtime confirmations.--headless: Run browser in headless mode.--visible: Run browser in visible mode.
For holiday specifically:
--no-cache: Force fresh data fetch from King of Time.--text: Output as simple text lines.--json: Output as JSONL.
Output Redirection
In headless mode, status and progress messages are sent to stderr, while actual data results (like holiday lists) and interactive prompts are sent to stdout. This allows you to redirect logs without losing the output:
kot-attendance-bot holiday --json 2>/dev/null > holidays.jsonl
Contribution
Setup for Development
This project uses uv for dependency management.
uv sync
Running Tests
uv run python -m unittest discover -s tests
Local Execution
uv run python main.py [command] [options]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kot_attendance_bot-1.0.0.tar.gz.
File metadata
- Download URL: kot_attendance_bot-1.0.0.tar.gz
- Upload date:
- Size: 50.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d10f5e9e0323356b73aa09366d74229349ba5cd912b1901b843cfa4530daa4da
|
|
| MD5 |
5b3cee2ba29b52240130a1c063160fe9
|
|
| BLAKE2b-256 |
f9a56cbf26cad913eba4b377f218d14bce421a9025b1f6c2e48f40cb22231823
|
File details
Details for the file kot_attendance_bot-1.0.0-py3-none-any.whl.
File metadata
- Download URL: kot_attendance_bot-1.0.0-py3-none-any.whl
- Upload date:
- Size: 33.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b4ae2ad86118a7caf55e6808ee1e200b6a6fe34ca507a0a3b40b92daa7b9c0d5
|
|
| MD5 |
9ce11828cd3d8cd611509615040cb7bb
|
|
| BLAKE2b-256 |
5b2ee718e9f0e204a6facfbaa10d68973feee8e5765272b8272003b105c64ea2
|