Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eze-kiel/itsy
Is there snow yet???
https://github.com/eze-kiel/itsy
Last synced: 4 days ago
JSON representation
Is there snow yet???
- Host: GitHub
- URL: https://github.com/eze-kiel/itsy
- Owner: eze-kiel
- Created: 2024-10-15T17:40:17.000Z (29 days ago)
- Default Branch: main
- Last Pushed: 2024-10-15T19:24:18.000Z (29 days ago)
- Last Synced: 2024-10-17T01:47:15.862Z (27 days ago)
- Language: Go
- Size: 85 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Is there snow yet????
![](docs/nfty-notification.png)
## About
_Go to the [Usage](#usage) part to see how to use it._
`itsy` is a CLI tool that checks if there's snow on a picture or not. How does it do? It simply verifies the presence of grey/white pixels (aka #C8C8C8) and count them. If there's more than `-threshold`% pixels in the whole image that are lighter than this color, then there's snow!
The image is fetched from the Internet by setting the `-img-url` flag, which comes handy when you want to monitor images from webcams. Currently only JPEGs are supported.
## Notifiers
`itsy` relies on what I called notifiers to ping you back. Currently, only [ntfy](https://ntfy.sh/) and the terminal (stdout) are supported. I personally recommend [ntfy](https://ntfy.sh/) because it's FOSS and works like a charm, especially if you want to receive notifications on your smartphone.
## Usage
* CLI options:
```
Usage of itsy:
-img-url string
url of the image to download (mandatory)
-name string
name of the monitor (default "snow monitor")
-nfty-callback-address string
if set, you'll be redirected to this address when opening the notification
-nfty-embed-image
if set, it will embed the downloaded image to the notification (if size < 2Mo)
-nfty-topic string
nfty topic to send notifications when using nfty notifier
-notifier string
select notifier to use (term, ntfy) (default "term")
-snow-only
send notification only if snow has been detected
-threshold float
confidence threshold, in percent (100 = absolutely sure) (default 25)
```* Usage example using a cronjob and [ntfy](https://ntfy.sh/):
```
0 12 * * * /path/to/itsy -img-url "${IMG_URL?}" -name "${MONITOR_NAME?} (cron)" -notifier nfty -nfty-topic "${TOPIC?}" -threshold 25 -nfty-embed-image
```## Note on reliability/disclaimer
As you may have guessed, due to the cheap way it "detects" snow presence, `itsy` is probably not very reliable as it, and the default threshold value may require some tweaking depending on the picture you're using.
## License
[MIT](https://choosealicense.com/licenses/mit/)
You without
itsy
[![](https://i.redd.it/hdznyjjb5ma31.jpg)](https://www.reddit.com/r/skiing/comments/cdtk89/waiting_for_winter_oc/)