Metadata-Version: 2.4
Name: fs-watchdog
Version: 0.1.4
Summary: File system watchdog wrapper. Monitors a directory and logs events.
Author-email: Tim Abdiukov <TAbdiukov@gmail.com>
Project-URL: Homepage, https://github.com/TAbdiukov/fs-watchdog
Project-URL: Issues, https://github.com/TAbdiukov/fs-watchdog/issues
Keywords: watchdog,filesystem,monitoring,cli,automation
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Environment :: Console
Classifier: Operating System :: OS Independent
Classifier: Topic :: System :: Monitoring
Classifier: Topic :: System :: Filesystems
Classifier: Topic :: Utilities
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: System Administrators
Classifier: Intended Audience :: Developers
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENCE
Requires-Dist: watchdog>=4.0.2
Dynamic: license-file

# fs-watchdog

[![GitHub](https://img.shields.io/badge/GitHub-TAbdiukov/fs--watchdog-black?logo=github)](https://github.com/TAbdiukov/fs-watchdog)
[![PyPI Version](https://img.shields.io/pypi/v/fs-watchdog.svg)](https://pypi.org/project/fs-watchdog) 
![License](https://img.shields.io/github/license/TAbdiukov/fs-watchdog)
[![Buy Me A Coffee](https://img.shields.io/badge/Buy%20Me%20a%20Coffee-ffdd00?&logo=buy-me-a-coffee&logoColor=black)](https://buymeacoffee.com/tabdiukov)

File system Watchdog wrapper (CLI). Monitors a directory and logs events.

## Install

From PyPI:
```bash
pip install fs-watchdog
````

(Recommended for CLI tools)

```bash
pipx install fs-watchdog
```

## Usage

```bash
fs-watchdog <DIRECTORY_PATH>
```

Examples:

Windows:

```bash
fs-watchdog "C:\Users\User\Documents"
```

macOS / Linux:

```bash
fs-watchdog /Users/user/Documents
```

You can also run as a module:

```bash
python -m file_watchdog <DIRECTORY_PATH>
```

## Output

* Events are logged to the console in the following format:

  ```
  [HEX_TIMESTAMP] event_type: path/to/file
  ```
* Events are also saved to a log file named `watchdog_events_<timestamp>.log`.
* The log file is created in the **current working directory**.
* Log file entries use ISO timestamp format (UTC, Z suffix):

  ```
  [2024-04-02T12:34:56.789012Z] event_type: path/to/file
  ```

## Finishing up

Press `Ctrl+C` to stop monitoring.

## See also
*My other small but snappy Python tools and automation,*

* [github-stargazers](https://github.com/TAbdiukov/github-stargazers) – Python 3.13 – Github Stargazer Scraper.
* [img2pdf_helper](https://github.com/TAbdiukov/img2pdf_helper) – Simplify img2pdf configuration and usage.
* **<ins>fs-watchdog</ins>** – Python 3.14 – file system Watchdog wrapper.

----------------------------------
**Tim Abdiukov**

