Add standalone desktop workflow

This commit is contained in:
2026-04-24 11:54:33 +03:00
parent 75c6b928ae
commit 50246ada85
20 changed files with 1068 additions and 306 deletions
+20
View File
@@ -0,0 +1,20 @@
package dialog
import (
"fmt"
"os/exec"
"strings"
)
func PickFolder() (string, error) {
cmd := exec.Command("osascript", "-e", `POSIX path of (choose folder with prompt "Select a folder")`)
out, err := cmd.CombinedOutput()
if err != nil {
return "", fmt.Errorf("folder selection failed: %s", strings.TrimSpace(string(out)))
}
path := strings.TrimSpace(string(out))
if path == "" {
return "", fmt.Errorf("folder selection canceled")
}
return strings.TrimSuffix(path, "/"), nil
}