chiark / gitweb /
hacky LP bug support
authorColin Watson <cjwatson@chiark.greenend.org.uk>
Wed, 30 Apr 2008 16:45:47 +0000 (16:45 +0000)
committerColin Watson <cjwatson@chiark.greenend.org.uk>
Wed, 30 Apr 2008 16:45:47 +0000 (16:45 +0000)
irssi-notify

index 6827ea1..9a9aac2 100755 (executable)
@@ -7,7 +7,22 @@ set -e
 ssh -n riva irssi-notify-server | \
        sed -u 's/&/\&amp;/g; s/</\&lt;/g; s/>/\&gt;/g' | \
        while read heading message; do
-               [ "$heading" != . ] || continue
-               notify-send -i gtk-dialog-info -t 300000 -- \
-                       "${heading}" "${message}"
+               case $heading in
+                       .)
+                               continue
+                               ;;
+                       LPBUG)
+                               bug="${message%% *}"
+                               message="${message#* }"
+                               imp="${message%% *}"
+                               message="${message#* }"
+                               notify-send -i gtk-dialog-info -t 300000 -- \
+                                       "New LP bug $bug ($imp)" \
+                                       "<a href=\"https://launchpad.net/bugs/$bug\">$message</a>"
+                               ;;
+                       *)
+                               notify-send -i gtk-dialog-info -t 300000 -- \
+                                       "${heading}" "${message}"
+                               ;;
+               esac
        done