import os, sys

sys.stdout.reconfigure(encoding='utf-8')

terms = ['thợ rèn', 'tho ren', 'th rèn', 'sửa đồ', 'sua do', 'sa ', 'dược phẩm', 'duoc pham', 'dc phm', 'tân thủ', 'tan thu', 'tn th', 'reset']

for base in [r'C:\JXVCTK\JxVoCongTruyenKy\_AutoVLBS', r'C:\JXVCTK\JxVoCongTruyenKy\_VLAuto']:
    for root, dirs, files in os.walk(base):
        for f in files:
            if f.endswith(('.lua', '.ini', '.txt', '.ita', '.map')):
                p = os.path.join(root, f)
                try:
                    with open(p, 'r', encoding='latin1') as fp:
                        content = fp.read().lower()
                        for term in terms:
                            if term in content:
                                print(f'Found "{term}" in: {p}')
                                break
                except:
                    pass
