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 | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 cgi/weather (limited to 'cgi/weather') diff --git a/cgi/weather b/cgi/weather new file mode 100755 index 0000000..5590e83 --- /dev/null +++ b/cgi/weather @@ -0,0 +1,24 @@ +#!/usr/bin/python3 + +import os +import subprocess +import sys +import urllib.parse + +import datetime +from datetime import date + +query = os.environ["QUERY_STRING"] +if not query: + print("10 Введите поисковый запрос и нажмите \"Enter\".") + sys.exit() + +text = urllib.parse.unquote(query) + +print("20 text/gemini") + +#print("````") +#print (text) + +print(subprocess.Popen(["ansiweather", "-F", "-u", "metric", "-a", "false", "-w", "true", "-p", "true", "-d", "true", "-s", "false", "-l" , text ], stdout=subprocess.PIPE).stdout.read()) +#print("````") -- cgit v1.2.3