Files
Brancheneinstufung2/ARCHIVE_legacy_scripts/read_matrix_entry.py
Floke d021b6b71c refactor: [30388f42] Strukturiere Root-Skripte thematisch neu
- Organisiert eine Vielzahl von Skripten aus dem Root-Verzeichnis in thematische Unterordner, um die Übersichtlichkeit zu verbessern und die Migration vorzubereiten.
- Verschiebt SuperOffice-bezogene Test- und Hilfsskripte in .
- Verschiebt Notion-bezogene Synchronisations- und Import-Skripte in .
- Archiviert eindeutig veraltete und ungenutzte Skripte in .
- Die zentralen Helfer  und  bleiben im Root, da sie von mehreren Tools als Abhängigkeit genutzt werden.
2026-03-06 10:16:08 +00:00

38 lines
1.0 KiB
Python

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")