Skip to content

A very simple python package for creating a HTML line diff between two files

License

Notifications You must be signed in to change notification settings

tomcarter23/diffa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

diffa

A simple CLI tool for generating nice HTML diffs between two files.

🌟 Features

  • Generates pretty colour-coded HTML diffs.
  • Supports both unified view and side-by-side view.

📦 Installation

Use pip to install diffa from PyPI:

pip install diffa

🛠️ Usage

Run diffa from the command line to create a shiny HTML diff.

diffa file1.txt file2.txt output.html

Options

--side-by-side: Adds a side-by-side comparison to the output.

The Output

Open the generated HTML file in your browser to see:

  • Lines added in green
  • Lines removed in red
  • Matching lines in white

💡 Ideas for Use

  • Code Reviews: Quickly generate diffs for commits or branches.
  • Document Comparison: Spot the differences between document revisions.
  • Configuration Changes: Compare config files across environments.

About

A very simple python package for creating a HTML line diff between two files

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages