新しいスクリプトファイルの追加: JSONマニフェストを生成するためのmake-json.shとgen_manifest.shを作成し、必要なディレクトリ構造を設定。画像情報を取得するためのAPI呼び出しを実装。バイナリファイル.DS_Storeを追加。
This commit is contained in:
24
make-json.sh
Normal file
24
make-json.sh
Normal file
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
TOKEN="578edf8a8328fb37d6c32f56eb1450622db3492a"
|
||||
BASE="https://git.sunamura-llc.com"
|
||||
OWNER="openRepo"
|
||||
REPO="AI-ART"
|
||||
BRANCH="main"
|
||||
|
||||
OUT="manifest.json"
|
||||
|
||||
images_json=$(curl -s \
|
||||
-H "Authorization: token ${TOKEN}" \
|
||||
"${BASE}/api/v1/repos/${OWNER}/${REPO}/contents/images")
|
||||
|
||||
echo "{
|
||||
\"repo\": \"${OWNER}/${REPO}\",
|
||||
\"branch\": \"${BRANCH}\",
|
||||
\"readme\": \"${BASE}/${OWNER}/${REPO}/raw/branch/${BRANCH}/README.md\",
|
||||
\"task_template\": \"${BASE}/${OWNER}/${REPO}/raw/branch/${BRANCH}/prompts/task_template.md\",
|
||||
\"rules\": \"${BASE}/${OWNER}/${REPO}/raw/branch/${BRANCH}/.cursorrules\",
|
||||
\"images\": $(echo "$images_json" | jq '[.[] | {name: .name, url: .download_url}]')
|
||||
}" > "${OUT}"
|
||||
|
||||
echo "✔ manifest.json generated"
|
||||
Reference in New Issue
Block a user