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.1.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.1-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: watch_diff-1.3.1.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.1.tar.gz
Algorithm Hash digest
SHA256 1ad6ee4ce0c8154b40deac5d5b3bac03ec9a682bb4994a4c5300625f257722f2
MD5 bb2c6cc235a8d3a536d056d9b97ab4d6
BLAKE2b-256 9cec1ecee5c1f14ee040a2c1b82b3d5582f1147eeddbd7eb456ab0679d93da79

See more details on using hashes here.

File details

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

File metadata

  • Download URL: watch_diff-1.3.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e9b842d3915d640ded6ec2bdd9cae8e74dc85bb27958fd641d51389f571d2c30
MD5 6dcc643c23c2b05635e79ba4f0004170
BLAKE2b-256 0ab89f33713e35531b6fcfb17c7b2c1e137830837cc01da6d0242204cca41243

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