chore: auto-commit uncommitted changes
This commit is contained in:
parent
f8f7f69db8
commit
0e9f93f561
4
main.go
4
main.go
|
|
@ -134,7 +134,8 @@ func captureHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// Resize to 50% using sips
|
// Resize to 50% unless full resolution requested
|
||||||
|
if r.URL.Query().Get("full") != "1" {
|
||||||
if out, err := exec.Command("sips", "-g", "pixelWidth", tmpFile).Output(); err == nil {
|
if out, err := exec.Command("sips", "-g", "pixelWidth", tmpFile).Output(); err == nil {
|
||||||
re := regexp.MustCompile(`pixelWidth:\s*(\d+)`)
|
re := regexp.MustCompile(`pixelWidth:\s*(\d+)`)
|
||||||
if m := re.FindSubmatch(out); m != nil {
|
if m := re.FindSubmatch(out); m != nil {
|
||||||
|
|
@ -143,6 +144,7 @@ func captureHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
log.Printf("Captured display %s", display)
|
log.Printf("Captured display %s", display)
|
||||||
serveAndDelete(w, tmpFile)
|
serveAndDelete(w, tmpFile)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue