Skip to main content

A small tool to generate and display diffs between 2 directory.

Project description

Recursive Diff

A command-line utility to compare two directories and identify differences in files.

Features

  • Compare directory structures side-by-side
  • 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 postfix/extension

Installation

Requires Python 3.9+

pip install rich

Usage

python main.py <dir1> <dir2> [options]

Arguments

  • dir1 — First directory to compare
  • dir2 — 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
python main.py ./old_code ./new_code

# Include hidden files
python main.py ./old_code ./new_code --include_hidden_files

# Ignore multiple file types
python main.py ./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


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.0.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rcdiff-1.0.0-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

Details for the file rcdiff-1.0.0.tar.gz.

File metadata

  • Download URL: rcdiff-1.0.0.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.14

File hashes

Hashes for rcdiff-1.0.0.tar.gz
Algorithm Hash digest
SHA256 464fcfef1b5ce68e06137681337be3cccc3398b9009926974d9a8c1fd3c67674
MD5 96af744e43360d1bd77caaed74b96470
BLAKE2b-256 04ffdbca7f10e551100ba5c8bede6a67e242036733f5dd0eb180333bf172315f

See more details on using hashes here.

File details

Details for the file rcdiff-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: rcdiff-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 3.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.14

File hashes

Hashes for rcdiff-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8311a8c98377af54da71ba3913bd67dce6ba337532b60f193c1998d4ff5ab2d5
MD5 e218f77ce0ec78f10d34e7f7f3945a99
BLAKE2b-256 3adff36446dc9805a183874554ad08308590809f690bae45618b7a8bcf0eb602

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page