https://github.com/andrewstuart/rplace
https://github.com/andrewstuart/rplace
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/andrewstuart/rplace
- Owner: andrewstuart
- License: mit
- Created: 2022-04-02T21:05:03.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-05-11T18:27:44.000Z (about 4 years ago)
- Last Synced: 2025-03-24T16:46:18.829Z (about 1 year ago)
- Language: Go
- Size: 1.06 MB
- Stars: 3
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
rplace is a Go client for the r/place canvas and updates.
Its purpose is to be able to more simply diff the state of the canvas with some
desired state as given by an image and x,y location.
```go
var cli rplace.Client
updates, err := cli.Subscribe(context.Background())
if err != nil {
log.Fatal(err)
}
for upds := range updates {
for _, upd := range upds {
fmt.Println(upd.Link(), " => " upd.Color.Name)
}
}
```
For a more practical example, see [the cmd/rplace
package](./cmd/rplace/main.go).
# TODO
- [ ] Add multiple desired image states tracking with the same update feed.
- [ ] Don't check alpha 0