Skip to main content

Rej(spe)X - Deal with .rej file with minimal pain

Project description

RejX

Deal with .rej files with reasonable pain

The application is designed to work with .rej files generated during patch application failures or from updating git templates using tools s.a. cookiecutter or cruft

It provides functionality to either fix these files individually or in bulk, view differences, list them, and clean them up.

The rich library is used for better console output formatting, providing a more user-friendly and visually appealing interface.

It's important to use the commands cautiously, especially fix_all and clean, as they perform bulk operations.

This documentation provides a clear guide on how to interact with the rejx Typer application, making it easier for users to understand and utilize its functionalities.

Setup

# Pip
pip install rejx

# Poetry
poetry add rejx

Usage

Your Python Typer application, rejx, provides a command line interface (CLI) for managing .rej files, which are typically generated when patches fail to apply cleanly. Below, I'll detail each command, its purpose, and how to use it, including optional arguments.

fix

Purpose: Applies the changes from a specified .rej file to its corresponding original file. Usage:

rejx fix path/to/file.rej

fix_all

Purpose: Searches for all .rej files in the current directory and subdirectories, then applies their changes to the corresponding original files. Usage:

rejx fix_all

diff

Purpose: Displays the differences between the current files and the changes proposed in the .rej files. Usage:

rejx diff

Note: This command uses a pager for output. Use arrow keys or Vim bindings to navigate, and q to quit.

ls

Purpose: Lists all .rej files in the current directory and subdirectories. By default, it lists files, but can also display them in a tree structure. Usage: For listing files:

rejx ls

For tree view:

rejx ls --view tree

For list view (default):

rejx ls --view list

clean

Purpose: Deletes all .rej files in the current directory and subdirectories. It has an optional preview feature. Usage:

rejx clean

With preview:

rejx clean --preview


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

rejx-0.0.3.tar.gz (9.6 kB view details)

Uploaded Source

Built Distribution

rejx-0.0.3-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file rejx-0.0.3.tar.gz.

File metadata

  • Download URL: rejx-0.0.3.tar.gz
  • Upload date:
  • Size: 9.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.3 Darwin/23.1.0

File hashes

Hashes for rejx-0.0.3.tar.gz
Algorithm Hash digest
SHA256 886beecca3a26111c38da2899ee3b8a04dd2cd55986c078248ae5860880d6aa6
MD5 6161e154b3fd7ba615b84f0fb867a7b0
BLAKE2b-256 a7f9e6ccb4fefd2f0a9cbdf071deb941ae1deb9f3af4e8ee3668493852c09171

See more details on using hashes here.

Provenance

File details

Details for the file rejx-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: rejx-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.3 Darwin/23.1.0

File hashes

Hashes for rejx-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 73471d0ffa7bde6156d926a5a139f419d7ef5d245587f729c5bf0e83144ed426
MD5 5cbc7860afaa3ff469819792920bcbbc
BLAKE2b-256 5812515cbd1130b781e1bfc1e3ccff7a5702ce99cb7a7de8c766b135ff572649

See more details on using hashes here.

Provenance

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