From fa804c4cf87ee7697451e92e4c08c6741fe2b79b Mon Sep 17 00:00:00 2001 From: Markus Sagen Date: Fri, 8 Dec 2023 17:18:45 +0100 Subject: [PATCH] update readme --- README.md | 69 ++++++++++++++++++++++++++++++++++++++++++-------- pyproject.toml | 7 ++++- 2 files changed, 64 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index bceaeab..93ebc52 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,67 @@ # 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` -## Usage +It provides functionality to either fix these files individually or in bulk, view differences, list them, and clean them up. -``` -# fix a single file -rejx fix +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. -# fix all .rej files -rejx fix-all +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. -# list all .rej files -rejx ls -rejx ls --view tree +## Setup -# remove/clear all .rej files -rejx clear +```shell +pip install 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` diff --git a/pyproject.toml b/pyproject.toml index cffd034..5e7a2fc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,8 +3,13 @@ name = "rejx" version = "0.0.1" description = "Rej(spe)X - Deal with .rej file with minimal pain" authors = ["Markus Sagen "] -license = "MIT" +keywords = ["git", "cookiecutter", "cruft", "rej"] readme = "README.md" +license = "MIT" +homepage = "https://github.com/markussagen/rejx" +repository = "https://github.com/markussagen/rejx" +include = ["LICENSE"] + [tool.poetry.dependencies] python = ">=3.8,<3.12"