Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kemokemo/htmldiff
This tool compares old and new versions of html and generates color-coded html in a diff format.
https://github.com/kemokemo/htmldiff
cli go golang html-diff
Last synced: 1 day ago
JSON representation
This tool compares old and new versions of html and generates color-coded html in a diff format.
- Host: GitHub
- URL: https://github.com/kemokemo/htmldiff
- Owner: kemokemo
- License: mit
- Created: 2020-06-21T02:19:07.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-04-19T11:41:26.000Z (7 months ago)
- Last Synced: 2024-06-20T06:37:53.585Z (5 months ago)
- Topics: cli, go, golang, html-diff
- Language: Go
- Homepage:
- Size: 275 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# htmldiff
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT) [![test-and-build](https://github.com/kemokemo/htmldiff/actions/workflows/test-and-build.yml/badge.svg)](https://github.com/kemokemo/htmldiff/actions/workflows/test-and-build.yml)
This tool compares old and new versions of html and generates color-coded html in a diff format.
![htmldiff-samle](images/htmldiff-sample.png)
## Install
### Homebrew
```sh
brew install kemokemo/tap/htmldiff
```### Scoop
First, add my scoop-bucket.
```sh
scoop bucket add kemokemo-bucket https://github.com/kemokemo/scoop-bucket.git
```Next, install this app by running the following.
```sh
scoop install htmldiff
```### Binary
Get the latest version from [the release page](https://github.com/kemokemo/htmldiff/releases/latest), and download the archive file for your operating system/architecture. Unpack the archive, and put the binary somewhere in your `$PATH`.
## Usage
```sh
$ htmldiff -h
Usage: htmldiff [...]
-h display help
-nh
true: use new header, false: use old header (default true)
-o string
output filename (default "diff.html")j
```When comparing two html files, you need to choose which header to use. By default, it uses the new header. To use the header of the old html file, set `-nh=false` flag. ( `-nh` means "use **n**ew **h**eader". )
### Example
```sh
htmldiff -o=diff/index.html v1/index.html v2/index.html
```If you use the header of `v1/index.html`, set `-nh=false` flag.
```sh
htmldiff -o=diff/index.html -nh=false v1/index.html v2/index.html
```## License
[MIT](https://github.com/kemokemo/htmldiff/blob/main/LICENSE)
## Author
[kemokemo](https://github.com/kemokemo)