From f7282bb42903f8926157bd0c945b77076270844a Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Fri, 24 Nov 2023 12:56:22 -0300 Subject: [PATCH] [DOCs] Made clear which regex has more precedence Closes #19 Fixed missing class qualifier --- README.md | 3 ++- kibom/preferences.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ebf2de3..d1f763a 100755 --- a/README.md +++ b/README.md @@ -294,7 +294,8 @@ BoM generation options can be configured (on a per-project basis) by editing the * `GROUP_FIELDS` : A list of component fields used to group components together. * `COMPONENT_ALIASES` : A list of space-separated values which allows multiple schematic symbol visualisations to be consolidated. * `REGEX_INCLUDE` : A list of regular expressions used to explicitly include components. If there are no regex here, all components pass this test. If there are regex here, then a component must match at least one of them to be included in the BoM. -* `REGEX_EXCLUDE` : If a component matches any of these regular expressions, it will *not* be included in the BoM. +* `REGEX_EXCLUDE` : If a component matches any of these regular expressions, it will *not* be included in the BoM. Important: the `REGEX_INCLUDE` section has more precedence. + Example configuration file (.ini format) *default values shown* diff --git a/kibom/preferences.py b/kibom/preferences.py index 011bd80..d42a77d 100755 --- a/kibom/preferences.py +++ b/kibom/preferences.py @@ -386,6 +386,7 @@ def Write(self, file): cf.add_section(self.SECTION_REGEXCLUDES) cf.set(self.SECTION_REGEXCLUDES, '; A series of regular expressions used to exclude parts from the BoM') cf.set(self.SECTION_REGEXCLUDES, '; If a component matches ANY of these, it will be excluded from the BoM') + cf.set(self.SECTION_REGEXCLUDES, '; Important: the [' + self.SECTION_REGINCLUDES + '] section has more precedence') cf.set(self.SECTION_REGEXCLUDES, '; Column names are case-insensitive') cf.set(self.SECTION_REGEXCLUDES, '; Format is: "[ColumName] [Regex]" (separated by a tab')