diff options
author | sn4il <sn4il@theplace> | 2023-06-27 10:59:14 +0300 |
---|---|---|
committer | sn4il <sn4il@theplace> | 2023-06-27 10:59:14 +0300 |
commit | 91406f02b2a87e0dbfaf8a391edd049c25563848 (patch) | |
tree | b06afb9bbc7e7c5e9aa74def727bdbb52bf8c365 /cgi/weather.sh | |
download | pubnix-91406f02b2a87e0dbfaf8a391edd049c25563848.tar.gz pubnix-91406f02b2a87e0dbfaf8a391edd049c25563848.zip |
Initial commit
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 |