#!/bin/bash # jpokorny@redhat.com (will be pleased to know about further enhancements) # usage: # 1. git clone git://git.fedorahosted.org/git/python-bugzilla # 2. edit BUGZILLA_ROOT below # 3. also edit COMPONENT as per example (or pass such string as a 1st argument) BUGZILLA_ROOT=~/wrkspc/python-bugzilla BUGZILLA=${BUGZILLA_ROOT}/bin/bugzilla export PYTHONPATH=$BUGZILLA_ROOT:$PYTHONPATH COMPONENT=luci,ricci,clustermon,conga,sunzi STATUS=OPEN REFRESH_INTERVAL=600 # [s], better not to drain bugzilla's power... SEP=@@@ OUTPUT_FMT="%{component}$SEP%{bug_id}$SEP%{priority}$SEP%{status}$SEP%{short_desc}" if [ $# -ge 1 ]; then if [[ "$1" = -* ]]; then STATUS=$(echo "$1" | cut -c2-) shift fi if [ $# -ge 1 ]; then COMPONENT="$1" fi fi watch -t --interval $REFRESH_INTERVAL \ "$BUGZILLA query -c $COMPONENT -t $STATUS --outputformat $OUTPUT_FMT \ | table_data $SEP \ | sed -u \ -e 's/urgent/URGENT/' \ -e 's/important/IMPORTANT/'" # todo: colours for priorities (rhbz#801626) #-e 's/\(urgent\)/\^\[\[31m\1\^\[\[0m/' \