Compare directory trees and output unified diff
Project description
treecomp
Overview
A CLI and Python API to recursively compare directory trees and output a unified diff.
Supports ignoring and targeting file and folder patterns with
.gitignore
-style syntax.
Plays well with other tools: pipe output to dunk
for pretty diffs and use
-f json
to output to JSON for use with jq
and other tools.
Getting Started
The recommended way to install treecomp
is with pipx
,
though it can also be installed with pip
.
pipx install flexlate
Or, if you don't have/don't want to install pipx
:
pip install flexlate
The unidiff output from this tool is best viewed using dunk
,
which can also be installed via pipx
/pip
.
pipx install dunk
Compare two file trees recursively and output unified diffs.
treecomp my_folder_1 my_folder_2 | dunk
It supports ignoring and targeting patterns with
.gitignore
-style syntax.
It also has a strongly-typed Python API.
See examples in the documentation.
Development Status
This project is currently in early-stage development. There may be breaking changes often. While the major version is 0, minor version upgrades will often have breaking changes.
Developing
First ensure that you have pipx
installed, if not, install it with pip install pipx
.
Then clone the repo and run npm install
and pipenv sync
. Run pipenv shell
to use the virtual environment. Make your changes and then run nox
to run formatting,
linting, and tests.
Develop documentation by running nox -s docs
to start up a dev server.
To run tests only, run nox -s test
. You can pass additional arguments to pytest
by adding them after --
, e.g. nox -s test -- -k test_something
.
Author
Created by Nick DeRobertis. MIT License.
Links
See the documentation here.
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
File details
Details for the file treecomp-1.0.0.tar.gz
.
File metadata
- Download URL: treecomp-1.0.0.tar.gz
- Upload date:
- Size: 12.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e59f42d81eed5d5fe74d45b2c6220370f1f49fe79d037ecbc9c464776f83cfc4 |
|
MD5 | 0101eeb7c922131b28e1166029ef162c |
|
BLAKE2b-256 | 10efd1b41502b9ebb91cda0bc697195f83bcbc62d07456dcbf1fc6b22c86f8e9 |
File details
Details for the file treecomp-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: treecomp-1.0.0-py3-none-any.whl
- Upload date:
- Size: 11.3 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 | d76c9ad6b2f20e24a67a9dd784ee24e37157601ff0f02281259c49abfe2cb08a |
|
MD5 | 8df261531eca86a344863d06e7aeecf1 |
|
BLAKE2b-256 | 61f5aefbf555e878109938dc65970e849d92ebb69a315fb9f0912fbae8c465c6 |