blob: 49de2465ad938b4fe931c66a00b2ea9ecd5b5006 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
# html_diff
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 -r requirements.txt
```
### Usage
```
usage: html_diff.py [-h] [-b] [-s SYNTAX_CSS] [-t PAGETITLE] [-o OUTPUT] [--header] [--content] old new
Given two source files or directories this applicationcreates an html page which 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
-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

|