This commit is contained in:
2026-01-16 18:04:33 +09:00
parent 0da23547a6
commit 746b1ccfd3
5 changed files with 191 additions and 6 deletions

43
scripts/put-lexicon.sh Executable file
View File

@@ -0,0 +1,43 @@
#!/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 ""