feat: reimplement WAV extraction in Go (replaces extract_wavs.sh)
extract.go replaces the bash script with idiomatic Go: - akaiutil process communication via stdin/stdout pipes - partition enumeration (df output parsing) - volume enumeration (dir output parsing per partition) - sample2wavall per volume with WAV count aggregation runAkaiutil is a package-level var — tests stub it with canned output to verify parsing without a real akaiutil binary or ISO. Removed: findScript(), -tool flag on extract, os/exec from main.go Kept: extract_wavs.sh as a standalone utility (no longer called)
This commit is contained in:
@@ -289,8 +289,6 @@ func handleAPIExtract(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
os.MkdirAll(outDir, 0755)
|
||||
|
||||
toolPath := findScript("extract_wavs.sh")
|
||||
|
||||
entries, err := os.ReadDir(isoDir)
|
||||
if err != nil {
|
||||
writeJSON(w, map[string]any{"error": err.Error()})
|
||||
@@ -311,7 +309,7 @@ func handleAPIExtract(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
var messages []string
|
||||
for _, isoPath := range isos {
|
||||
result, err := extractISO(toolPath, isoPath, outDir)
|
||||
result, err := extractISO(isoPath, outDir)
|
||||
if err != nil {
|
||||
messages = append(messages, fmt.Sprintf("FAIL %s: %v", filepath.Base(isoPath), err))
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user