Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

diff2html-cli

Package Overview
Dependencies
Maintainers
1
Versions
96
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

diff2html-cli

Fast Diff to colorized HTML

  • 1.4.6-rc.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
20K
decreased by-13.68%
Maintainers
1
Weekly downloads
 
Created
Source

diff2html-cli

Circle CI Codacy Code Badge Codacy Coverage Badge

npm David David

node npm npm Gitter

Diff to Html generates pretty HTML diffs from git diff output in your terminal

Features

  • line-by-line and side-by-side diff

  • new and old line numbers

  • inserted and removed lines

  • GitHub like style

  • Code syntax highlight

  • Line similarity matching

Online Example

Go to Diff2HTML

Distributions

Setup

npm install -g diff2html-cli

Usage

Usage: diff2html [options] -- [diff args]

Options:
  -s, --style                       Output style   [string] [choices: "line", "side"] [default: "line"]
  --su, --summary                   Show files summary   [string] [choices: "closed", "open", "hidden"] [default: "closed"]
  --lm, --matching                  Diff line matching type   [string] [choices: "lines", "words", "none"] [default: "none"]
  --lmt, --matchWordsThreshold      Diff line matching word threshold   [string] [default: "0.25"]
  --lmm, --matchingMaxComparisons   Diff line matching maximum line comparisons of a block of changes [default: 2500]
  -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", "stdin"] [default: "command"]
  -o, --output                      Output destination   [string] [choices: "preview", "stdout"] [default: "preview"]
  -u, --diffy                       Upload to diffy.org   [string] [choices: "browser", "pbcopy", "print"]
  -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 command -o preview -- -M HEAD~1
      -> diff last commit, line by line, word 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 HEAD~1
      ->  print to file

© 2014 rtfpessoa
For support, check out https://github.com/rtfpessoa/diff2html-cli

NOTE: notice the -- in the examples

Contributions

This is a developer friendly project, all the contributions are welcome. To contribute just send a pull request with your changes following the guidelines described in CONTRIBUTING.md. I will try to review them as soon as possible.

License

Copyright 2014 Rodrigo Fernandes. Released under the terms of the MIT license.

Thanks

This project is inspired in pretty-diff by Scott González.


Keywords

FAQs

Package last updated on 07 May 2016

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc