16 lines
894 B
Python
16 lines
894 B
Python
import sys
|
|
|
|
with open('fotograf-de-scraper/frontend/src/App.tsx', 'r') as f:
|
|
content = f.read()
|
|
|
|
old_body = """ const [emailBody, setEmailBody] = useState("Hallo {Name Käufer},<br><br>deine Fotos sind fertig und warten auf dich! Klicke einfach auf die Links unten, um direkt zu den Galerien zu gelangen:<br><br>{LinksHTML}<br><br>Viel Spaß beim Anschauen!");"""
|
|
new_body = """ const [emailBody, setEmailBody] = useState("Hallo {Name Käufer},<br><br>deine Fotos sind fertig und warten auf dich! Kopiere einfach deinen Zugangscode und klicke auf den Link zum Shop, um dich einzuloggen:<br><br>{LinksHTML}<br><br>Viel Spaß beim Anschauen!");"""
|
|
|
|
if old_body in content:
|
|
content = content.replace(old_body, new_body)
|
|
with open('fotograf-de-scraper/frontend/src/App.tsx', 'w') as f:
|
|
f.write(content)
|
|
print("Frontend patched")
|
|
else:
|
|
print("Frontend code not found")
|