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.
This commit is contained in:
40
ARCHIVE_legacy_scripts/check_benni.py
Normal file
40
ARCHIVE_legacy_scripts/check_benni.py
Normal file
@@ -0,0 +1,40 @@
|
||||
import sqlite3
|
||||
import os
|
||||
import json
|
||||
|
||||
DB_PATH = "companies_v3_fixed_2.db"
|
||||
|
||||
def check_company_33():
|
||||
if not os.path.exists(DB_PATH):
|
||||
print(f"❌ Database not found at {DB_PATH}")
|
||||
return
|
||||
|
||||
try:
|
||||
conn = sqlite3.connect(DB_PATH)
|
||||
cursor = conn.cursor()
|
||||
|
||||
print(f"🔍 Checking Company ID 33 (Bennis Playland)...")
|
||||
# Check standard fields
|
||||
cursor.execute("SELECT id, name, city, street, zip_code FROM companies WHERE id = 33")
|
||||
row = cursor.fetchone()
|
||||
if row:
|
||||
print(f" Standard: City='{row[2]}', Street='{row[3]}', Zip='{row[4]}'")
|
||||
else:
|
||||
print(" ❌ Company 33 not found in DB.")
|
||||
|
||||
# Check Enrichment
|
||||
cursor.execute("SELECT content FROM enrichment_data WHERE company_id = 33 AND source_type = 'website_scrape'")
|
||||
enrich_row = cursor.fetchone()
|
||||
if enrich_row:
|
||||
data = json.loads(enrich_row[0])
|
||||
imp = data.get("impressum")
|
||||
print(f" Impressum Data: {json.dumps(imp, indent=2) if imp else 'None'}")
|
||||
else:
|
||||
print(" ❌ No website_scrape found for Company 33.")
|
||||
|
||||
conn.close()
|
||||
except Exception as e:
|
||||
print(f"❌ Error: {e}")
|
||||
|
||||
if __name__ == "__main__":
|
||||
check_company_33()
|
||||
Reference in New Issue
Block a user