diff --git a/go.mod b/go.mod index ada4ffc..52d8f00 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.17 require ( fyne.io/fyne/v2 v2.1.1 - github.com/chabad360/go-osc v0.0.0-20211117011233-5673a33c881f + github.com/chabad360/go-osc v0.0.0-20220217020417-1229c4fc60a5 github.com/go-playground/pure/v5 v5.2.0 nhooyr.io/websocket v1.8.7 ) @@ -12,7 +12,6 @@ require ( //replace github.com/chabad360/go-osc => ../go-osc require ( - github.com/cpuguy83/go-md2man/v2 v2.0.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/fredbi/uri v0.0.0-20181227131451-3dcfdacbaaf3 // indirect github.com/fsnotify/fsnotify v1.5.1 // indirect @@ -23,15 +22,10 @@ require ( github.com/godbus/dbus/v5 v5.0.6 // indirect github.com/goki/freetype v0.0.0-20181231101311-fa8a33aabaff // indirect github.com/klauspost/compress v1.13.6 // indirect - github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/srwiley/oksvg v0.0.0-20211104221756-aeb4ca2c1505 // indirect github.com/srwiley/rasterx v0.0.0-20210519020934-456a8d69b780 // indirect github.com/stretchr/testify v1.7.0 // indirect - github.com/tc-hib/go-winres v0.2.3 // indirect - github.com/tc-hib/winres v0.1.5 // indirect - github.com/urfave/cli/v2 v2.3.0 // indirect github.com/yuin/goldmark v1.4.4 // indirect golang.org/x/image v0.0.0-20211028202545-6944b10bf410 // indirect golang.org/x/net v0.0.0-20211116231205-47ca1ff31462 // indirect diff --git a/go.sum b/go.sum index 5cabcf6..c747455 100644 --- a/go.sum +++ b/go.sum @@ -4,20 +4,16 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03 github.com/BurntSushi/toml v0.4.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/Kodeworks/golang-image-ico v0.0.0-20141118225523-73f0f4cfade9/go.mod h1:7uhhqiBaR4CpN0k9rMjOtjpcfGd6DG2m04zQxKnWQ0I= github.com/akavel/rsrc v0.8.0/go.mod h1:uLoCtb9J+EyAqh+26kdrTgmzRBFPGOolLWKpdxkKq+c= -github.com/chabad360/go-osc v0.0.0-20211110211026-9f478a12a4a9 h1:9nZwmgSAWhuV+q4srz4/w3xUJRXxreCQL40VNIl5txo= -github.com/chabad360/go-osc v0.0.0-20211110211026-9f478a12a4a9/go.mod h1:qA5AnCwcSVjK/TkUCPamRqEpHf/u5oWbGFtB/ddfoa0= -github.com/chabad360/go-osc v0.0.0-20211117011233-5673a33c881f h1:RVEyWlVzssJ53s7jWT3lle1BKF71wSO8lce0O8mxnFM= -github.com/chabad360/go-osc v0.0.0-20211117011233-5673a33c881f/go.mod h1:qp07JQcKIBzGSPx//NoF84b6B3JMCr+SSeFz7kDNxY8= +github.com/chabad360/go-osc v0.0.0-20220216233102-8894d29d9fea h1:ngHxpP0GUblhyt2DWIHvaBRPTM8VB8XkYJ81TEIJGTs= +github.com/chabad360/go-osc v0.0.0-20220216233102-8894d29d9fea/go.mod h1:SxhoJ/QyHpv+WPTqoLtIhjKZMIy0x3QQRdwQ6Ug3nk4= +github.com/chabad360/go-osc v0.0.0-20220217020417-1229c4fc60a5 h1:TflojXcP1trvcO79pbZfZGqBYhNnSC9hC4saFFhWBzc= +github.com/chabad360/go-osc v0.0.0-20220217020417-1229c4fc60a5/go.mod h1:SxhoJ/QyHpv+WPTqoLtIhjKZMIy0x3QQRdwQ6Ug3nk4= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.0 h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng4PGlyM= -github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dvyukov/go-fuzz v0.0.0-20210103155950-6a8e9d1f2415/go.mod h1:11Gm+ccJnvAhCNLlf5+cS9KjtbaD5I5zaZpFMsTHWTw= github.com/fredbi/uri v0.0.0-20181227131451-3dcfdacbaaf3 h1:FDqhDm7pcsLhhWl1QtD8vlzI4mm59llRvNzrFg6/LAA= github.com/fredbi/uri v0.0.0-20181227131451-3dcfdacbaaf3/go.mod h1:CzM2G82Q9BDUvMTGHnXf/6OExw/Dz2ivDj48nVg7Lg8= -github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI= github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= @@ -25,11 +21,9 @@ github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= github.com/gin-gonic/gin v1.6.3 h1:ahKqKTFpO5KTPHxWZjEdPScmYaGtLo8Y4DMHoEsnp14= github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= -github.com/go-gl/gl v0.0.0-20210813123233-e4099ee2221f h1:s0O46d8fPwk9kU4k1jj76wBquMVETx7uveQD9MCIQoU= github.com/go-gl/gl v0.0.0-20210813123233-e4099ee2221f/go.mod h1:wjpnOv6ONl2SuJSxqCPVaPZibGFdSci9HFocT9qtVYM= github.com/go-gl/gl v0.0.0-20211025173605-bda47ffaa784 h1:1Zi56D0LNfvkzM+BdoxKryvUEdyWO7LP8oRT+oSYJW0= github.com/go-gl/gl v0.0.0-20211025173605-bda47ffaa784/go.mod h1:9YTyiznxEY1fVinfM7RvRcjRHbw2xLBJ3AAGIT0I4Nw= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20210410170116-ea3d685f79fb h1:T6gaWBvRzJjuOrdCtg8fXXjKai2xSDqWTcKFUPuw8Tw= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20210410170116-ea3d685f79fb/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20211024062804-40e447a793be h1:Z28GdQBfKOL8tNHjvaDn3wHDO7AzTRkmAXvHvnopp98= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20211024062804-40e447a793be/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -38,13 +32,11 @@ github.com/go-playground/assert v1.2.1 h1:ad06XqC+TOv0nJWnbULSlh3ehp5uLuQEojZY5T github.com/go-playground/assert v1.2.1/go.mod h1:Lgy+k19nOB/wQG/fVSQ7rra5qYugmytMQqvQ2dgjWn8= github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= -github.com/go-playground/form/v4 v4.1.1 h1:1T9lGt3WRHuDwT5uwx7RYQZfxVwWZhF0DC1ovKyNnWY= github.com/go-playground/form/v4 v4.1.1/go.mod h1:q1a2BY+AQUUzhl6xA/6hBetay6dEIhMHjgvJiGo6K7U= github.com/go-playground/form/v4 v4.2.0 h1:N1wh+Goz61e6w66vo8vJkQt+uwZSoLz50kZPJWR8eic= github.com/go-playground/form/v4 v4.2.0/go.mod h1:q1a2BY+AQUUzhl6xA/6hBetay6dEIhMHjgvJiGo6K7U= github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= -github.com/go-playground/pkg/v5 v5.2.0 h1:rjauo+ugKwbpX/wxGdhLQHMba2PMwtOXhB5HdV9l3Ow= github.com/go-playground/pkg/v5 v5.2.0/go.mod h1:4JbhbKhH362Z8RQ7XBVlvysNbGUNgiMVo2Iuyy36qhc= github.com/go-playground/pkg/v5 v5.3.0 h1:G+DOJRqMoQTpnSGEjc1rWat6pE4EKp7ejM3udkjCi78= github.com/go-playground/pkg/v5 v5.3.0/go.mod h1:HXedFsSf7dogjVi5wmbOK7P+doyvzvLYMNlyX+PfGZI= @@ -60,7 +52,6 @@ github.com/gobwas/pool v0.2.0 h1:QEmUOlnSjWtnpRGHF3SauEiOsy82Cup83Vf2LcMlnc8= github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= github.com/gobwas/ws v1.0.2 h1:CoAavW/wd/kulfZmSIBt6p24n4j7tHgNVCjsfHVNUbo= github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= -github.com/godbus/dbus/v5 v5.0.4 h1:9349emZab16e7zQvpmsbtjc18ykshndd8y2PG3sgJbA= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.0.6 h1:mkgN1ofwASrYnJ5W6U/BxG15eXXXjirgZc7CLqkcaro= github.com/godbus/dbus/v5 v5.0.6/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= @@ -78,7 +69,6 @@ github.com/jackmordaunt/icns v0.0.0-20181231085925-4f16af745526/go.mod h1:UQkeMH github.com/josephspurrier/goversioninfo v0.0.0-20200309025242-14b0ab84c6ca/go.mod h1:eJTEwMjXb7kZ633hO3Ln9mBUCOjX2+FlTljvpl9SYdE= github.com/json-iterator/go v1.1.9 h1:9yzud/Ht36ygwatGx56VwCZtlI/2AD15T1X2sjSuGns= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/klauspost/compress v1.10.3 h1:OP96hzwJVBIHYU52pVTI6CczrxPvrGfgqF9N5eTO0Q8= github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.13.6 h1:P76CopJELS0TiO2mebmnzgWaajssP/EszplttgQxcgc= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= @@ -94,7 +84,6 @@ github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OH github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742 h1:Esafd1046DLDQ0W1YjYsBW+p8U2u7vzgW2SQVmlNazg= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 h1:zYyBkD/k9seD2A7fsi6Oo2LfFZAehjjQMERAvZLEDnQ= github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646/go.mod h1:jpp1/29i3P1S/RLdc7JQKbRpFeM1dOBd8T9ki5s+AY8= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= @@ -103,16 +92,12 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= -github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/srwiley/oksvg v0.0.0-20200311192757-870daf9aa564 h1:HunZiaEKNGVdhTRQOVpMmj5MQnGnv+e8uZNu3xFLgyM= github.com/srwiley/oksvg v0.0.0-20200311192757-870daf9aa564/go.mod h1:afMbS0qvv1m5tfENCwnOdZGOF8RGR/FsZ7bvBxQGZG4= github.com/srwiley/oksvg v0.0.0-20211104221756-aeb4ca2c1505 h1:fWb9FJAdmiORr+NEeaadjEXp6C2qGAjdd7icfppTskE= github.com/srwiley/oksvg v0.0.0-20211104221756-aeb4ca2c1505/go.mod h1:afMbS0qvv1m5tfENCwnOdZGOF8RGR/FsZ7bvBxQGZG4= -github.com/srwiley/rasterx v0.0.0-20200120212402-85cb7272f5e9 h1:m59mIOBO4kfcNCEzJNy71UkeF4XIx2EVmL9KLwDQdmM= github.com/srwiley/rasterx v0.0.0-20200120212402-85cb7272f5e9/go.mod h1:mvWM0+15UqyrFKqdRjY6LuAVJR0HOVhJlEgZ5JWtSWU= github.com/srwiley/rasterx v0.0.0-20210519020934-456a8d69b780 h1:oDMiXaTMyBEuZMU53atpxqYsSB3U1CHkeAu2zr6wTeY= github.com/srwiley/rasterx v0.0.0-20210519020934-456a8d69b780/go.mod h1:mvWM0+15UqyrFKqdRjY6LuAVJR0HOVhJlEgZ5JWtSWU= @@ -120,37 +105,26 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/tc-hib/go-winres v0.2.3 h1:bTcZw1203elRYLfwAKvqmn/QxoEsu0v6rD1aTwqbBYw= -github.com/tc-hib/go-winres v0.2.3/go.mod h1:FRwdiFCMlYN/Z3xboZXWi4VnYtC1V3b0t7fW3+elv78= -github.com/tc-hib/winres v0.1.5 h1:2dA5yfjdoEA3UyRaOC92HNMt3jap66pLzoW4MjpC/0M= -github.com/tc-hib/winres v0.1.5/go.mod h1:pe6dOR40VOrGz8PkzreVKNvEKnlE8t4yR8A8naL+t7A= github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= -github.com/urfave/cli/v2 v2.3.0 h1:qph92Y649prgesehzOrQjdWyxFOp/QVM+6imKHad91M= github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.3.8 h1:Nw158Q8QN+CPgTmVRByhVwapp8Mm1e2blinhmx4wx5E= github.com/yuin/goldmark v1.3.8/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.4 h1:zNWRjYUW32G9KirMXYHQHVNFkXvMI7LpgNW2AgYAoIs= github.com/yuin/goldmark v1.4.4/go.mod h1:rmuwmfZ0+bvzB24eSC//bk1R1Zp3hM0OXYv/G2LIilg= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/image v0.0.0-20200430140353-33d19683fad8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/image v0.0.0-20201208152932-35266b937fa6/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/image v0.0.0-20210220032944-ac19c3e999fb h1:fqpd0EBDzlHRCjiphRR5Zo/RSWWQlWv34418dnEixWk= -golang.org/x/image v0.0.0-20210220032944-ac19c3e999fb/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/image v0.0.0-20211028202545-6944b10bf410 h1:hTftEOvwiOq2+O8k2D5/Q7COC7k5Qcrgc2TFURJYnvQ= golang.org/x/image v0.0.0-20211028202545-6944b10bf410/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 h1:4nGaVu0QrbjT/AK2PRLuQfQuh6DJve+pELhqTdAj3x0= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20211116231205-47ca1ff31462 h1:2vmJlzGKvQ7e/X9XT0XydeWDxmqx8DnegiIMRT+5ssI= golang.org/x/net v0.0.0-20211116231205-47ca1ff31462/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= @@ -163,15 +137,14 @@ golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c h1:F1jZWGFhYfh0Ci55sIpILtKKK8p3i2/krTr0H1rg74I= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211116061358-0a5406a5449c h1:DHcbWVXeY+0Y8HHKR+rbLwnoh2F4tNCY7rTiHJ30RmA= golang.org/x/sys v0.0.0-20211116061358-0a5406a5449c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= @@ -190,7 +163,6 @@ gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8X gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= diff --git a/gui.go b/gui.go index 523c3d5..73532fc 100644 --- a/gui.go +++ b/gui.go @@ -1,17 +1,17 @@ package main import ( + _ "embed" "fmt" + "html/template" + "runtime" + "fyne.io/fyne/v2" "fyne.io/fyne/v2/container" "fyne.io/fyne/v2/data/binding" "fyne.io/fyne/v2/data/validation" "fyne.io/fyne/v2/dialog" "fyne.io/fyne/v2/widget" - "html/template" - "runtime" - - _ "embed" ) var ( @@ -33,7 +33,7 @@ func gui() { timeLeftLabel := widget.NewLabelWithData(timeLeftBinding) clipLengthLabel := widget.NewLabelWithData(clipLengthBinding) clipNameLabel := widget.NewLabelWithData(clipNameBinding) - resetButton := widget.NewButton("Reset Timecode", reset) + resetButton := widget.NewButton("Reset Timecode", lightReset) resetButton.Hide() path := widget.NewEntry() diff --git a/main.go b/main.go index a7700b9..a3a2c81 100644 --- a/main.go +++ b/main.go @@ -1,21 +1,18 @@ package main import ( - "bytes" "context" "embed" - "errors" - "fmt" - "fyne.io/fyne/v2/app" - "github.com/chabad360/go-osc/osc" - "github.com/go-playground/pure/v5" "net" "net/http" - "nhooyr.io/websocket" "runtime" - "strconv" "sync" "time" + + "fyne.io/fyne/v2/app" + "github.com/chabad360/go-osc/osc" + "github.com/go-playground/pure/v5" + "nhooyr.io/websocket" ) var ( @@ -38,14 +35,11 @@ var ( p = pure.New() httpServer *http.Server - conn net.PacketConn - //buf = bytes.NewBuffer(make([]byte, 0, 65535)) - wg sync.WaitGroup - running bool - message = &osc.Message{Arguments: []interface{}{"?"}} - client *net.UDPConn - b = new(bytes.Buffer) - t = time.Tick(time.Minute) + oscServer *osc.Server + wg sync.WaitGroup + running bool + message = &osc.Message{Arguments: []interface{}{"?"}} + t = time.Tick(time.Minute) ) func main() { @@ -63,44 +57,34 @@ func main() { } func serverStart() error { - var err error if running { return nil } - port, _ := strconv.Atoi(OSCPort) - addr, err := net.ResolveUDPAddr("udp", fmt.Sprintf("%s:%d", OSCAddr, port)) - if err != nil { - return err - } - client, err = net.DialUDP("udp", nil, addr) - if err != nil { - return err - } - - conn, err = net.ListenPacket("udp", ":"+OSCOutPort) - if err != nil { - return fmt.Errorf("couldn't listen: %w", err) - } + oscServer = &osc.Server{Addr: ":" + OSCOutPort, Handler: handleOSC} wg.Add(1) - go listenOSC(conn, &wg) + go func() { + defer wg.Done() + oscServer.ListenAndServe() + }() - message.Address = fmt.Sprintf("%s/name", clipPath) - b.Reset() - message.LightMarshalBinary(b) - client.Write(b.Bytes()) + //message.Address = fmt.Sprintf("%s/name", clipPath) + //if _, err := oscServer.WriteTo(message, OSCAddr+":"+OSCPort); err != nil { + // return err + //} httpServer = &http.Server{Addr: ":" + httpPort, Handler: p.Serve()} + wg.Add(1) go func() { - wg.Add(1) + defer wg.Done() httpServer.ListenAndServe() - wg.Done() }() + wg.Add(1) go func() { - wg.Add(1) + defer wg.Done() for !running { } for running { @@ -111,31 +95,20 @@ func serverStart() error { time.Sleep(time.Millisecond * 100) } } - wg.Done() - }() - - go func() { - wg.Add(1) - for !running { - } - for running { - time.Sleep(time.Millisecond * 100) - timeLeftBinding.Set(timeLeft) - } - timeLeftBinding.Set("00:00:00.000") - wg.Done() }() + wg.Add(1) go func() { - wg.Add(1) + defer wg.Done() for !running { } for running { time.Sleep(time.Millisecond * 110) clipLengthBinding.Set("Clip Length: " + clipLength) + timeLeftBinding.Set(timeLeft) } + timeLeftBinding.Set("00:00:00.000") clipLengthBinding.Set("Clip Length: 0.000s") - wg.Done() }() running = true @@ -147,9 +120,7 @@ func serverStop() { broadcast.Publish([]byte("/stop ")) ctx, c := context.WithTimeout(context.Background(), time.Second*3) err := httpServer.Shutdown(ctx) - if conn != nil { - conn.Close() - } + oscServer.Close() if err != nil { httpServer.Close() } @@ -169,36 +140,16 @@ func getIP() net.IP { return conn.LocalAddr().(*net.UDPAddr).IP } -func listenOSC(conn net.PacketConn, wg *sync.WaitGroup) { - defer wg.Done() - server := &osc.Server{} - for { - packet, err := server.ReceivePacket(conn) - if err != nil { - if errors.Is(err, net.ErrClosed) { - return - } - continue - } +func handleOSC(packet osc.Packet, a net.Addr) { + if packet != nil { + switch data := packet.(type) { + case *osc.Message: + //fmt.Println(data) + procMsg(data) - if packet != nil { - fmt.Println(packet) - switch data := packet.(type) { - default: - continue - case *osc.Message: - fmt.Println(data) - procMsg(data) - - case *osc.Bundle: - for _, elem := range data.Elements { - switch data := elem.(type) { - case *osc.Message: - procMsg(data) - case *osc.Bundle: - panic("stop nesting bundles") - } - } + case *osc.Bundle: + for _, elem := range data.Elements { + handleOSC(elem, a) } } } diff --git a/main.js b/main.js index 4303ac9..0622dff 100644 --- a/main.js +++ b/main.js @@ -84,7 +84,7 @@ function procTime(data) { timecodeSeconds.innerHTML = data[2].split(".")[0]; timecodeMS.innerHTML = data[2].split(".")[1]; - if (parseInt(data[2]) <= 11 && parseInt(data[1]) < 1 && parseInt(data[0].substring(1)) < 1) { + if (parseInt(data[2]) <= 10 && parseInt(data[1]) < 1 && parseInt(data[0].substring(1)) < 1) { table.style.color = "#ff4545"; tableBorder.style.borderColor = "#ff4545"; } else { diff --git a/procmessage.go b/procmessage.go index 000c6da..ecc9cc8 100644 --- a/procmessage.go +++ b/procmessage.go @@ -2,9 +2,10 @@ package main import ( "fmt" - "github.com/chabad360/go-osc/osc" "strings" "time" + + "github.com/chabad360/go-osc/osc" ) var ( @@ -22,8 +23,6 @@ var ( estSizeBuffer = []float32{0} ) -//reset(); - func maxAppend(array []float32, value float32, limit int) []float32 { array = append(array, value) if len(array) > limit { @@ -47,13 +46,16 @@ func isWithin(original float32, newNum float32, percent float32) bool { func procMsg(data *osc.Message) { if strings.Contains(data.Address, clipPath) { - if strings.HasSuffix(data.Address, "/position") { + switch { + case strings.HasSuffix(data.Address, "/position"): procPos(data) - } else if strings.HasSuffix(data.Address, "direction") { + case strings.HasSuffix(data.Address, "direction"): procDirection(data) - } else if strings.HasSuffix(data.Address, "/name") { + case strings.HasSuffix(data.Address, "/name"): procName(data) - } else if strings.Contains(data.Address, "/connect") { + case strings.Contains(data.Address, "/connect"): + reset() + case strings.Contains(data.Address, "/select"): reset() } } @@ -72,22 +74,35 @@ func procName(data *osc.Message) { func reset() { message.Address = fmt.Sprintf("%s/name", clipPath) - b.Reset() - message.LightMarshalBinary(b) - client.Write(b.Bytes()) + oscServer.WriteTo(message, OSCAddr+":"+OSCPort) samples = 0 posPrev = 0 posIntervalBuffer = []float32{0} timeIntervalBuffer = []float32{0} estSizeBuffer = []float32{0} +} +func lightReset() { + message.Address = fmt.Sprintf("%s/name", clipPath) + oscServer.WriteTo(message, OSCAddr+":"+OSCPort) + + samples = 0 + //posPrev = 0 + //posIntervalBuffer = []float32{0} + //timeIntervalBuffer = []float32{0} + estSizeBuffer = []float32{0} } func procPos(data *osc.Message) { timeNow := time.Now() pos := data.Arguments[0].(float32) + if posPrev == 0 || posPrev == pos { + posPrev = pos + timePrev = timeNow + return + } if !directionForward { pos = 1 - pos @@ -134,8 +149,8 @@ func procPos(data *osc.Message) { timeActual := time.UnixMilli(int64(t)).UTC() timeLeft = fmt.Sprintf("-%02d:%02d:%02d.%03d", timeActual.Hour(), timeActual.Minute(), timeActual.Second(), timeActual.Nanosecond()/1000000) clipLength = fmt.Sprintf("%.3fs", average(estSizeBuffer)/1000000) - message := fmt.Sprintf("/time ,ss %s %s", timeLeft, clipLength) - broadcast.Publish([]byte(message)) + m := fmt.Sprintf("/time ,ss %s %s", timeLeft, clipLength) + broadcast.Publish([]byte(m)) //fmt.Println(message, clipLength, samples, pos, currentPosInterval, currentTimeInterval, currentEstSize, posInterval, timeInterval, average(estSizeBuffer))