OS X 10.8: Sending a message in the Notification Center by Terminal and Automator
Makradar Technologies / / December 19, 2019
A little over a month since the release of OS X Mountain Lion, and the situation with the integration of third-party (non-poppy-ann-storovskih) application with the Center notification clearly went smoothly. The first notable product was, of course, the utility HissThat translates the messages into a ribbon Growl Notification Center. In one company it can already recommend and more specialized products.
Messages via Notification Center Console OS X
Those who are to solve any problems the software often uses the console (that "Terminal"), can be recommended utility Terminal Notifier. It works, of course, the command line and allows you to display, through the Center alert "Mountain Lion" arbitrary messages.
Functionality Terminal Notifier pleases. First, it allows a pop-up message in the title, subtitle, and the body itself is the message. Secondly, in terms of parameters -open, -execute and -activateThat by clicking on a pop-up message allow, respectively, to open a specific web page, perform a console command or run the application. Thirdly, the utility allows you to assign identifiers generated reports that are useful, for example, to remove these messages from the tape Notification Center.
For example, the following command will display a message by clicking on it will open the specified web address, and the message will be removed from the tape Notification Center so that the user was not engaged manually (while the system log OS X, accessible through the "Console", this command will included):
terminal-notifier -title 'Statistics' -subtitle 'Operation completed' -Message 'View report on the server.' -open https://myserver.local.net/stat_log.html -group 0 -execute `terminal-notifier -remove 0`
Full list of perceived options Terminal Notifier displays when you enter a blank command terminal-notifier
.
It sets the same tool is very simple. Downloaded github.com archive with a fresh version of the Terminal Notifier, unzip it in a folder you created, go through the "Terminal". Now you just type the command sudo gem install terminal-notifier
(Administrator password required) - and the utility will register in the system directory, where it will be available through a simple appeal terminal-notifier
.
➞ Download Terminal Notifier (is free).
Notifications Notification Center through Automator
Personally, I was very surprised not to find in gornolvinom "Avtomatore" action which is responsible for the connection of user processes with the Center for notifications. Therefore doubly pleased to learn that such an action can be free download Automated Workflows with the site.
It called this action Display Notification Center Alert (With English. - "Show notification message center"). It does not provide such functionality as Terminal Notifier (until you can handle the clicks on the pop-up reports and assign IDs), but allows you to place in the text boxes inside custom variables. Actions interface is not localized, but correctly reflects, in particular, Cyrillic characters.
➞ Download Display Notification Center Alert (is free).