aboutsummaryrefslogtreecommitdiff
path: root/brweather/bin/inpe-3
diff options
context:
space:
mode:
Diffstat (limited to 'brweather/bin/inpe-3')
-rwxr-xr-xbrweather/bin/inpe-379
1 files changed, 54 insertions, 25 deletions
diff --git a/brweather/bin/inpe-3 b/brweather/bin/inpe-3
index 4a2a11e..3cff051 100755
--- a/brweather/bin/inpe-3
+++ b/brweather/bin/inpe-3
@@ -7,17 +7,19 @@
# Distribuído sob licença GPLv3
##Radiação ultravioleta
+
+
+
+if [ $1 = "--option=UVN" ] || [ $1 = "--option=UVNT" ] ; then
+
+if [ $OPEN = "0" ] ; then
UVN=`grep -m1 '<img src="http://img0.cptec.inpe.br/~rgrafico/icones_principais/uv/medio/' ~/.brweather/cache/cache | cut -f13 -d'/' | cut -f1 -d'.'`
-UV1=`grep -m2 '<img src="http://img0.cptec.inpe.br/~rgrafico/icones_principais/uv/medio/' ~/.brweather/cache/cache | cut -f14 -d'/' | cut -f1 -d'.' | tail -n1`
-UV2=`grep -m3 '<img src="http://img0.cptec.inpe.br/~rgrafico/icones_principais/uv/medio/' ~/.brweather/cache/cache | cut -f14 -d'/' | cut -f1 -d'.' | tail -n1`
-UV3=`grep -m4 '<img src="http://img0.cptec.inpe.br/~rgrafico/icones_principais/uv/medio/' ~/.brweather/cache/cache | cut -f14 -d'/' | cut -f1 -d'.' | tail -n1`
-UV4=`grep -m5 '<img src="http://img0.cptec.inpe.br/~rgrafico/icones_principais/uv/medio/' ~/.brweather/cache/cache | cut -f14 -d'/' | cut -f1 -d'.' | tail -n1`
-UV5=`grep -m6 '<img src="http://img0.cptec.inpe.br/~rgrafico/icones_principais/uv/medio/' ~/.brweather/cache/cache | cut -f14 -d'/' | cut -f1 -d'.' | tail -n1`
-UV6=`grep -m7 '<img src="http://img0.cptec.inpe.br/~rgrafico/icones_principais/uv/medio/' ~/.brweather/cache/cache | cut -f14 -d'/' | cut -f1 -d'.' | tail -n1`
-UV7=`grep -m8 '<img src="http://img0.cptec.inpe.br/~rgrafico/icones_principais/uv/medio/' ~/.brweather/cache/cache | cut -f14 -d'/' | cut -f1 -d'.' | tail -n1`
+elif [ $OPEN = "2" ] ; then
+UVN=`grep -m1 '<img src="http://img0.cptec.inpe.br/~rgrafico/icones_principais/uv/menor/' ~/.brweather/cache/cache | cut -f16 -d'/' | cut -f1 -d'.'`
+fi
case $UVN in
-"uv_0")
+"uv_0")
NUVN="ND"
NUVNT="ND"
;;
@@ -37,7 +39,7 @@ case $UVN in
NUVN="1"
NUVNT="Baixo"
;;
-"uv_2")
+"uv_2")
NUVN="2"
NUVNT="Baixo"
;;
@@ -91,10 +93,10 @@ case $UVN in
;;
esac
-
-
+elif [ $1 = "--option=UV1" ] || [ $1 = "--option=UV1T" ] ; then
+UV1=`grep -m2 '<img src="http://img0.cptec.inpe.br/~rgrafico/icones_principais/uv/medio/' ~/.brweather/cache/cache | cut -f14 -d'/' | cut -f1 -d'.' | tail -n1`
case $UV1 in
-"uv_0")
+"uv_0")
NUV1="ND"
NUV1T="ND"
;;
@@ -114,7 +116,7 @@ case $UV1 in
NUV1="1"
NUV1T="Baixo"
;;
-"uv_2")
+"uv_2")
NUV1="2"
NUV1T="Baixo"
;;
@@ -168,8 +170,13 @@ case $UV1 in
;;
esac
+
+
+elif [ $1 = "--option=UV2" ] || [ $1 = "--option=UV2T" ] ; then
+UV2=`grep -m3 '<img src="http://img0.cptec.inpe.br/~rgrafico/icones_principais/uv/medio/' ~/.brweather/cache/cache | cut -f14 -d'/' | cut -f1 -d'.' | tail -n1`
+
case $UV2 in
-"uv_0")
+"uv_0")
NUV2="ND"
NUV2T="ND"
;;
@@ -189,7 +196,7 @@ case $UV2 in
NUV2="1"
NUV2T="Baixo"
;;
-"uv_2")
+"uv_2")
NUV2="2"
NUV2T="Baixo"
;;
@@ -243,8 +250,12 @@ case $UV2 in
;;
esac
+
+elif [ $1 = "--option=UV3" ] || [ $1 = "--option=UV3T" ] ; then
+UV3=`grep -m4 '<img src="http://img0.cptec.inpe.br/~rgrafico/icones_principais/uv/medio/' ~/.brweather/cache/cache | cut -f14 -d'/' | cut -f1 -d'.' | tail -n1`
+
case $UV3 in
-"uv_0")
+"uv_0")
NUV3="ND"
NUV3T="ND"
;;
@@ -264,7 +275,7 @@ case $UV3 in
NUV3="1"
NUV3T="Baixo"
;;
-"uv_2")
+"uv_2")
NUV3="2"
NUV3T="Baixo"
;;
@@ -318,8 +329,13 @@ case $UV3 in
;;
esac
+
+
+elif [ $1 = "--option=UV4" ] || [ $1 = "--option=UV4T" ] ; then
+UV4=`grep -m5 '<img src="http://img0.cptec.inpe.br/~rgrafico/icones_principais/uv/medio/' ~/.brweather/cache/cache | cut -f14 -d'/' | cut -f1 -d'.' | tail -n1`
+
case $UV4 in
-"uv_0")
+"uv_0")
NUV4="ND"
NUV4T="ND"
;;
@@ -339,7 +355,7 @@ case $UV4 in
NUV4="1"
NUV4T="Baixo"
;;
-"uv_2")
+"uv_2")
NUV4="2"
NUV4T="Baixo"
;;
@@ -394,8 +410,12 @@ case $UV4 in
esac
+
+elif [ $1 = "--option=UV5" ] || [ $1 = "--option=UV5T" ] ; then
+UV5=`grep -m6 '<img src="http://img0.cptec.inpe.br/~rgrafico/icones_principais/uv/medio/' ~/.brweather/cache/cache | cut -f14 -d'/' | cut -f1 -d'.' | tail -n1`
+
case $UV5 in
-"uv_0")
+"uv_0")
NUV5="ND"
NUV5T="ND"
;;
@@ -415,7 +435,7 @@ case $UV5 in
NUV5="1"
NUV5T="Baixo"
;;
-"uv_2")
+"uv_2")
NUV5="2"
NUV5T="Baixo"
;;
@@ -469,8 +489,12 @@ case $UV5 in
;;
esac
+
+elif [ $1 = "--option=UV6" ] || [ $1 = "--option=UV6T" ] ; then
+UV6=`grep -m7 '<img src="http://img0.cptec.inpe.br/~rgrafico/icones_principais/uv/medio/' ~/.brweather/cache/cache | cut -f14 -d'/' | cut -f1 -d'.' | tail -n1`
+
case $UV6 in
-"uv_0")
+"uv_0")
NUV6="ND"
NUV6T="ND"
;;
@@ -490,7 +514,7 @@ case $UV6 in
NUV6="1"
NUV6T="Baixo"
;;
-"uv_2")
+"uv_2")
NUV6="2"
NUV6T="Baixo"
;;
@@ -544,8 +568,12 @@ case $UV6 in
;;
esac
+
+elif [ $1 = "--option=UV7" ] || [ $1 = "--option=UV7T" ] ; then
+UV7=`grep -m8 '<img src="http://img0.cptec.inpe.br/~rgrafico/icones_principais/uv/medio/' ~/.brweather/cache/cache | cut -f14 -d'/' | cut -f1 -d'.' | tail -n1`
+
case $UV7 in
-"uv_0")
+"uv_0")
NUV7="ND"
NUV7T="ND"
;;
@@ -565,7 +593,7 @@ case $UV7 in
NUV7="1"
NUV7T="Baixo"
;;
-"uv_2")
+"uv_2")
NUV7="2"
NUV7T="Baixo"
;;
@@ -619,6 +647,7 @@ case $UV7 in
;;
esac
+fi
case $1 in
"--option=UVN") echo $NUVN