- 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.
23 lines
736 B
Python
23 lines
736 B
Python
import os
|
|
import sys
|
|
|
|
# Add the company-explorer directory to the Python path
|
|
sys.path.append(os.path.abspath(os.path.join(os.getcwd(), 'company-explorer')))
|
|
|
|
from backend.database import SessionLocal, MarketingMatrix, Industry, Persona
|
|
from sqlalchemy.orm import joinedload
|
|
|
|
db = SessionLocal()
|
|
try:
|
|
query = db.query(MarketingMatrix).options(
|
|
joinedload(MarketingMatrix.industry),
|
|
joinedload(MarketingMatrix.persona)
|
|
)
|
|
entries = query.all()
|
|
print(f"Total entries: {len(entries)}")
|
|
for e in entries[:3]:
|
|
print(f"ID={e.id}, Industry={e.industry.name if e.industry else 'N/A'}, Persona={e.persona.name if e.persona else 'N/A'}")
|
|
print(f" Subject: {e.subject}")
|
|
finally:
|
|
db.close()
|