Skip to main content

Watch command output and get notified on changes

Project description

watch-diff

PyPI

Periodically run a command and receive nice diff styled emails on output changes.

Features

  • Supports Python >= 3.10
  • Uses only Python Standard Library
  • Sends email diff in both text and html form
  • Output changes to CLI and optionally to SMTP
  • Uses Message-ID and In-Reply-To to group email threads

Setup

pip install watch-diff

Usage

$ watch-diff --help
usage: watch-diff [-h] [-v | -d] [-i SECONDS] [-r RECIPIENT] command

Watch command output and get notified on changes

positional arguments:
  command               the command to watch

optional arguments:
  -h, --help            show this help message and exit
  -i SECONDS, --interval SECONDS
                        number of seconds between executions
  -r RECIPIENT, --recipient RECIPIENT
                        send email to recipient

logging level:
  -v, --verbose         enable verbose output
  -d, --debug           show debugging statements

SMTP Setup

export SMTP_HOST=qwer.ty
export SMTP_PORT=1234
export SMTP_USER=qwer@qwer.ty
read -s -p "SMTP_PASS: " SMTP_PASS
export SMTP_PASS

Development

uv sync
uv build
python -m unittest -v

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

watch_diff-1.3.0.tar.gz (8.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

watch_diff-1.3.0-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file watch_diff-1.3.0.tar.gz.

File metadata

  • Download URL: watch_diff-1.3.0.tar.gz
  • Upload date:
  • Size: 8.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","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

Hashes for watch_diff-1.3.0.tar.gz
Algorithm Hash digest
SHA256 f771db47277f8ea2bdcb0dd9741b4ad3a099d53e9b78ff77ce2c8ed1dd7bcdd6
MD5 86cac5c59ff3141a809b6e4b5a043975
BLAKE2b-256 ae3cabf181305880b630f730da3c86a00d798d041a4f9a6b8c65ccbe0187bda0

See more details on using hashes here.

File details

Details for the file watch_diff-1.3.0-py3-none-any.whl.

File metadata

  • Download URL: watch_diff-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","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

Hashes for watch_diff-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8b68e9360b491147320cbc4163b307ed30dad34c6ce30ecdad56d86a71241bfc
MD5 c8b2c3b97549f170bca2d57490328fed
BLAKE2b-256 3d9adf37172caee913af1397d1942e958bba822dd05c718fe8e01858d75cad92

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page