A visual file and directory comparison tool with change tracking. Desktop GUI powered by Python and PyQt5.
- Side-by-Side File Comparison: View differences between two files in a synchronized, side-by-side layout
- Syntax Highlighting: Automatic syntax highlighting for various programming languages using Pygments
- Directory Comparison: Compare entire directory trees and identify added, removed, modified, and identical files
- Change Summaries: View detailed statistics about file and directory changes
- Patch Export: Export differences as unified diff patches
- Responsive Qt Interface: Modern, user-friendly interface with menus, toolbars, and keyboard shortcuts
- Python 3.6 or higher
- PyQt5
- Pygments
pip install -r requirements.txtYou can run the application in several ways:
Option 1: Direct execution
python main.pyOption 2: As a Python module
python -m qt_diff_studioOption 3: After installation
pip install .
qt-diff-studio- Click "Compare Files" from the toolbar or press
Ctrl+F - Select the first file (left/original)
- Select the second file (right/modified)
- View the side-by-side comparison with highlighted changes
- Click "Compare Directories" from the toolbar or press
Ctrl+D - Select the first directory (left/original)
- Select the second directory (right/modified)
- Browse the directory tree to see added, removed, modified, and identical files
- Double-click any modified file to view its detailed diff
- After comparing files, click "Export Patch" or press
Ctrl+E - Choose a location to save the unified diff patch file
- The patch can be applied using standard tools like
patchorgit apply
Press Ctrl+S or click "Show Summary" to view detailed statistics about the current comparison.
Ctrl+F: Compare FilesCtrl+D: Compare DirectoriesCtrl+E: Export PatchCtrl+S: Show SummaryCtrl+L: Clear ViewsCtrl+Q: Exit Application
qt-diff-studio/
├── main.py # Application entry point
├── qt_diff_studio/
│ ├── __init__.py # Package initialization
│ ├── main_window.py # Main application window
│ ├── diff_engine.py # Core diff comparison logic
│ ├── diff_viewer.py # Side-by-side file diff viewer
│ ├── directory_viewer.py # Directory comparison tree view
│ └── syntax_highlighter.py # Syntax highlighting support
├── requirements.txt # Python dependencies
└── README.md # This file
See LICENSE file for details.