This commit is contained in:
HarakaraSite
2026-02-11 23:03:35 +09:00
parent 1541f04390
commit 4265769d90
4 changed files with 60 additions and 46 deletions

10
script/fix_and_explain_strudel.sh Normal file → Executable file
View File

@@ -4,6 +4,8 @@
BASE_DIR=$(cd "$(dirname "$0")/.." && pwd)
OUTPUT_DIR="$BASE_DIR/explained"
SKILL_FILE="$BASE_DIR/.gemini/skills/strudel_fix_and_explain.md"
GEMINI_REF="$BASE_DIR/.gemini/gemini.md"
STRUDEL_REF="$BASE_DIR/.gemini/reference.md"
# 出力先フォルダの作成
if [ ! -f "$SKILL_FILE" ]; then
@@ -29,13 +31,17 @@ for file in "${files[@]}"; do
filename=$(basename "$file")
# 特定のファイルやディレクトリを除外
[[ "$filename" =~ ^(Strudel Making Sound|Strudel Study)\.md$ ]] && continue
[[ "$file" =~ /(refactoring|script|explained|organized_strudel)/ ]] && continue
[[ "$file" =~ /(refactoring|script|explained)/ ]] && continue
echo "Analyzing and fixing $filename..."
# 一時ファイルに出力
tmp_file="$OUTPUT_DIR/tmp_$filename"
(cat "$SKILL_FILE"; echo ""; cat "$file") | gemini > "$tmp_file"
( [ -f "$GEMINI_REF" ] && cat "$GEMINI_REF"; \
[ -f "$STRUDEL_REF" ] && cat "$STRUDEL_REF"; \
echo ""; cat "$SKILL_FILE"; \
echo ""; cat "$file" ) | gemini > "$tmp_file"
if [ $? -eq 0 ]; then
# FILENAME: タグを検索