Metadata-Version: 2.4
Name: rcdiff
Version: 1.0.0
Summary: A small tool to generate and display diffs between 2 directory.
Author: Waylong Leon
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: rich>=14.2.0

# 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+

```bash
pip install rich
```

## Usage

```bash
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

```bash
# 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       │            │
└──────────────┴─────────┴─────────┴────────────┘
```
