A simple, small desktop app for comparing, merging, and sharing text files with a clean side‑by‑side diff view and optional word‑level highlights. It runs locally on your machine (no data leaves your PC) and is friendly for both non‑technical and technical users.
- Fast, lightweight, and offline.
- Side‑by‑side comparison with clear added/removed line highlighting.
- Word‑level diffs (optional) to spot small changes within a line.
- Drag & drop files straight into either pane (if
tkinterdnd2is installed). - One‑click final selection: keep File 1, keep File 2, or save a Merged version.
- Share anywhere: save to file, copy to clipboard, send via Email or WhatsApp, with smart fallbacks for very long content.
- Themes: Light, Dark, and Sepia.
- Keyboard shortcuts and linked scrolling to speed up reviews.
- Local license/activation logic that mirrors your Text File Searcher and DataPrep‑Pro approach.
- Settings persistence (remembers theme and window size).
- Optional custom app icon (
app_icon.icoorapp_icon.png).
- Compare & Merge
- Load or paste two text files.
- See line‑level differences (additions/removals) for quick scanning.
- Toggle word‑level highlight for fine‑grained changes.
- Choose a final output: File 1, File 2, or Merged content.
- Drag & Drop (optional)
- If
tkinterdnd2is available, drag files onto the File 1 or File 2 text areas. - If not installed, the app still works—use the Open File buttons or File menu.
- If
- Share the final content
- Save to file or Copy to clipboard.
- Share via Email or WhatsApp using your default apps.
- For very long content, the app safely truncates or falls back by saving a temporary
.txtand copying the full text to your clipboard so nothing is lost.
- Theming & UX
- Light, Dark, Sepia themes.
- Linked scrolling between both panes.
- Clear status messages in both main and comparison windows when you set the final selection.
- Licensing (local, offline)
- Mirrors your Text File Searcher and DataPrep‑Pro style:
- Stores a small JSON file:
file_comparator_license.json - Menu: License → Enter License Key / View License Status
- Sample accepted keys in code (replace with your own):
TFS-DEMO-2025,DP-DEMO-2025, or keys with prefixFCA-/TFS-/DP-and 4 parts.
- Stores a small JSON file:
- Purely local—no network checks.
- Mirrors your Text File Searcher and DataPrep‑Pro style:
- Python 3.8+
- Tkinter (usually included on Windows/macOS).
On Linux, you may need to install it, e.g.:# Ubuntu/Debian sudo apt-get update && sudo apt-get install -y python3-tk
- Optional for drag & drop:
pip install tkinterdnd2
git clone https://github.com/ahmedkansulum/TextFileCompareApp.git
cd TextFileCompareApp
pip install -r requirements.txt # installs tkinterdnd2 (optional but recommended)
python TextFileCompareApp.pyIf you don’t want drag & drop, you can comment out
tkinterdnd2inrequirements.txtand just use Open File buttons.
- Ctrl+1 – Open File 1
- Ctrl+2 – Open File 2
- Ctrl+M – Compare & Merge
- Ctrl+S – Share Final Selection
- Ctrl+T – Cycle Theme
- F1 – About
- Place an
app_icon.ico(Windows) orapp_icon.png(cross‑platform) in the app folder. - The app will try to load it automatically.
- License → Enter License Key to activate.
- Accepted keys are defined in the code (
VALID_LICENSE_KEYS) and a pattern (e.g.,FCA-xxxx-xxxx-xxxx). Replace with your own scheme. - A JSON file
file_comparator_license.jsonis created/updated locally:{ "key": "YOUR-LICENSE-KEY", "activated_on": "2025-11-12T20:00:00Z" } - No external calls; activation is offline.
- Drag & Drop not working? Ensure
tkinterdnd2is installed. If it still fails, the app will gracefully fall back—just use the Open File buttons. - Email/WhatsApp long text errors (Windows “file path too long” / long URL):
The app will truncate the in‑URL text (to keep the handler happy) and/or save the full content to a temporary.txtwhile copying the full text to your clipboard. You won’t lose any data. - Missing Tkinter on Linux: install
python3-tkvia your package manager. - Dark theme contrast: Buttons are styled to keep text readable (bold, white text on accent background).
Install PyInstaller:
pip install pyinstallerBuild:
pyinstaller --noconsole --name TextFileCompareApp --icon app_icon.ico --hidden-import tkinterdnd2 TextFileCompareApp.pyThe executable will be in the dist/ folder.
TextFileCompareApp/
├─ TextFileCompareApp.py
├─ requirements.txt
├─ README.md
├─ app_icon.ico # optional
└─ app_icon.png # optional
2025‑11‑12
- Added drag & drop support (optional via
tkinterdnd2). - Added word‑level diff toggle on the comparison window.
- Improved status feedback inside the comparison window when selecting the final version.
- Smarter Email/WhatsApp sharing with truncation and local fallback file.
- Theme contrast and primary button readability improved.
- Settings persistence (theme + window size).
Issues and PRs are welcome. Suggestions for more share targets or improved diff algorithms are appreciated.
This project mirrors your local license approach used in Text File Searcher and DataPrep‑Pro. Replace the in‑code demo keys and validation logic with your production scheme as needed.