ufc-event-notifier

command module
v0.0.0-...-4ffa24e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 29, 2015 License: MIT Imports: 10 Imported by: 0

README

UFC Event Notifier

Long running binary (written in Go) for Mac OS X that scrapes the UFC website for the next main UFC event and triggers a native OS notification

Build

GOOS=darwin GOARCH=386   go build -o ufc-386   ufc.go # 32 bit MacOSX
GOOS=darwin GOARCH=amd64 go build -o ufc-amd64 ufc.go # 64 bit MacOSX

Execute

mv ./ufc /usr/local/bin # update $PATH reference
which ufc               # /usr/local/bin/ufc
ufc &                   # run program in a background process

Launch

You can utilise the Mac OS X Launchd service, which controls which programs are launched when the OS boots.

Reference: developer.apple.com/launchd.plist

Modify the ufc-notifier.plist file inside this repo to include details specific for your needs and move it to the following location:

mv ufc-notifier.plist $HOME/Library/LaunchAgents

Then execute:

cd "$HOME/Library/LaunchAgents"
launchctl load ufc-notifier.plist

Note: this has been tested with Mac OS X version: 10.11.1

To stop this service:

cd "$HOME/Library/LaunchAgents"
launchctl unload ufc-notifier.plist
rm -i ufc-notifier.plist

Let's get serious

If you find the service isn't stopping, then it's time to get heavy handed...

  • Check the program is indeed handled by Launchd: launchctl list | grep ufc
  • Remove the program: launchctl remove ufc-notifier
  • Verify it's gone: launchctl list | grep ufc

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL