https://github.com/robhurring/notifly
Custom URL scheme to OSX notification center from terminal or apps
https://github.com/robhurring/notifly
Last synced: 11 months ago
JSON representation
Custom URL scheme to OSX notification center from terminal or apps
- Host: GitHub
- URL: https://github.com/robhurring/notifly
- Owner: robhurring
- Created: 2013-01-15T19:41:22.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2015-10-09T19:14:15.000Z (almost 11 years ago)
- Last Synced: 2024-04-13T19:19:39.005Z (over 2 years ago)
- Language: Objective-C
- Homepage:
- Size: 173 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Notifly
Custom URL scheme around OSX's user notification center
## Terminal Usage
```
# create notification
open "notifly://publish?title=hello&message=world"
# create notification within a channel
open "notifly://publish/users?title=hello&message=world"
# remove all notifications
open "notifly://remove"
# remove all notifications within a channel
open "notifly://remove/users"
# list all notifications (JSON)
# NOTE: flakey right now, fixing
open "notifly://list"
# list all notifications in channel (JSON)
# NOTE: flakey right now, fixing
open "notifly://list/users"
# callbacks when user click notification
# NOTE: in development, unsure of the spec
open "notifly://publish?title=hello&body=world&activate=Google Chrome"
open "notifly://publish?title=hello&body=world&open=http://google.com"
open "notifly://publish?title=hello&body=world&perform=sudo rm -rf /"
```
## Global Notifcations
If you'd like to have a callback after a notification is posted, listen for events from com.zerobased.notifly.
For example:
```
// subscribe to notifly
[[NSDistributedNotificationCenter defaultCenter]
addObserver:self
selector:@selector(myListenerSelector:)
name:@"com.zerobased.notifly"
object:nil];
```
The notification object will contain the name of the event that was sent. Examples include publish, list, and, remove.
## Planned
* fix listing and json serialization
* wrap in a rubygem
* implement actions
## Contributing
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request
## Open Source Libs
* https://github.com/johnezang/JSONKit