Last active
September 24, 2025 07:16
-
-
Save rainbow23/3c0af7b0515c15c44e27f173db9595a6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ; ============================================================= | |
| ; Kazoeciao Auto-Exec (.cas) — sample generated for your case | |
| ; Edit to match your environment (absolute Windows paths, etc.) | |
| ; * AFTPATH = "変更後" folder | |
| ; * BFRPATH = "変更前" folder | |
| ; * EXEMODE mapping (typical): | |
| ; 1 = Compare Steps (差分) | |
| ; 2 = Count Number of Steps Before Change(変更前ステップ数) | |
| ; 3 = Count Number of Steps After Change(変更後ステップ数) | |
| ; ============================================================= | |
| [AFTPATH] | |
| 20250910/packages/apps/Car/BugReport | |
| [BFRPATH] | |
| 20240922/packages/apps/Car/BugReport | |
| ; === After-only count === | |
| [EXEMODE] | |
| 3 | |
| ; Optional (if supported by your version) | |
| ;[OUTPUTDIR] | |
| ;C:\kazoeciao\out | |
| ;[OUTPUTFORMAT] | |
| ;CSV |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ; ============================================================= | |
| ; Kazoeciao Auto-Exec (.cas) — sample generated for your case | |
| ; Edit to match your environment (absolute Windows paths, etc.) | |
| ; * AFTPATH = "変更後" folder | |
| ; * BFRPATH = "変更前" folder | |
| ; * EXEMODE mapping (typical): | |
| ; 1 = Compare Steps (差分) | |
| ; 2 = Count Number of Steps Before Change(変更前ステップ数) | |
| ; 3 = Count Number of Steps After Change(変更後ステップ数) | |
| ; ============================================================= | |
| [AFTPATH] | |
| 20250910/packages/apps/Car/BugReport | |
| [BFRPATH] | |
| 20240922/packages/apps/Car/BugReport | |
| ; === Before-only count === | |
| [EXEMODE] | |
| 2 | |
| ; Optional (if supported by your version) | |
| ;[OUTPUTDIR] | |
| ;C:\kazoeciao\out | |
| ;[OUTPUTFORMAT] | |
| ;CSV |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ; ============================================================= | |
| ; Kazoeciao Auto-Exec (.cas) — sample generated for your case | |
| ; Edit to match your environment (absolute Windows paths, etc.) | |
| ; * AFTPATH = "変更後" folder | |
| ; * BFRPATH = "変更前" folder | |
| ; * EXEMODE mapping (typical): | |
| ; 1 = Compare Steps (差分) | |
| ; 2 = Count Number of Steps Before Change(変更前ステップ数) | |
| ; 3 = Count Number of Steps After Change(変更後ステップ数) | |
| ; ============================================================= | |
| [AFTPATH] | |
| 20250910/packages/apps/Car/BugReport | |
| [BFRPATH] | |
| 20240922/packages/apps/Car/BugReport | |
| ; === Compare (diff) === | |
| [EXEMODE] | |
| 1 | |
| ; Optional (if supported by your version) | |
| ;[OUTPUTDIR] | |
| ;C:\kazoeciao\out | |
| ;[OUTPUTFORMAT] | |
| ;CSV |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| set -euo pipefail | |
| # =========================================================== | |
| # Kazoeciao bash runner (Git Bash / WSL 用) | |
| # 1) 下の3つの変数だけ自分の環境に合わせて修正してください。 | |
| # 2) 事前に Kazoeciao 側で CSV 出力を有効化し、OUTPUT_DIR を出力先に設定。 | |
| # 3) このスクリプトと cas_*.cas を同じフォルダに置き、実行します。 | |
| # =========================================================== | |
| # --- EDIT HERE --------------------------------------------- | |
| # Git Bash の場合の例(推奨): | |
| KAZOECIAO_EXE="/c/Program Files/Kazoeciao/kazoeciao.exe" | |
| # WSL の場合の例: | |
| # KAZOECIAO_EXE="/mnt/c/Program Files/Kazoeciao/kazoeciao.exe" | |
| OUTPUT_DIR="/c/kazoeciao/out" # CSV の出力先(Kazoeciao 側設定と一致させる) | |
| BASE="20250910_packages_apps_Car_BugReport" | |
| # ----------------------------------------------------------- | |
| mkdir -p "$OUTPUT_DIR" | |
| SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" | |
| grab_latest() { | |
| local out_dir="$1" | |
| local dest="$2" | |
| shopt -s nullglob | |
| # 最新の CSV 1件を拾う | |
| local latest=() | |
| # ls -t は更新時刻降順 | |
| latest=( $(ls -t "$out_dir"/*.csv 2>/dev/null || true) ) | |
| if [[ ${#latest[@]} -eq 0 ]]; then | |
| echo "[WARN] No CSV found under $out_dir" >&2 | |
| return 0 | |
| fi | |
| cp -f "${latest[0]}" "$out_dir/$dest" | |
| echo "Saved: $out_dir/$dest" | |
| } | |
| run_one() { | |
| local cas="$1" | |
| local dest="$2" | |
| echo ">> Running: $cas" | |
| # そのまま .exe を呼べば終了まで待機します(/NA /NS /ML 付与) | |
| "$KAZOECIAO_EXE" /NA /NS /ML "$cas" | |
| grab_latest "$OUTPUT_DIR" "$dest" | |
| } | |
| pushd "$SCRIPT_DIR" >/dev/null | |
| # 1/3 After(変更後のみカウント) | |
| run_one "cas_after.cas" "${BASE}-after.csv" | |
| # 2/3 Before(変更前のみカウント) | |
| run_one "cas_before.cas" "${BASE}-before.csv" | |
| # 3/3 Compare(差分) | |
| run_one "cas_compare.cas" "${BASE}.csv" | |
| popd >/dev/null | |
| echo "Done." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment