Initial commit of pendingcontractparser.py and associated mailtool-generators.
This commit is contained in:
1 parent
e0df6c5405
commit
45646353dc
6 files changed
+502
No files matched your search
@@ -0,0 +1,68 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import csv
|
||||
from pathlib import Path
|
||||
|
||||
INPUT_CSV = "activation_overview.csv"
|
||||
OUTPUT_DIR = "domainprotection_templates"
|
||||
|
||||
Path(OUTPUT_DIR).mkdir(exist_ok=True)
|
||||
|
||||
with open(INPUT_CSV, newline="", encoding="utf-8") as f:
|
||||
|
||||
reader = csv.DictReader(f)
|
||||
|
||||
for row in reader:
|
||||
|
||||
if row["product"] != "Domain Protection":
|
||||
continue
|
||||
|
||||
customer_name = row["customer_name"]
|
||||
customer_no = row["customer_no"]
|
||||
order_no = row["order_no"]
|
||||
domain = row["domain"]
|
||||
|
||||
mail = f"""Guten Tag {customer_name},
|
||||
|
||||
vielen Dank für Ihre Bestellung von Domain Protection.
|
||||
|
||||
Der zusätzliche Schutz wurde für die Domain
|
||||
|
||||
{domain}
|
||||
|
||||
aktiviert.
|
||||
|
||||
Durch Domain Protection werden kritische Änderungen an Ihrer Domain zusätzlich abgesichert. Dies betrifft insbesondere Änderungen an Nameservern, Inhaberdaten sowie Domaintransfers.
|
||||
|
||||
Sollten künftig Änderungen an dieser Domain erforderlich sein, kann gegebenenfalls eine zusätzliche Authentifizierung oder Freigabe erforderlich werden.
|
||||
|
||||
Damit wird das Risiko unautorisierter Änderungen und Domainübernahmen deutlich reduziert.
|
||||
|
||||
Sollten Sie Fragen zu diesem Produkt haben, stehen wir Ihnen gerne zur Verfügung.
|
||||
|
||||
Mit freundlichen Grüßen
|
||||
|
||||
Patrick Eigner-Pausz
|
||||
easyname GmbH
|
||||
|
||||
Bestellnummer: {order_no}
|
||||
Kundennummer: {customer_no}
|
||||
Domain: {domain}
|
||||
"""
|
||||
|
||||
safe_domain = (
|
||||
domain
|
||||
.replace("/", "_")
|
||||
.replace("\\", "_")
|
||||
.replace(":", "_")
|
||||
)
|
||||
|
||||
filename = (
|
||||
f"{OUTPUT_DIR}/"
|
||||
f"{customer_no}_{safe_domain}.txt"
|
||||
)
|
||||
|
||||
with open(filename, "w", encoding="utf-8") as out:
|
||||
out.write(mail)
|
||||
|
||||
print(f"Erstellt: {filename}")
|
||||
Reference in new issue
Block a user