BaseMax / qt-diff-studio
A visual file and directory comparison tool with change tracking. Desktop GUI powered by Python and PyQt5. Visual file and directory diff tool with change tracking. Desktop GUI powered by Python and PyQt5.
README
Qt Diff Studio
A visual file and directory comparison tool with change tracking. Desktop GUI powered by Python and PyQt5.
Features
- 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
Installation
Prerequisites
- Python 3.6 or higher
- PyQt5
- Pygments
Install Dependencies
pip install -r requirements.txt
Usage
Running the Application
You can run the application in several ways:
Option 1: Direct execution
python main.py
Option 2: As a Python module
python -m qt_diff_studio
Option 3: After installation
pip install .
qt-diff-studio
Comparing Files
- 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
Comparing Directories
- 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
Exporting Patches
- 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
Viewing Summaries
Press Ctrl+S or click "Show Summary" to view detailed statistics about the current comparison.
Keyboard Shortcuts
Ctrl+F: Compare FilesCtrl+D: Compare DirectoriesCtrl+E: Export PatchCtrl+S: Show SummaryCtrl+L: Clear ViewsCtrl+Q: Exit Application
Project Structure
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
License
See LICENSE file for details.
KiloClaw - Managed 🦀 