Note: All Online Services are disabled and won't work. This is Completely Offline and No subscription needed
'''
os.chdir('/home/pts/Documents/QBPOS_Help_Web/QB_Help_Web/POS_Help')
# Process all htm files except special ones
files = []
for pattern in ['*/*.htm', '*/*/*.htm']:
files.extend(glob.glob(pattern))
files = [f for f in files if not f.startswith('___')]
print(f"Processing {len(files)} files...")
for filepath in files:
try:
with open(filepath, 'r', encoding='utf-8', errors='ignore') as f:
content = f.read()
# Remove all mobile-nav and offline-notice divs
content = re.sub(r'