{
"event": "PreToolUse",
"tool_name": "Bash",
"tool_input": {
"command": ".\/venv\/bin\/python << 'EOF'\nimport sys\nimport json\nsys.path.insert(0, '\/var\/www\/scripts\/pipeline')\nfrom config import get_db_password\nimport mysql.connector\n\nconn = mysql.connector.connect(host='localhost', database='ki_content', user='root', password=get_db_password())\ncursor = conn.cursor(dictionary=True)\n\n# 1. Fix Cary LinkedIn profile - add grammatik_und_satzbau section\ncursor.execute(\"SELECT content FROM content_config WHERE id = 28\")\nprofile = cursor.fetchone()\nconfig = json.loads(profile['content'])\n\n# Add grammatik_und_satzbau from Cary Blog\nconfig['grammatik_und_satzbau'] = {\n \"saetze\": \"vollstaendig grammatikalisch korrekt\",\n \"rhythmus\": \"ruhig mit variierenden satzlaengen\",\n \"stakkato\": \"ausgeschlossen\",\n \"einschuebe\": \"keine\",\n \"gedankenstriche\": \"verboten\"\n}\n\nnew_content = json.dumps(config, ensure_ascii=False)\ncursor.execute(\"UPDATE content_config SET content = %s, updated_at = NOW() WHERE id = 28\", (new_content,))\nconn.commit()\nprint(\"✓ Cary LinkedIn (ID 28): grammatik_und_satzbau hinzugefügt\")\n\n# 2. Fix Formatierungsprüfer - add Gedankenstriche to fokus\ncursor.execute(\"SELECT content FROM content_config WHERE id = 33\")\ncritic = cursor.fetchone()\ncritic_config = json.loads(critic['content'])\n\nfokus = critic_config.get('fokus', [])\nif 'Gedankenstrich-Verbot: Keine Gedankenstriche (– oder —) im Text' not in fokus:\n fokus.append('Gedankenstrich-Verbot: Keine Gedankenstriche (– oder —) im Text')\n critic_config['fokus'] = fokus\n \n new_content = json.dumps(critic_config, ensure_ascii=False)\n cursor.execute(\"UPDATE content_config SET content = %s, updated_at = NOW() WHERE id = 33\", (new_content,))\n conn.commit()\n print(\"✓ Formatierungsprüfer (ID 33): Gedankenstrich-Verbot hinzugefügt\")\nelse:\n print(\"~ Formatierungsprüfer: Gedankenstrich-Verbot bereits vorhanden\")\n\ncursor.close()\nconn.close()\n\nprint(\"\\n=== FIXES ANGEWENDET ===\")\nEOF\n",
"description": "Fix profile and critic gaps"
}
}