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 Distribution

wsdiff-0.3.2.tar.gz (9.8 kB view details)

Uploaded Source

Built Distribution

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

wsdiff-0.3.2-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

Details for the file wsdiff-0.3.2.tar.gz.

File metadata

  • Download URL: wsdiff-0.3.2.tar.gz
  • Upload date:
  • Size: 9.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for wsdiff-0.3.2.tar.gz
Algorithm Hash digest
SHA256 dc8bf6ede5307e9461e97c7046e2133915bb36eedda178d66e22c248b24575b4
MD5 6dcf173c42722d5a617744254ecb3749
BLAKE2b-256 10e4e583436106c1d80ce63769d29321f530fbef9a13b0eeafb74824f33fe5fb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: wsdiff-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 10.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for wsdiff-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6305ec0c1312a1f0b21dc71ee77eadd1564a8fe3752f58c99779471bb88a1603
MD5 a8e3aacf4fabe6f13e9ac54a5e8c6bd0
BLAKE2b-256 3fb69d384dc36c4c24a982c612ed0580ef75ab4620b8115a949b36bddec3321d

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