5 ms·
This already exists. It's called noti. It's cross-platform, supports most of the same backends, and can send Slack notifications (which ntfy can't). It also has
by y0ssar1an 10y ago
This already exists. It's called noti. It's cross-platform, supports most of the same backends, and can send Slack notifications (which ntfy can't). It also has an awesome API. You can put `noti` at the start of a command or `;noti` at the end, which is what I always do. I never remember to set the notification until after I've typed the command. If you forget to set the notification and the command is already running, you can call `noti -pwatch <pid>` and set notifications after the fact. It's very well thought out.
https://github.com/variadico/noti https://github.com/variadico/noti
- deleted 10y ago[deleted]
- buster 10y agoApart the fact that you sound like an advertisement for another software it takes just a few seconds to see that noti doesn't work on windows or with telegram for example. Not supporting a major OS is a big deal.
- dmos62 10y agoOnly if you are using that major platform.
- buster 10y agoI don't use Windows, but Linux.
- voltagex_ 10y agoI'm adding very basic Windows 10 (because notifications are ~50 lines there, many many more on older platforms) support. Writing my first Go code was easier than packaging ntfy for Windows, FWIW.
- sneak 10y agoTelegram is dangerous snake oil, and its use should be discouraged.
- krick 10y agoWhy? Lately my paranoia calmed down somehow, and I'm even considering to install it (I need to have some messenger, after all, and it doesn't make me feel as naked, as skype or whatsapp would). Care to make me reconsider?
- curun1r 10y agoYou might also mention that it's Go instead of Python, which makes it a lot more friendly to users. I've stopped using anything written in Python since previous trips down that path have all seemed to result in pain and Google searches related to the runtime environment.
- pmontra 10y agoFor this kind of tool, where performances are definitely not important, I'll pick Python, Ruby and Node all the time. I assume that pip, bundle and npm already did their job and installed everything I need. Then I'm able to look at the code, change a few lines and run it again with only a text editor. The extra steps to download the source code and go through a compiler are not worth the trouble.
- voltagex_ 10y agoToday I dumped a not-insignificant amount of time into trying to package ntfy into a single exe on Windows (using PyInstaller. It sort-of works, but was way way more painful than it needed to be. Python packaging still sucks in 2016. Go is way ahead of Python in that regard, but comes with its own quirks (GitHub by default, always uses the HEAD version of libraries, GOPATH)
- pmontra 10y agoI'm not familiar with PyInstaller but I wouldn't do anything similar with scripting languages. They are meant to be distributed as scripts so I'm not surprised it took you all that time. Why didn't you use pip to install on (I suppose) those other Windows machines? There are similar problems with Ruby when people want to distribute executables. I remember I googled a solution that made a friend of mine happy (he had to deploy on multiple Windows machines, I don't remember what I suggested him to do) but still it's the wrong way to go. If creating a single executable is a hard requirement then yes, they are the wrong languages to solve your problem.
- voltagex_ 10y ago
- proofmaster 10y agoI have to agree that Noti is way better.
- teraflop 10y agoBash tip: you can schedule an arbitrary command to run when the current command completes by suspending it with CTRL-Z, and then typing "fg; <CMD>". (This doesn't seem to be documented specifically anywhwere, but it's implicit in the way bash's job control works.)
- riquito 10y agoWhich is identical to write "cmd; nextCommand" E.g. sleep 2; echo it works
- mynegation 10y agoI think the point of the tip was to show how it is done when process is already running and you forgot to add a command to be run immediately after
- dschep 10y agoThis the first I've heard of noti, looks cool tho. Ntfy does many of these things too, for example A coworker had suggested the PID option so it has that too :) I mostly use the shell-integration that automatically sends notifications for commands taking longer than 10 seconds (if the terminal isn't focused).