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 | |
|---|---|---|---|
| diff2html-1.0.1.tar.gz | 4.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| diff2html-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
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
|