#!/bin/bash # Usage: TOKEN=xxx ./scripts/put-lexicon.sh if [ -z "$TOKEN" ]; then echo "Error: TOKEN environment variable is required" echo "Usage: TOKEN=xxx ./scripts/put-lexicon.sh" exit 1 fi curl -X POST "https://bsky.social/xrpc/com.atproto.repo.putRecord" \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{ "repo": "did:plc:uqzpqmrjnptsxezjx4xuh2mn", "collection": "com.atproto.lexicon.schema", "rkey": "ai.syui.log.post", "record": { "$type": "com.atproto.lexicon.schema", "lexicon": 1, "id": "ai.syui.log.post", "defs": { "main": { "type": "record", "key": "tid", "description": "Record containing a blog post.", "record": { "type": "object", "required": ["title", "content", "createdAt"], "properties": { "title": { "type": "string", "maxLength": 3000, "maxGraphemes": 300 }, "content": { "type": "string", "maxLength": 1000000, "maxGraphemes": 100000 }, "createdAt": { "type": "string", "format": "datetime" }, "lang": { "type": "string", "maxLength": 10 }, "translations": { "type": "unknown" } } } } } } }' echo ""