Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuration file with multiple replacements #452

Open
b-jordanov opened this issue Feb 12, 2024 · 1 comment
Open

Configuration file with multiple replacements #452

b-jordanov opened this issue Feb 12, 2024 · 1 comment

Comments

@b-jordanov
Copy link

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.

@lifenjoiner
Copy link
Collaborator

Write your own scripts using the CLI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants