No project description provided
Project description
File Diff Viewer
A simple file diff viewer built with PySide2 to do one job: compare the contents of two text files side by side.
What It Does
- Load two files and view them side by side with sync scrolling.
- Highlights differences to make changes easy to spot.
Install
You can install it using pip install diffview (requires Python 3.10) or by copying diffview/diffview.py into your source code, which is compatible with Python versions 3.7 and above.
How to Use
import os
from diffview import DiffViewer
# Create the diff viewer widget
diff_viewer = DiffViewer()
# Load some files into the sidebar for the user to select
diff_viewer.load_files(os.listdir())
# Show the widget
diff_viewer.show()
Or you can load buffers directly
diff_viewer.load_a_view(title='File A', content='abc')
diff_viewer.load_b_view(title='File B', content='abcd')
Note: You can also load files through the UI with the built-in file selection buttons.
Notes
- This works with text files only.
- The diffing logic is basic—line-level differences only. If you need something fancier, you should definitely look elsewhere.
Roadmap
- Multi view scroll
- File selector with last folder selected memory
- Persisten settings: font options, colors, recent files
- Shortcuts: font size (wheelScroll + ctrl)
- Line wrap option
- Tests
- Line number?
- Auto-Reload files?
- Status for file changes?
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file diffview-0.1.0.tar.gz.
File metadata
- Download URL: diffview-0.1.0.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.13.0 Darwin/22.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
28cf19a66a78fb563d5ade2f2b602186f40c802d1486bf99551c3719d32299ad
|
|
| MD5 |
adca5ee8becfd2d4dc313eb28be078b4
|
|
| BLAKE2b-256 |
07b9012c48f1f656d038895f12b2300bf13e7d92d27d5a044b5e269cf30534a2
|
File details
Details for the file diffview-0.1.0-py3-none-any.whl.
File metadata
- Download URL: diffview-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.13.0 Darwin/22.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fedfc3b822f8eb0515a550e86d76b702dd2ffa673ca8f4bde994c5059f86d16e
|
|
| MD5 |
3a9daa5b433a5fae11cb35bcb87ec5a0
|
|
| BLAKE2b-256 |
0687a18af78b6f129f1e8b0ed7da259756c5625b5e1c4b0c5aea3b9bfec67de4
|