Skip to content
This repository was archived by the owner on Jul 10, 2025. It is now read-only.

New functions for retrieving and changing rule values #70

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Syoc
Copy link

@Syoc Syoc commented Nov 23, 2018

I use rule.py as a standalone library for parsing and bulk changing rules.
Here are 3 functions I have added to make my life easier
The header is fixed so change_header takes the rule, index to the header item and value to change it to.
change_option takes rule, name of the option and a value. It's just a combination of remove and add.
get_option takes a rule and a name. Used for checking option values. Will only return first found option with given name.

…nge_option(rule, name, value) and get_option(rule, name).
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant