ntfy
ntfy copied to clipboard
Feature Request: Support for piping in stdin
It'd be great if we could pipe output into ntfy, and send it with the notification
E.g. $ fortune | ntfy
This way, when commands finish, we can get the output directly in the notification.
Any reason ntfy send "$(fortune)"
isn't sufficient?
Didn't think of that, but just for convenience and keeping things standard. If a command takes longer than expected, I'm more likely to press up and append the pipe, than having to wrap it all with the command above
To add to this, piping makes it very difficult to grab the exit code of the previous pipe item so you wouldn't be able to gather success or failure in a nice cross-platform way.
Any reason ntfy send "$(fortune)" isn't sufficient?
I think it would be nice to show this functionality in ntfy's github homepage. I believe some people are actually looking for this.
I have a command I'd like to run and conditionally send the output based on the exit code. It seemed natural and unixy to just ntfy send < myfile
and I was a bit surprised there was no way to do this.
@dustin i'd happily accept a PR adding that. I would've accepted #104 with a minor change(making it be on ntfy send -
like many other tools) but the author just closed it instead 🤷♂