grepWin icon indicating copy to clipboard operation
grepWin copied to clipboard

Configuration file with multiple replacements

Open b-jordanov opened this issue 1 year ago • 1 comments

Is there a method to generate a preconfigured file, such as a .yml file, containing instructions? Subsequently, could GrepWin be employed to systematically process this file, executing replacements in the order specified until the entire list is traversed? I envision a streamlined configuration process that can be initiated with a single command:

`replacements:

  • search_keyphrase: "OriginalString" replace_keyphrase: "ReaplacmentString" folder_location: "/path/to/folder1" exceptions:

    • "exception_folder1"
    • "exception_folder2" search_in_files: true search_in_file_names: true search_in_folder_names: false whole_word: true
  • search_keyphrase: "AnotherKeyword" replace_keyphrase: "NewValue" folder_location: "/path/to/folder2" use_regex: true exceptions:

    • "exception_folder3" search_in_files: false search_in_file_names: false search_in_folder_names: true
  • search_string: "./ 1 1 e m91dmlqcncrandomstringgoeshere Symbols, tabs, etc $%#!()$_! it may have spaces in it as well" replace_string: "replaced value for the string" folder_location: "/path/to/folder3" exceptions:

    • "/path/example"
    • "/path/example/*" search_in_files: true search_in_file_names: false search_in_folder_names: true
  • search_keyphrase: "RegexExample[0-9]+" replace_keyphrase: "NumericValue" folder_location: "/path/to/folder4" use_regex: true exceptions:

    • "/path/regex_folder" search_in_files: true search_in_file_names: true search_in_folder_names: false`

(And yes, I know grep win does not search in folder and file names but that would be great too if possible). Thank you for the wonderful tool! It does magic when I have to deal with Windows.

b-jordanov avatar Feb 12 '24 15:02 b-jordanov

Write your own scripts using the CLI.

lifenjoiner avatar Mar 22 '24 04:03 lifenjoiner