IgnoreRemoverBot is a Python utility that removes the word "ignore:" from the lines in a YAML (.yml) file where the line contains both "ignore:" and "api". This utility is particularly useful when working with YAML files generated by tools like mitmproxy2swagger, where certain valid API endpoints are marked with "ignore:", but you want to remove that label.
-
Ensure you have Python installed on your system.
-
Clone the repository or download the
ignore_remover.py
file from the repository. -
Open a terminal or command prompt and navigate to the directory where the
ignore_remover.py
file is located. -
Run the following command to execute the utility:
python3 ignore_remover.py path/to/your/file.yml
Replace path/to/your/file.yml with the actual path to your YAML file.
-
The utility will process the file, removing the "ignore:" label from the corresponding lines with "api" in the YAML file.
-
The modified content will be saved back to the same file.
-
After the utility finishes, it will display a success message indicating the removal of the "ignore:" label from the corresponding lines with "api" in the YAML file.
Consider the following YAML file (example.yml) before running IgnoreRemoverBot:
# example.yml
- ignore:/workshop/api/
- api: /users
- ignore::8025/api/v2
- ignore:/workshop/api/
Running IgnoreRemoverBot using the following command: python ignore_remover.py example.yml
Will update the example.yml file to:
# example.yml
- /workshop/api/
- api: /users
- ignore::8025/api/v2
- /workshop/api/
The word "ignore:" is removed from the corresponding lines where "api" is present.
This tool is created by Nithin R (@thebinarybot)
If this tool has helped you in any form, please consider buying me a coffee.
This project is licensed under the MIT License.