Files
RMC-WhatsApp-Bot/length_check.py
2026-08-17 11:09:35 +05:30

16 lines
553 B
Python

import re
# Keys that are used for buttons (options)
button_keys = ['opt', 'btn', 'yes', 'no', 'confirm', 'change', 'cancel']
with open('src/main/resources/messages_ta.properties', 'r', encoding='utf-8') as f:
for line in f:
line = line.strip()
if not line or line.startswith('#'):
continue
if '=' in line:
key, val = line.split('=', 1)
is_button = any(bk in key for bk in button_keys)
if is_button and len(val) > 20:
print(f"{key}={val} ({len(val)} chars)")