from pathlib import Path src = Path("/mnt/data/Pasted text.txt") out = Path("/mnt/data/index_passcode.html") html = src.read_text(encoding="utf-8") gate_css = r""" """ gate_html = r"""

Enter Passcode

Enter the passcode to continue.

""" if "" not in html or " or tags.") html = html.replace("", gate_css + "", 1) html = html.replace("", "\n " + gate_html, 1) out.write_text(html, encoding="utf-8") print(f"Created: {out}") print("Passcode gate added. Passcode: 10312012")