add lex
This commit is contained in:
38
.github/workflows/generate-record.yml
vendored
Normal file
38
.github/workflows/generate-record.yml
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
name: Generate Record JSON
|
||||
|
||||
on:
|
||||
workflow_dispatch: # 手動トリガー
|
||||
push:
|
||||
paths:
|
||||
- scpt/generate_record.py # スクリプトに変更があったとき
|
||||
schedule:
|
||||
- cron: '0 3 * * *' # 毎日03:00 UTCに自動生成(任意)
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.x'
|
||||
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
pip install -r requirements.txt || true # 必要なら
|
||||
|
||||
- name: Run Record Generator Script
|
||||
run: |
|
||||
python scpt/generate_record.py
|
||||
|
||||
- name: Commit and Push Generated JSON
|
||||
run: |
|
||||
git config --global user.name "GitHub Actions Bot"
|
||||
git config --global user.email "actions@github.com"
|
||||
git add record.json
|
||||
git commit -m "🧬 Auto-generate record.json" || echo "No changes to commit"
|
||||
git push origin main
|
153
lex/ai.syui.system.json
Normal file
153
lex/ai.syui.system.json
Normal file
@ -0,0 +1,153 @@
|
||||
{
|
||||
"lexicon": 1,
|
||||
"id": "ai.syui.system",
|
||||
"revision": 1,
|
||||
"description": "Syui's system definitions for game logic and metaphysics",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "record",
|
||||
"record": {
|
||||
"key": "self",
|
||||
"recordType": "document",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": ["card", "system"],
|
||||
"properties": {
|
||||
"card": {
|
||||
"type": "array",
|
||||
"items": { "$ref": "#card" }
|
||||
},
|
||||
"system": {
|
||||
"type": "array",
|
||||
"items": { "$ref": "#system" }
|
||||
},
|
||||
"weapon": {
|
||||
"type": "array",
|
||||
"items": { "$ref": "#weapon" }
|
||||
},
|
||||
"ability": {
|
||||
"type": "array",
|
||||
"items": { "$ref": "#ability" }
|
||||
},
|
||||
"character": {
|
||||
"type": "array",
|
||||
"items": { "$ref": "#character" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"card": {
|
||||
"type": "object",
|
||||
"required": ["id", "img", "name", "lang"],
|
||||
"properties": {
|
||||
"id": { "type": "integer" },
|
||||
"img": { "type": "string" },
|
||||
"name": { "type": "string" },
|
||||
"lang": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"ja": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": { "type": "string" },
|
||||
"text": { "type": "string" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"system": {
|
||||
"type": "object",
|
||||
"required": ["id", "enum", "name", "lang"],
|
||||
"properties": {
|
||||
"id": { "type": "integer" },
|
||||
"enum": {
|
||||
"type": "array",
|
||||
"items": { "type": "string" }
|
||||
},
|
||||
"name": { "type": "string" },
|
||||
"alias": {
|
||||
"type": "array",
|
||||
"items": { "type": "string" }
|
||||
},
|
||||
"lang": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"ja": { "type": "string" }
|
||||
}
|
||||
},
|
||||
"description": { "type": "string" }
|
||||
}
|
||||
},
|
||||
"weapon": {
|
||||
"type": "object",
|
||||
"required": ["id", "img", "name", "lang"],
|
||||
"properties": {
|
||||
"id": { "type": "integer" },
|
||||
"img": { "type": "string" },
|
||||
"name": { "type": "string" },
|
||||
"lang": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"ja": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": { "type": "string" },
|
||||
"text": { "type": "string" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"ability": {
|
||||
"type": "object",
|
||||
"required": ["id", "name", "color"],
|
||||
"properties": {
|
||||
"id": { "type": "integer" },
|
||||
"name": { "type": "string" },
|
||||
"lang": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"ja": { "type": "string" }
|
||||
}
|
||||
},
|
||||
"color": { "type": "string" },
|
||||
"group": {
|
||||
"type": "array",
|
||||
"items": { "type": "string" }
|
||||
},
|
||||
"duration": { "type": "integer" },
|
||||
"multiplier": {
|
||||
"type": "object",
|
||||
"additionalProperties": { "type": "number" }
|
||||
}
|
||||
}
|
||||
},
|
||||
"character": {
|
||||
"type": "object",
|
||||
"required": ["id", "name", "lang"],
|
||||
"properties": {
|
||||
"id": { "type": "integer" },
|
||||
"img": { "type": "string" },
|
||||
"name": { "type": "string" },
|
||||
"lang": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"ja": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": { "type": "string" },
|
||||
"text": { "type": "string" },
|
||||
"description": { "type": "string" }
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"text": { "type": "string" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
10
scpt/generate_record.py
Normal file
10
scpt/generate_record.py
Normal file
@ -0,0 +1,10 @@
|
||||
import json
|
||||
|
||||
record = {
|
||||
"$type": "app.bsky.feed.post",
|
||||
"text": "テスト投稿 from script",
|
||||
"createdAt": "2025-05-26T12:00:00Z"
|
||||
}
|
||||
|
||||
with open("record.json", "w", encoding="utf-8") as f:
|
||||
json.dump(record, f, ensure_ascii=False, indent=2)
|
Reference in New Issue
Block a user