From b8a276f771e3234e68769c4d075bfe10018e11f7 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Fri, 5 Apr 2013 11:04:16 -0300 Subject: Uploading version 0.6.0 --- brweather/bin/inpe-1 | 59 +++++++++++++++++++++------------------------------- 1 file changed, 24 insertions(+), 35 deletions(-) (limited to 'brweather/bin/inpe-1') diff --git a/brweather/bin/inpe-1 b/brweather/bin/inpe-1 index 471edf7..047961c 100644 --- a/brweather/bin/inpe-1 +++ b/brweather/bin/inpe-1 @@ -6,26 +6,10 @@ # http://brweatherproject.blogspot.com/ # Distribuído sob licença GPLv3 - -NCITY=`grep -m1 -A1 '
' ~/.brweather/cache/cache | cut -f2 -d'>' | cut -f1 -d'<' | tail -n1` -NDATE=`date "+%d-%m-%Y"` -NLU=`cat ~/.brweather/cache/lastupdate` -LUS=`grep -m1 'height="3px" />Atualizado:' ~/.brweather/cache/cache | cut -f2 -d':' | cut -f1 -d'<' | sed 's/ //'` - -NTN=`grep ' TEMPERATURA
' ~/.brweather/cache/cache | cut -f3 -d'>' | cut -f1 -d'C' | sed 's/º//g'` -STE=`grep -m1 'SENSAÇÃO TÉRMICA' ~/.brweather/cache/cache | cut -f2 -d'>' | cut -f1 -d'C' | sed 's/º//g'` -NUMID=`grep 'UMIDADE RELATIVA ' ~/.brweather/cache/cache | cut -f3 -d'>' | cut -f1 -d'<' | sed 's/%//g'` -NPA=`grep -m1 'PRESSÃO ATMOSFÉRICA ' ~/.brweather/cache/cache | cut -f3 -d'>' | cut -f1 -d'<'` -NWINDD=`grep -m1 '
' ~/.brweather/cache/cache | cut -f3 -d'>' | cut -f1 -d'<'` -NWINDS=`grep -m1 '
' ~/.brweather/cache/cache | cut -f4 -d'>' | cut -f1 -d'<'` - -DAY0=`date "+%a"` -DAY0T=`date +%A | sed -r 's/\b[a-z]{3,}/\u&/g'` DVOLATIL=`grep -m1 '
' ~/.brweather/cache/cache | cut -f3 -d'>' | cut -f1 -d'-' | sed 's/ //g'` - case $DVOLATIL in -"Domingo") +"Domingo") DAY1="Dom" DAY1T="Domingo" DAY2="Seg" @@ -41,7 +25,7 @@ case $DVOLATIL in DAY7="Sáb" DAY7T="Sábado" ;; -"Segunda") +"Segunda") DAY1="Seg" DAY1T="Segunda" DAY2="Ter" @@ -57,7 +41,7 @@ case $DVOLATIL in DAY7="Dom" DAY7T="Domingo" ;; -"Terça") +"Terça") DAY1="Ter" DAY1T="Terça" DAY2="Qua" @@ -73,7 +57,7 @@ case $DVOLATIL in DAY7="Seg" DAY7T="Segunda" ;; -"Quarta") +"Quarta") DAY1="Qua" DAY1T="Quarta" DAY2="Qui" @@ -89,7 +73,7 @@ case $DVOLATIL in DAY7="Ter" DAY7T="Terça" ;; -"Quinta") +"Quinta") DAY1="Qui" DAY1T="Quinta" DAY2="Sex" @@ -105,7 +89,7 @@ case $DVOLATIL in DAY7="Qua" DAY7T="Quarta" ;; -"Sexta") +"Sexta") DAY1="Sex" DAY1T="Sexta" DAY2="Sáb" @@ -121,7 +105,7 @@ case $DVOLATIL in DAY7="Qui" DAY7T="Quinta" ;; -"Sábado") +"Sábado") DAY1="Sáb" DAY1T="Sábado" DAY2="Dom" @@ -141,29 +125,34 @@ esac case $1 in -"--option=city") echo $NCITY +"--option=city") grep -m1 -A1 '
' ~/.brweather/cache/cache | cut -f2 -d'>' | cut -f1 -d'<' | tail -n1 ;; -"--option=date") echo $NDATE +"--option=date") date "+%d-%m-%Y" ;; -"--option=Day0") echo $DAY0 +"--option=Day0") date "+%a" ;; -"--option=Day0T") echo $DAY0T +"--option=Day0T") date +%A | sed -r 's/\b[a-z]{3,}/\u&/g' ;; -"--option=LU") echo $NLU +"--option=LU") cat ~/.brweather/cache/lastupdate ;; -"--option=LUS") echo $LUS +"--option=LUS") + if [ $OPEN == "2" ]; then + grep -m1 'IUV com Nuvem
' ~/.brweather/cache/cache | cut -f5 -d'>' | cut -f1 -d'<' + else + grep -m1 'height="3px" />Atualizado:' ~/.brweather/cache/cache | cut -f2 -d':' | cut -f1 -d'<' | sed 's/ //' + fi ;; -"--option=TN") echo $NTN +"--option=TN") grep ' TEMPERATURA
' ~/.brweather/cache/cache | cut -f3 -d'>' | cut -f1 -d'C' | sed 's/º//g' ;; -"--option=STE") echo $STE +"--option=STE") grep -m1 'SENSAÇÃO TÉRMICA' ~/.brweather/cache/cache | cut -f2 -d'>' | cut -f1 -d'C' | sed 's/º//g' ;; -"--option=umid") echo $NUMID +"--option=umid") grep 'UMIDADE RELATIVA
' ~/.brweather/cache/cache | cut -f3 -d'>' | cut -f1 -d'<' | sed 's/%//g' ;; -"--option=PA") echo $NPA +"--option=PA") grep -m1 'PRESSÃO ATMOSFÉRICA ' ~/.brweather/cache/cache | cut -f3 -d'>' | cut -f1 -d'<' ;; -"--option=windd") echo $NWINDD +"--option=windd") grep -m1 '
' ~/.brweather/cache/cache | cut -f3 -d'>' | cut -f1 -d'<' ;; -"--option=winds") echo $NWINDS +"--option=winds") grep -m1 '
' ~/.brweather/cache/cache | cut -f4 -d'>' | cut -f1 -d'<' ;; "--option=Day1") echo $DAY1 ;; -- cgit v1.2.3