
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
diff2html-cli
Advanced tools
Diff to Html generates pretty HTML diffs from git diff output in your terminal
line-by-line
and side-by-side
diff
new and old line numbers
inserted and removed lines
GitHub like style
Code syntax highlight
Go to Diff2HTML
Manually download and import rtfpessoa/diff2html/dist/diff2html.min.js
into your page
sudo npm install -g diff2html-cli
diff2html [options]
Options:
-s, --style Output style
[string] [choices: "line", "side"] [default: "line"]
-f, --format Output format
[string] [choices: "html", "json"] [default: "html"]
-d, --diff Diff style [string] [choices: "word", "char"] [default: "word"]
-i, --input Diff input source
[string] [choices: "file", "command"] [default: "command"]
-o, --output Output destination
[string] [choices: "preview", "stdout"] [default: "preview"]
-F, --file Send output to file (overrides output option) [string]
--version Show version number [boolean]
-h, --help Show help [boolean]
Examples:
diff2html -s line -f html -d word -i diff last commit, line by line, word
command -o preview -- -M HEAD~1 comparison between lines,previewed
in the browser and input from git
diff command
diff2html -i file -- my-file-diff.diff reading the input from a file
diff2html -f json -o stdout -- -M HEAD~1 print json format to stdout
diff2html -F my-pretty-diff.html -- -M print to file
HEAD~1
© 2015 rtfpessoa
For support, check out https://github.com/rtfpessoa/diff2html-cli
NOTE: notice the
--
in the examples
All the contributions are welcome.
To contribute just send a pull request with your changes and I will review it asap.
Copyright 2014 Rodrigo Fernandes. Released under the terms of the MIT license.
This project is inspired in pretty-diff by Scott González.
FAQs
Fast Diff to colorized HTML
We found that diff2html-cli demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.