#!/usr/bin/env python3
"""
Test the card #903 fix with sample card data.
This simulates what would come from mcp__trello__get_card.
"""
import json
import subprocess
import sys

# Sample card data structure (what mcp__trello__get_card would return)
# We'll use placeholder URLs that should exist in the CINIK translation workflow
sample_card = {
    "id": "6a1d64126a923744238639f9",
    "name": "Card #903 - Blog Post Translation Permissions",
    "desc": """
en: https://docs.google.com/document/d/1EN_DOC_ID_HERE/edit
it: https://docs.google.com/document/d/1IT_DOC_ID_HERE/edit
de: https://docs.google.com/document/d/1DE_DOC_ID_HERE/edit
es: https://docs.google.com/document/d/1ES_DOC_ID_HERE/edit
fr: https://docs.google.com/document/d/1FR_DOC_ID_HERE/edit
""",
    "closed": False,
    "idList": "..."
}

# However, we need the REAL card data
# Let's instead create a script that will be called once the Trello tool provides data

print("To execute card #903 fix:")
print("1. Call: mcp__trello__get_card(cardId='6a1d64126a923744238639f9', includeMarkdown=true)")
print("2. Pass result to: /opt/automator/cinik-writer-transtor/files/RUN_CARD_903_COMPLETE.py")
print("3. Output will be JSON with structure: {cardShort, results[], allWriter, problems[]}")
