Commit 03441d6d authored by kpetersn's avatar kpetersn
Browse files

Added url to OS X notification

parent 78343205
...@@ -13,6 +13,7 @@ import xml.etree.ElementTree as ET ...@@ -13,6 +13,7 @@ import xml.etree.ElementTree as ET
# needed for notifyOSX() # needed for notifyOSX()
import os import os
osx_command = "/Users/kpetersn/Applications/terminal-notifier.app/Contents/MacOS/terminal-notifier" osx_command = "/Users/kpetersn/Applications/terminal-notifier.app/Contents/MacOS/terminal-notifier"
osx_url = "http://bcda.xray.aps.anl.gov/cgi-bin/ioc_alive.cgi?eng=Peterson"
### Stuff to customize ### Stuff to customize
engineer = "Peterson" engineer = "Peterson"
...@@ -23,7 +24,7 @@ def notifyConsole(ioc, state, time_str): ...@@ -23,7 +24,7 @@ def notifyConsole(ioc, state, time_str):
print "[%s] %s is %s" % (time_str, ioc, state) print "[%s] %s is %s" % (time_str, ioc, state)
def notifyOSX(ioc, state, time_str): def notifyOSX(ioc, state, time_str):
notify_command = "%s -title \"%s is %s\" -message \"%s\"" % (osx_command, ioc, state, time_str) notify_command = "%s -title \"%s is %s\" -message \"%s\" -open \"%s\"" % (osx_command, ioc, state, time_str, osx_url)
os.system(notify_command) os.system(notify_command)
# set notification function # set notification function
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment