ansiweather

Weather in terminal, with ANSI colors and Unicode symbols
Log | Files | Refs | README | LICENSE

commit f82a0562fcfd489dc5b2b220698ada9b0bb03d1a
parent fddbb4f72ae1691105b8e2978791fe61e544f915
Author: Frederic Cambus <fcambus@users.sourceforge.net>
Date:   Thu,  6 Aug 2015 20:36:04 +0200

Using standard function declaration

Diffstat:
Mansiweather | 10+++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/ansiweather b/ansiweather @@ -21,7 +21,7 @@ LC_NUMERIC=C config_file=${ANSIWEATHERRC:-~/.ansiweatherrc} -function get_config { +get_config() { ret="" if [ -f $config_file ] then @@ -64,7 +64,7 @@ geo_api_proto=$(get_config "geo_api_proto" || echo "http") geo_api_url=$(get_config "geo_api_url" || echo "www.telize.com/geoip") #geo location service geo_api="${geo_api_proto}://${geo_api_url}" -function auto_locate { +auto_locate() { ret="" geo_data=$($fetch_cmd $geo_api) @@ -174,7 +174,7 @@ fi ###[ Process Weather data ]#################################################### -function epoch_to_date { +epoch_to_date() { if date -j -r $1 +"%a %b %d" > /dev/null 2>&1; then # BSD ret=$(date -j -r $1 +"$dateformat") @@ -218,7 +218,7 @@ fi ###[ Process Sunrise and Sunset data ]######################################### -function epoch_to_time { +epoch_to_time() { if date -j -r $1 +"%r" > /dev/null 2>&1; then # BSD ret=$(date -j -r $1 +"$timeformat") @@ -286,7 +286,7 @@ esac ###[ Set icons ]############################################################### -function get_icon { +get_icon() { case $1 in Clear) if [ $period = "night" ]