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.2.0.tar.gz (7.8 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.2.0-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: watch_diff-1.2.0.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.11 {"installer":{"name":"uv","version":"0.9.11"},"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.2.0.tar.gz
Algorithm Hash digest
SHA256 1c31983992d9ffd754b3b6909a761516ea79b66f7b2e9bc0da8b65a4aa458773
MD5 107c3abaf0b983fbe56c5c3a13acdc5f
BLAKE2b-256 a60e78686bd9d535d044e08cb4297ef9071d1fd109c314e580d2254be2a30967

See more details on using hashes here.

File details

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

File metadata

  • Download URL: watch_diff-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.11 {"installer":{"name":"uv","version":"0.9.11"},"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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 802de56da25a0c2aef898ed3f4505b5a3d505ba19dc62fd2d9e8a40dbb999065
MD5 4181bc6668d7cb4275596f2c9a30efcc
BLAKE2b-256 6cb2eea73fe25096ed90be441131c17d9401bf40670b5f6fa167e20ffa74de79

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