[30388f42] Infrastructure Hardening: Repaired CE/Connector DB schema, fixed frontend styling build, implemented robust echo shield in worker v2.1.1, and integrated Lead Engine into gateway.
This commit is contained in:
37
ARCHIVE_legacy_scripts/read_matrix_entry.py
Normal file
37
ARCHIVE_legacy_scripts/read_matrix_entry.py
Normal file
@@ -0,0 +1,37 @@
|
||||
|
||||
import sys
|
||||
import os
|
||||
sys.path.append(os.path.join(os.path.dirname(__file__), "company-explorer"))
|
||||
from backend.database import SessionLocal, Industry, Persona, MarketingMatrix
|
||||
|
||||
def read_specific_entry(industry_name: str, persona_name: str):
|
||||
db = SessionLocal()
|
||||
try:
|
||||
entry = (
|
||||
db.query(MarketingMatrix)
|
||||
.join(Industry)
|
||||
.join(Persona)
|
||||
.filter(Industry.name == industry_name, Persona.name == persona_name)
|
||||
.first()
|
||||
)
|
||||
|
||||
if not entry:
|
||||
print(f"No entry found for {industry_name} and {persona_name}")
|
||||
return
|
||||
|
||||
print("--- Generated Text ---")
|
||||
print(f"Industry: {industry_name}")
|
||||
print(f"Persona: {persona_name}")
|
||||
print("\n[Intro]")
|
||||
print(entry.intro)
|
||||
print("\n[Social Proof]")
|
||||
print(entry.social_proof)
|
||||
print("----------------------")
|
||||
|
||||
finally:
|
||||
db.close()
|
||||
|
||||
if __name__ == "__main__":
|
||||
read_specific_entry("Healthcare - Hospital", "Infrastruktur-Verantwortlicher")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user