Metadata-Version: 2.1
Name: hik_check
Version: 0.5.0
Summary: A script for hikvision device management
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.25.0

# hik_check

A command-line tool for Hikvision device management.

## Installation

```bash
pip install hik_check
```

## Requirements

- Python >= 3.7
- `requests` library (installed automatically)

## Usage

```bash
hik_check [options]
```

### action_push

Fetch access events from devices (or a JSON file) and re-push them to the client service.

```bash
hik_check action_push
```

1. **Bulk push** - all events in a time range from the selected devices
2. **Single user push** - same, filtered by `employeeNoString`
3. **Push from JSON file** - analyses the file (device events or hik_check backups; events without an `ipAddress` get one), then pushes

Each event is pushed exactly as the device returned it, with the device's `ipAddress` added (no fields are renamed or dropped, e.g. `attendanceStatus`, `serialNo`, `name` are kept).

Each mode shows a summary and asks for confirmation before pushing. Client IP, port (default 5000),
major/minor filter (default 5/75 = successful access, 0/0 = all), timezone and device lists are
remembered in `~/.config/hikcheck/action_push.json`. Fetched events are backed up under
`./hikcheck_action_push/<timestamp>/`; events that fail to push are saved to `failed_pushes.json`
in that folder and can be re-pushed with option 3.

## Developer

Migara Mewantha
