Diff2HTML
Python's difflib is a great standard library feature.
But I wanted a command line version.
Installation
pip install diff2html
Usage
diff2html fileA fileB --output diff.html
firefox diff.html
Full help
usage: Compare two files and produce a well formatted diff in an HTML file.
A command line wrapper for Python's difftool.
[-h] [-l STRIP_LEFT] [-r STRIP_RIGHT] [-t TITLE] [-n NOTES] [-o OUTPUT]
left right
positional arguments:
left The first file to compare.
right The second file to compare.
options:
-h, --help show this help message and exit
-l, --left-strip STRIP_LEFT
Regex expression acting on the left hand side of the
diff
-r, --right-strip STRIP_RIGHT
Regex expression acting on the right hand side of the
diff
-t, --title TITLE Add a title to the page, other than the names of the
files being compared. If set the names of the files
being compared will be added as a subtitle.
-n, --notes NOTES Additional notes to be added below the title and
subtitle.
-o, --output OUTPUT Output file path. If unset output will be printed to
stdout.
Metadata
Release files for diff2html 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| diff2html-1.0.1.tar.gz | 4.9 kB | Without provenance | Details for diff2html-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| diff2html-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for diff2html-1.0.1-py3-none-any.whl |
Total release size: 10.0 kB
Release files / diff2html-1.0.1.tar.gz
| Download URL | diff2html-1.0.1.tar.gz |
|---|---|
| Size | 4.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
740bc7c56e2bc4ab3b8729c5a376382234505c3d457e1d29b13f676620a39eaf
|
|
BLAKE2b-256 checksum How to use checksums |
f8d348cc0296722a9088a5c262ff504816df3bd6f0c59708cf89be19b640fd22
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Release files / diff2html-1.0.1-py3-none-any.whl
| Download URL | diff2html-1.0.1-py3-none-any.whl |
|---|---|
| Size | 5.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
568b84896d7d05ceb572af17e57423486974175e835980d0581e55d00f4ddfe2
|
|
BLAKE2b-256 checksum How to use checksums |
cdaca9726a31df0d8a82ec203d0d1e50d484fc5f205c6afde3f2c55f39c946c9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Security for diff2html 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.