tazbug diff tazbug @ rev 133
Get page generation time and back to fgrep for admin_user (faster) since httphelper.sh is now up-to-date on Tank
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Tue Feb 21 17:29:18 2017 +0100 (2017-02-21) |
parents | 3698cf81f884 |
children | 7bf28563c0f6 |
line diff
1.1 --- a/tazbug Mon Feb 13 17:45:24 2017 +0100 1.2 +++ b/tazbug Tue Feb 21 17:29:18 2017 +0100 1.3 @@ -1,20 +1,55 @@ 1.4 #!/bin/sh 1.5 # 1.6 # TazBug Command line tool. Help to search and check bugs from cmdline. 1.7 +# This tool use data from Tazbug 'textmode' plugin. 1.8 # 1.9 # Copyright (C) 2017 SliTaz GNU/Linux - BSD License 1.10 # 1.11 . /lib/libtaz.sh 1.12 1.13 -url="http://bugs.slitaz.org/" 1.14 +#url="http://localhost/~pankso/cgi-bin/tazbug/web/bugs.cgi?textmode" 1.15 +url="http://bugs.slitaz.org/bugs.cgi?textmode" 1.16 + 1.17 +help() { 1.18 + cat << EOT 1.19 + 1.20 +$(boldify $(gettext "Usage:")) tazbug [stats|search|ID] [pattern] 1.21 + 1.22 +$(boldify $(gettext "Examples:")) 1.23 + tazbug 120 1.24 + tazbug search firefox 1.25 + 1.26 +EOT 1.27 +} 1.28 + 1.29 +# Usage: get "data=xxx" 1.30 +get() { 1.31 + busybox wget -q "${url}&${1}" -O - 1.32 +} 1.33 1.34 # 1.35 # Commands 1.36 # 1.37 1.38 case "$1" in 1.39 - *) 1.40 - gettext "Usage:"; echo " $(basename $0) [command]" ;; 1.41 + stats) 1.42 + newline 1.43 + get "stats" 1.44 + newline ;; 1.45 + search) 1.46 + newline 1.47 + echo "$(boldify $(gettext 'Searching for:')) $(colorize 33 $2)" 1.48 + separator 1.49 + get "search=$2" 1.50 + newline ;; 1.51 + *[0-9]*) 1.52 + newline 1.53 + boldify "Bug info" 1.54 + separator 1.55 + get "id=$1" 1.56 + separator && newline ;; 1.57 + *) 1.58 + help ;; 1.59 esac 1.60 1.61 -exit 0 1.62 +rm -f ${tmp} && exit 0