Skip to main content

Compare directory trees and output unified diff

Project description

PyPI PyPI - License Documentation Tests Run on Ubuntu Python Versions Tests Run on Macos Python Versions Tests Run on Windows Python Versions Github Repo

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

treecomp-1.0.0.tar.gz (12.1 kB view details)

Uploaded Source

Built Distribution

treecomp-1.0.0-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

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

Hashes for treecomp-1.0.0.tar.gz
Algorithm Hash digest
SHA256 e59f42d81eed5d5fe74d45b2c6220370f1f49fe79d037ecbc9c464776f83cfc4
MD5 0101eeb7c922131b28e1166029ef162c
BLAKE2b-256 10efd1b41502b9ebb91cda0bc697195f83bcbc62d07456dcbf1fc6b22c86f8e9

See more details on using hashes here.

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

Hashes for treecomp-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d76c9ad6b2f20e24a67a9dd784ee24e37157601ff0f02281259c49abfe2cb08a
MD5 8df261531eca86a344863d06e7aeecf1
BLAKE2b-256 61f5aefbf555e878109938dc65970e849d92ebb69a315fb9f0912fbae8c465c6

See more details on using hashes here.

Supported by

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