A small tool to generate and display diffs between 2 directory.
Project description
Recursive Diff
A command-line utility to compare two directories recursively and identify differences in files.
Features
- Compare directory structures recursively
- Display files that exist in one directory but not the other
- Show number of differing lines for files present in both directories
- Filter hidden files (configurable)
- Ignore files by extension/postfix
Installation
From PyPI
pip install rcdiff
Build with uv
If you have uv installed:
# Clone the repository
git clone <repository-url>
cd refactor-tool
# Build and install
uv pip install -e .
# Or build the distribution
uv build
Usage
rcdiff <dir1> <dir2> [options]
Arguments
dir1— First directory to comparedir2— Second directory to compare
Options
--exclude_hidden_files— Exclude hidden files (default behavior)--include_hidden_files— Include hidden files in comparison--ignore_postfixes POSTFIX [POSTFIX ...]— File extensions to ignore (default:.pyc)
Examples
# Basic comparison
rcdiff ./old_code ./new_code
# Include hidden files
rcdiff ./old_code ./new_code --include_hidden_files
# Ignore multiple file types
rcdiff ./old_code ./new_code --ignore_postfixes .pyc .log .tmp
Output
Displays a formatted table with:
- file — Relative file path
- in [dir1] — Whether file exists in first directory (y/empty)
- in [dir2] — Whether file exists in second directory (y/empty)
- diff lines — Number of differing lines (only shown if differences exist)
Example Output
┏━━━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━┓
┃ file ┃ in old ┃ in new ┃ diff lines ┃
┡━━━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━┩
│ main.py │ y │ y │ 5 │
│ config.json │ y │ │ │
│ test.py │ │ y │ │
└──────────────┴─────────┴─────────┴────────────┘
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
rcdiff-1.0.2.tar.gz
(3.8 kB
view details)
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 rcdiff-1.0.2.tar.gz.
File metadata
- Download URL: rcdiff-1.0.2.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4bd1052dfb23bbf6b9873d5adb9683fd764081f6044ccab510966d89710af4a4
|
|
| MD5 |
9a999afcbb69461afc877513137e7b8c
|
|
| BLAKE2b-256 |
0512fc709ed5dcdeb9ccf98ead9a4d343b62ed56e9a7836fdaf1e97c22db2632
|
File details
Details for the file rcdiff-1.0.2-py3-none-any.whl.
File metadata
- Download URL: rcdiff-1.0.2-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f87e5222579082b4f6a62e303cd87bb9931e9a7cc5fdb0d94b563f1350dd15b
|
|
| MD5 |
53ac30719cbba9cf7d5e19b67e64b699
|
|
| BLAKE2b-256 |
d74caed0a33256cd6b5a742eb4cc58819535fe36854f302c06426ab8f3370685
|