fix plc
This commit is contained in:
43
scripts/put-lexicon.sh
Executable file
43
scripts/put-lexicon.sh
Executable 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 ""
|
||||
Reference in New Issue
Block a user