webcraft-ai-backend / deploy_tmp /find_structure.py
3ssem0
fix: configuration error - aligned entry point to app.py and enforced LF/BOM-less encoding
ec47953
Raw
History Blame Contribute Delete
1.03 kB
import sys
with open('Ai model part/block_schema.py', 'r', encoding='utf-8') as f:
current_block = ""
current_input = ""
in_allowed = False
for i, line in enumerate(f):
ln = i + 1
if "'allowed_connections': {" in line:
in_allowed = True
continue
if not in_allowed: continue
trimmed = line.strip()
# Detect block start: e.g. 'html_body': {
if trimmed.endswith(": {"):
# Extract block name
current_block = trimmed.split("'")[1]
# Detect input start: e.g. 'CONTENT': [
if trimmed.endswith(": ["):
# Extract input name
current_input = trimmed.split("'")[1]
if trimmed == "'html_form',":
print(f"BLOCK: {current_block}, INPUT: {current_input}, LINE: {ln}")
# If we see block categories, we reached the end
if "'block_categories': {" in line:
break