Skip to content

Commit 5cde136

Browse files
committed
update README with new usage parameters and examples
1 parent b8ce516 commit 5cde136

File tree

3 files changed

+33
-18
lines changed

3 files changed

+33
-18
lines changed

README.md

+31-16
Original file line numberDiff line numberDiff line change
@@ -36,24 +36,39 @@ Diff to Html generates pretty HTML diffs from git diff output in your terminal
3636

3737
## Usage
3838

39-
Usage: diff2html [git-diff options]
39+
diff2html [options]
4040

41-
Options:
42-
43-
-h, --help output usage information
44-
-V, --version output the version number
45-
-i, --input [file] Diff input file.
46-
-o, --output [file] Output to file path. Defaults to stdout.
47-
-p, --preview Open preview in the browser.
48-
-l, --line Line by Line diff.
49-
-s, --side Side by Side diff.
50-
-j, --json Export diff in json format.
51-
52-
Example:
5341

54-
diff2html -p -l "HEAD~1"
55-
56-
> NOTE: notice the " in the example
42+
Options:
43+
-s, --style Output style
44+
[string] [choices: "line", "side"] [default: "line"]
45+
-f, --format Output format
46+
[string] [choices: "html", "json"] [default: "html"]
47+
-d, --diff Diff style [string] [choices: "word", "char"] [default: "word"]
48+
-i, --input Diff input source
49+
[string] [choices: "file", "command"] [default: "command"]
50+
-o, --output Output destination
51+
[string] [choices: "preview", "stdout"] [default: "preview"]
52+
-F, --file Send output to file (overrides output option) [string]
53+
--version Show version number [boolean]
54+
-h, --help Show help [boolean]
55+
56+
57+
Examples:
58+
diff2html -s line -f html -d word -i diff last commit, line by line, word
59+
command -o preview -- -M HEAD~1 comparison between lines,previewed
60+
in the browser and input from git
61+
diff command
62+
diff2html -i file -- my-file-diff.diff reading the input from a file
63+
diff2html -f json -o stdout -- -M HEAD~1 print json format to stdout
64+
diff2html -F my-pretty-diff.html -- -M print to file
65+
HEAD~1
66+
67+
68+
© 2015 rtfpessoa
69+
For support, check out https://github.com/rtfpessoa/diff2html-cli
70+
71+
> NOTE: notice the `--` in the examples
5772
5873
## Contributions
5974

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "diff2html-cli",
3-
"version": "1.0.0-1",
3+
"version": "1.0.0-2",
44

55
"homepage": "https://www.github.com/rtfpessoa/diff2html-cli",
66
"description": "Fast Diff to colorized HTML",

src/main.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ var argv = require('yargs')
7676
})
7777
.help('h')
7878
.alias('h', 'help')
79-
.epilog('Copyright 2015\n' +
79+
.epilog('© 2015 rtfpessoa\n' +
8080
'For support, check out https://github.com/rtfpessoa/diff2html-cli')
8181
.argv;
8282

0 commit comments

Comments
 (0)