Skip to content

Integralist/ufc-event-notifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Golang Mac OS X binary that notifies the user of an upcoming UFC main event

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages