Python tool. Scans project and alerts by words-list
If you have no specific need, or no need to search words in Python's project, considere to use a bash onliner :
(
grep -r \
-n \
--include="*" \
--exclude-dir=".venv" \
--exclude-dir=".git" \
--exclude-dir="__pycache__" \
"list\|of\|words\|to\|search" \
. &&
echo "banwords founds!"
) || echo "no banword found"If you want to use that lib in pip env :
git clone git@github.com:LittlePlanetoid/banwords.git
cd banwords
uv build
python -m venv banwords_env
source banwords_env/bin/activate
pip install dist/banwords*.whl
# and use banwords tool everywhere
# > banwords --helpusage: banwords CLI [-h] [-c {pyproject.toml,banwords.toml}] [-l {INFO,DEBUG}]
options:
-h, --help show this help message and exit
-c, --conf {pyproject.toml,banwords.toml}
tool is conf (default: pyproject.toml)
-l, --loglevel {INFO,DEBUG}
lvl your logs (default: INFO)setup banwords with a TOML's conf. You need to mark banwords part using [tool.banwords].
| marker | usage | example |
|---|---|---|
| wordslist | words to find and match | wordslist = ["word1", "word2"] |
| exclude | file is skipped if exclude occurency in its path | exclude = [".venv", ".git", "__pycache__", "uv.lock"] |