A web-based visual diff viewer inspired by Meld, the popular Linux/GTK diff tool. This proof of concept recreates Meld's signature 3-column interface with animated connection curves between changes.

# 1. Place two text files to compare
cp file1.txt a.txt
cp file2.txt b.txt
# 2. Generate the diff viewer
python3 meld_port.py
# 3. Open test-output.html in your browser
This project generates an interactive HTML diff viewer that displays two files side-by-side with visual connections between changes:
This project is inspired by Meld, an excellent visual diff and merge tool for Linux. Meld's clean interface and visual linkmap make understanding code changes intuitive. This web port aims to bring that experience to the browser using modern web technologies (HTML5 Canvas, WebGL, JavaScript).
Key inspirations from Meld:
The script computes the diff using Python's difflib and generates a standalone HTML file with embedded CSS and JavaScript. Simply provide two text files named a.txt and b.txt, run the script, and open the generated HTML file in any modern browser.
The connection curves are rendered using WebGL for optimal performance with large files, with an automatic fallback to SVG for browsers without WebGL support. You can toggle between rendering modes in the UI.
difflib for diff computationUnit tests are available to verify the core diff computation functionality:
# Run the test suite
python3 test_meld_port.py
# Run with verbose output
python3 test_meld_port.py -v
# Run specific test class
python3 -m unittest test_meld_port.TestComputeDiff
# Run with coverage (if pytest-cov is installed)
pytest test_meld_port.py --cov=meld_port --cov-report=html
Tests cover:
See LICENSE file for details.
5 commits
HTML
95.1%
Python
4.9%
A web-based visual diff viewer inspired by Meld, the popular Linux/GTK diff tool. This proof of concept recreates Meld's signature 3-column interface with animated connection curves between changes.

# 1. Place two text files to compare
cp file1.txt a.txt
cp file2.txt b.txt
# 2. Generate the diff viewer
python3 meld_port.py
# 3. Open test-output.html in your browser
This project generates an interactive HTML diff viewer that displays two files side-by-side with visual connections between changes:
This project is inspired by Meld, an excellent visual diff and merge tool for Linux. Meld's clean interface and visual linkmap make understanding code changes intuitive. This web port aims to bring that experience to the browser using modern web technologies (HTML5 Canvas, WebGL, JavaScript).
Key inspirations from Meld:
The script computes the diff using Python's difflib and generates a standalone HTML file with embedded CSS and JavaScript. Simply provide two text files named a.txt and b.txt, run the script, and open the generated HTML file in any modern browser.
The connection curves are rendered using WebGL for optimal performance with large files, with an automatic fallback to SVG for browsers without WebGL support. You can toggle between rendering modes in the UI.
difflib for diff computationUnit tests are available to verify the core diff computation functionality:
# Run the test suite
python3 test_meld_port.py
# Run with verbose output
python3 test_meld_port.py -v
# Run specific test class
python3 -m unittest test_meld_port.TestComputeDiff
# Run with coverage (if pytest-cov is installed)
pytest test_meld_port.py --cov=meld_port --cov-report=html
Tests cover:
See LICENSE file for details.
5 commits
HTML
95.1%
Python
4.9%