lofibeats/checkwords.py

15 rivejä
367 B
Python

""" Prints out all possibly-bad words in a wordlist """
import sys
import wordfilter
if __name__ == '__main__':
wfilter = wordfilter.Wordfilter()
for fname in sys.argv[1:]:
with open(fname, 'r', encoding='utf-8') as afile:
for line in afile:
if wfilter.blacklisted(line):
print(fname, line.strip())