diff options
Diffstat (limited to 'cgi/weather.sh')
-rwxr-xr-x | cgi/weather.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/cgi/weather.sh b/cgi/weather.sh new file mode 100755 index 0000000..791417c --- /dev/null +++ b/cgi/weather.sh @@ -0,0 +1,7 @@ +#!/bin/bash +if [[ -n ${QUERY_STRING} && ${QUERY_STRING} =~ ${re} ]] ; then + printf "20 text/gemini\r\n $(ansiweather -F -u metric -a false -w true -p true -d true -s true -l ${QUERY_STRING}| sed 's/-/\n/g' | sed 's/=/\n/g' )\r\n --- \r\n Источник - OpenWeatherMap" + +else + printf "10 введите город (латиницей)" +fi |