Workflow-App/Workflow/scripts/_check_apostrophe.py
sjcoetzeesj-coder 11d0178ab1 feat: commit Workflow app source; move CIPC credentials to env
Adds the full Next.js app (app/, components/, lib/, scripts/, assets/,
docs/, Dockerfile, compose, configs) to version control.

Security:
- CIPC BizPortal customer-code logins (Login 1 + Login 3) now read
  CIPC_LOGIN1_CODE / CIPC_LOGIN1_PASSWORD / CIPC_LOGIN3_CODE /
  CIPC_LOGIN3_PASSWORD from .env.local instead of source.
- BizPortal personal login in apply-bizportal route reads
  BIZPORTAL_ID_NO / BIZPORTAL_PASSWORD.
- Added .env.example as the committed template.

.gitignore excludes .env*, node_modules, .next, logs, sqlite, Playwright
storage_state.json (live CIPC cookies), scratch dirs, client PDFs and
debug screenshots.
2026-10-18 15:21:45 +02:00

34 lines
1.3 KiB
Python

import sys, importlib.util
spec = importlib.util.spec_from_file_location('mod', r'C:\Users\SJ\.minimax-agent\projects\Workflow\scripts\SARS Retun History Period.py')
m_mod = importlib.util.module_from_spec(spec)
spec.loader.exec_module(m_mod)
print('SUBITEM_LABELS["EMP201"]:')
label = m_mod.SUBITEM_LABELS['EMP201']
print(f' repr: {label!r}')
print(f' bytes hex: {label.encode("utf-8").hex()}')
apos = label[label.index("'")]
print(f' apostrophe at pos {label.index("'")}: U+{ord(apos):04X}')
# Get the actual snapshot
snap = m_mod.run_ab('snapshot', '-i')
# Find the EMP201 line
for line in snap.split('\n'):
if 'EMP201' in line:
print(f'\nactual line: {line!r}')
print(f' bytes hex: {line.encode("utf-8").hex()}')
# Find the apostrophe
i = line.index("Employee")
apos = line[i+8] # "Employee" is 8 chars
print(f' apostrophe at pos {i+8}: U+{ord(apos):04X}')
# Test find_ref
ref = m_mod.find_ref(line, 'link', label)
print(f' find_ref result: {ref}')
# Try with just `s Tax` substring
import re
m = re.search(r'Employee.Tax', line)
print(f' Employee.Tax regex: {m}')
if m:
print(f' matched chars: {m.group()[8]!r} U+{ord(m.group()[8]):04X}')
break