#!/usr/bin/env python3
import json, subprocess, sys

env = {'GOG_KEYRING_PASSWORD': '', 'PATH': '/usr/local/bin:/usr/bin:/bin', 'HOME': '/root'}

# Read the full sheet
result = subprocess.run(
    ['gog', 'sheets', 'get', '1lPFmhuXnlTchsqE_V5Ntx7k46NFfHSGnldyeL6hH_jQ', 'A1:F20',
     '--account', 'alihajouoc@gmail.com', '--json'],
    capture_output=True, text=True, env=env,
    cwd='/root/.openclaw.pre-migration/workspace'
)
data = json.loads(result.stdout)
values = data.get('values', [])
print('All data:')
for i, row in enumerate(values):
    print(f'Row {i+1}: {json.dumps(row)}')
