A program to diff two directories recursively
Project description
dompare
A command line tool to diff two directories recursively.
Demo
Then visit http://localhost:5240/xxx.html, as shown in output above, you will see the detailed difference of these two directories:
Features
- Easy to install and use, nice visualization
- Recursively compare same name files in two directories
- Optional settings for exclude certain directories
- Completely based on Python and HTML, no extra tools needed
Installation
pip3 install dompare
Using dompare
Basic usage
dompare folder-a folder-b
Then open your webbrowser and visit http://localhost:5140, you will see the difference information of folder-a and folder-b.
Public access
You can also use --host and --port options to change your host and port to listen:
dompare folder-a folder-b --host 0.0.0.0 --port 8888
By adding --host 0.0.0.0, you and other people can visit diff file by url http://your_ip:5140/dompare-xxxxxx.html.
Exclude binary folders
You can add --exclude dir1 dir2 to ignore certain directories (e.g., temporal folders, folders with binary files):
dompare dir1 dir2 --exclude build out
Verbose mode
If you need more detailed information, use --verbose option.
dompare folder-a folder-b --verbose
[DEBUG] [2019-10-31 15:35:37] [dompare] Processing dir folder-a/doc
[DEBUG] [2019-10-31 15:35:37] [dompare] Compare folder-a/doc/index.md and folder-b/doc/index.md
[DEBUG] [2019-10-31 15:35:37] [dompare] Compare folder-a/README.md and folder-b/README.md
[INFO] [2019-10-31 15:35:37] [dompare] Compare finished. Please visit http://localhost:5140/dompare-paepy47m.html to see diff file (Press Ctrl-C to stop)
[DEBUG] [2019-10-31 15:35:37] [dompare] Run command: cd /tmp && python3 -m http.server --bind localhost 5140
Serving HTTP on 127.0.0.1 port 5140 ...
For all options, run dompare -h.
dompare -h
usage: dompare [-h] [--host HOST] [--port PORT] [--verbose]
[--exclude EXCLUDE [EXCLUDE ...]]
dir1 dir2
positional arguments:
dir1 Path to the first directory
dir2 Path to the second directory
optional arguments:
-h, --help show this help message and exit
--host HOST host to bind
--port PORT port to listen
--verbose Show detailed information
--exclude EXCLUDE [EXCLUDE ...]
Ignore listed directories when diff
TODO
There are some ideas I want to do in the future:
- Windows support (tested on Windows 8.1, Python 3.7.2)
- More pretty UI to show diff, like font size, scroll bar removing
Contributing
Any contribution is welcomed. If you find a bug or have any new features, please create an issue or a pull request.
License
MIT © Yunfeng Wang
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 dompare-0.1.100.tar.gz.
File metadata
- Download URL: dompare-0.1.100.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4e668c57ad7b4b94ce8fe4d30b9ef850464871a64f7fc03c9b98f4f1ddc5106b
|
|
| MD5 |
8a1ed7ae722675d75800fb0441a718aa
|
|
| BLAKE2b-256 |
b758d4c27d0898601f679a65f13931f6e43d2e7ac76fe7ff6959d8ed7000a96c
|
File details
Details for the file dompare-0.1.100-py3-none-any.whl.
File metadata
- Download URL: dompare-0.1.100-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e456596b335f29ed7b47c6c0e16769932ae93f4ed105f6e907209639df2f1d7f
|
|
| MD5 |
905786dfe638f82e4abdce571cf4f2b5
|
|
| BLAKE2b-256 |
bf81867ec8377e51515db56226339420941c9279f776c3cb4cb87e7526328c31
|