Skip to content

A python utility to allow valid API requests in a yml file.

License

Notifications You must be signed in to change notification settings

thebinarybot/IgnoreRemoverBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

IgnoreRemoverBot

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.

Usage

  1. Ensure you have Python installed on your system.

  2. Clone the repository or download the ignore_remover.py file from the repository.

  3. Open a terminal or command prompt and navigate to the directory where the ignore_remover.py file is located.

  4. 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.

  5. The utility will process the file, removing the "ignore:" label from the corresponding lines with "api" in the YAML file.

  6. The modified content will be saved back to the same file.

  7. 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.

Example

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.

Author

This tool is created by Nithin R (@thebinarybot)

Buy Me A Coffee

If this tool has helped you in any form, please consider buying me a coffee.

Buy Me A Coffee

License

This project is licensed under the MIT License.

About

A python utility to allow valid API requests in a yml file.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages