{"id":13880485,"url":"https://github.com/fnando/notifier","last_synced_at":"2025-04-07T13:06:41.519Z","repository":{"id":1177063,"uuid":"1074483","full_name":"fnando/notifier","owner":"fnando","description":"Send system notifications on several platforms with a simple and unified API. Currently supports Notification Center, Libnotify, OSD, KDE (Knotify and Kdialog) and Snarl","archived":false,"fork":false,"pushed_at":"2022-03-20T05:30:59.000Z","size":74,"stargazers_count":88,"open_issues_count":1,"forks_count":11,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-31T11:05:54.270Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fnando.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-11-12T12:14:14.000Z","updated_at":"2024-09-29T02:32:37.000Z","dependencies_parsed_at":"2022-07-29T13:49:10.418Z","dependency_job_id":null,"html_url":"https://github.com/fnando/notifier","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fnando%2Fnotifier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fnando%2Fnotifier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fnando%2Fnotifier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fnando%2Fnotifier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fnando","download_url":"https://codeload.github.com/fnando/notifier/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247657281,"owners_count":20974345,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-06T08:03:04.423Z","updated_at":"2025-04-07T13:06:41.498Z","avatar_url":"https://github.com/fnando.png","language":"Ruby","funding_links":[],"categories":["Ruby"],"sub_categories":[],"readme":"# Notifier\n\n[![Gem](https://img.shields.io/gem/v/notifier.svg)](https://rubygems.org/gems/notifier)\n[![Gem](https://img.shields.io/gem/dt/notifier.svg)](https://rubygems.org/gems/notifier)\n\nSend system notifications on several platforms with a simple and unified API.\nCurrently supports:\n\n- terminal-notifier (Notification Center wrapper for Mac OS X)\n- [HUD](https://fnando.gumroad.com/l/hud-macos)\n- Kdialog (Linux/KDE)\n- Knotify (Linux/KDE)\n- OSD Cat (Linux)\n- Libnotify (Linux)\n- Snarl (Windows)\n\n## Installation\n\n    gem install notifier\n\n### Mac OS X\n\n#### terminal-notifier\n\n- Install terminal-notifier - https://github.com/alloy/terminal-notifier\n\nterminal-notifier also supports two additional flags:\n\n- `subtitle`\n- `sound`\n\nSee terminal-notifier's help for additional information.\n\n#### hud\n\n- Install HUD - https://fnando.gumroad.com/l/hud-macos\n\n### Linux\n\nIf you're a linux guy, you can choose one of these methods:\n\n- Install libnotify-bin and its dependencies:\n  `sudo aptitude install libnotify-bin`\n- Install xosd-bin: `sudo aptitude install xosd-bin`\n- KDE users don't need to install anything: Test Notifier will use +knotify+ or\n  +kdialog+.\n\n### Windows\n\n- Install Snarl: download from http://www.fullphat.net\n- Install ruby-snarl: `gem install ruby-snarl`\n\n## Usage\n\nNotifier will try to detect which notifiers are available in your system. So you\ncan just send a message:\n\n```ruby\nNotifier.notify(\n  image: \"image.png\",\n  title: \"Testing Notifier\",\n  message: \"Sending an important message!\"\n)\n```\n\nNot all notifiers support the image option, therefore it will be ignored.\n\nIf your system support more than one notifier, you can specify which one you\nprefer:\n\n```ruby\nNotifier.default_notifier = :notify_send\n```\n\nAlternatively, you can set the default notifier by using the `NOTIFIER` env var.\nThe following example assumes `test_notifier` is configured on this Rails\nproject. The env var has precedence of `Notifier.default_notifier`.\n\n```console\n$ NOTIFIER=hud rails test\n```\n\nThe available names are `terminal_notifier`, `kdialog`, `knotify`,\n`notify_send`, `osd_cat`, and `snarl`.\n\nThere are several helper methods that you can use in order to retrieve\nnotifiers.\n\n- `Notifier.notifier`: return the first supported notifier\n- `Notifier.notifiers`: return all notifiers\n- `Notifier.supported_notifiers`: return only supported notifiers\n- `Notifier.from_name(name)`: find notifier by its name\n- `Notifier.supported_notifier_from_name(name)`: find a supported notifier by\n  its name\n\n## Creating custom notifiers\n\nTo create a new notifier, just create a module on `Notifier` namespace that\nimplements the following interface:\n\n```ruby\nmodule Notifier\n  module MyCustomNotifier\n    def self.supported?\n    end\n\n    def self.notify(options)\n    end\n  end\nend\n```\n\n## Maintainer\n\n- Nando Vieira - https://nandovieira.com\n\n## Contributors\n\nhttps://github.com/fnando/notifier/graphs/contributors\n\n## License\n\n(The MIT License)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the 'Software'), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffnando%2Fnotifier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffnando%2Fnotifier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffnando%2Fnotifier/lists"}