Substitute Regex in files with prompt confirmation https://pypi.org/project/subprompt/
Go to file
Augusto Gunsch 9a978e23e1
Fix issues
2022-11-15 18:28:05 +01:00
src/subprompt Fix issues 2022-11-15 18:28:05 +01:00
.gitignore Publish to PyPI 2022-11-11 23:07:41 +01:00
LICENSE Add LICENSE 2022-11-11 23:11:53 +01:00
Makefile Publish to PyPI 2022-11-11 23:07:41 +01:00
README.md Fix issues 2022-11-15 18:28:05 +01:00
pyproject.toml Publish to PyPI 2022-11-11 23:07:41 +01:00
requirements.txt Add build and twine to requirements 2022-11-15 18:27:26 +01:00
setup.cfg Fix issues 2022-11-15 18:28:05 +01:00

README.md

subprompt

Interactively change every line matching a regex in multiple files.

Installation

Through PyPI:

python3.9 -m pip install subprompt

Usage

usage: subprompt.py [-h] (-d | -r R) [-n N] REGEX FILES [FILES ...]

Modifies lines matched by a regex interactively

positional arguments:
  REGEX
  FILES

optional arguments:
  -h, --help  show this help message and exit
  -d          delete line
  -r R        replace match with expression
  -n N        size of lines preview (default=3)