htmldiff

command module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 13, 2023 License: MIT Imports: 7 Imported by: 0

README

htmldiff

CircleCI codecov Go Report Card

This tool compares old and new versions of html and generates color-coded html in a diff format.

htmldiff-samle

Install

Homebrew
brew install kemokemo/tap/htmldiff
Scoop

First, add my scoop-bucket.

scoop bucket add kemokemo-bucket https://github.com/kemokemo/scoop-bucket.git

Next, install this app by running the following.

scoop install htmldiff
Binary

Get the latest version from the release page, and download the archive file for your operating system/architecture. Unpack the archive, and put the binary somewhere in your $PATH.

Usage

$ htmldiff -h
Usage: htmldiff [<option>...] <old html> <new html>
  -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 new header". )

Example
htmldiff -o=diff/index.html v1/index.html v2/index.html

If you use the header of v1/index.html, set -nh=false flag.

htmldiff -o=diff/index.html -nh=false v1/index.html v2/index.html

Information for developers

How to build

It is recommended to build with the go module.

If you don't use the go module, you need to go get the following libraries before building.

  • github.com/andybalholm/cascadia
  • github.com/documize/html-diff
  • github.com/gobuffalo/packr/v2

I would like to take this opportunity to thank the authors of these wonderful libraries and tools. Thank you!

Note

Tool packr2 is used to convert template file template/index.html to packrd/packed-packr.go for inclusion in the binary. Tool packr2 is installed as follows.

go get -u github.com/gobuffalo/packr/v2/packr2

For more information, please visit the official website.

License

MIT

Author

kemokemo

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
You can use the "packr clean" command to clean up this, and any other packr generated files.
You can use the "packr clean" command to clean up this, and any other packr generated files.
You can use the "packr2 clean" command to clean up this, and any other packr generated files.
You can use the "packr2 clean" command to clean up this, and any other packr generated files.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL