From 91406f02b2a87e0dbfaf8a391edd049c25563848 Mon Sep 17 00:00:00 2001 From: sn4il Date: Tue, 27 Jun 2023 10:59:14 +0300 Subject: Initial commit --- cgi/weather.sh | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100755 cgi/weather.sh (limited to 'cgi/weather.sh') 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 -- cgit v1.2.3