Skip to main content

wsdiff is a tool that produces a syntax-highlighted, self-contained, static HTML file that will show a colored, syntax-highlighted diff of two files or folders without external dependencies or javascript.

Project description

wsdiff

A python script that produces a diff of two files or directories as a single, self-contained HTML file. The resulting diff works without Javascript and will automatically switch between inline and side-by-side formats depending on available screen space.

Installation

pip install wsdiff

Usage

usage: wsdiff [-h] [-b] [-s SYNTAX_CSS] [-l LEXER] [-L] [-t PAGETITLE]
                    [-o OUTPUT] [--header] [--content]
                    [old] [new]

Given two source files or directories this application creates an html page
that highlights the differences between the two.

positional arguments:
  old                   source file or directory to compare ("before" file)
  new                   source file or directory to compare ("after" file)

options:
  -h, --help            show this help message and exit
  -b, --open            Open output file in a browser
  -s SYNTAX_CSS, --syntax-css SYNTAX_CSS
                        Path to custom Pygments CSS file for code syntax
                        highlighting
  -l LEXER, --lexer LEXER
                        Manually select pygments lexer (default: guess from
                        filename, use -L to list available lexers.)
  -L, --list-lexers     List available lexers for -l/--lexer
  -t PAGETITLE, --pagetitle PAGETITLE
                        Override page title of output HTML file
  -o OUTPUT, --output OUTPUT
                        Name of output file (default: stdout)
  --header              Only output HTML header with stylesheets and stuff,
                        and no diff
  --content             Only output HTML content, without header

Example Output

ScreenShot

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

wsdiff-0.1.2-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

Details for the file wsdiff-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: wsdiff-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 9.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for wsdiff-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 95f244e7a09fe043ce9a2a43a752cbfcdb1180c119d6a2467d764161ef676066
MD5 11588d465b6ee766676de90ec4e6c9c3
BLAKE2b-256 90922965509076008018b463aa70a276f6a9b4819dcefe2c73bdcd41d5f363d4

See more details on using hashes here.

Supported by

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