From 903cd6ebb0c5589cefd0416ebafded1d7203d0c1 Mon Sep 17 00:00:00 2001 From: Satoshi Nakamoto <65907137+Satosh1Nakamot0@users.noreply.github.com> Date: Sun, 17 Oct 2021 15:13:58 +0200 Subject: [PATCH] Update ppi.py --- ppi.py | 83 +++++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 53 insertions(+), 30 deletions(-) diff --git a/ppi.py b/ppi.py index ef55dae..06e3764 100644 --- a/ppi.py +++ b/ppi.py @@ -249,43 +249,32 @@ def wttrDataV1(): blogo() weatherList = """ ------------------------------------------------------------------------------------ - - - - \033[1;31;40m*\033[0;37;40m uruguay # city name - \033[1;31;40m*\033[0;37;40m ~Giza+pyramid # any location (+ for spaces) + \033[1;31;40m*\033[0;37;40m Uruguay # city name + \033[1;31;40m*\033[0;37;40m Giza+pyramid # any location (+ for spaces) \033[1;31;40m*\033[0;37;40m Москва # Unicode name of any location in any language \033[1;31;40m*\033[0;37;40m muc # airport code (3 letters) - \033[1;31;40m*\033[0;37;40m @lightninghood.com # domain name + \033[1;31;40m*\033[0;37;40m @bitcoin.org # domain name \033[1;31;40m*\033[0;37;40m 94107 # area codes \033[1;31;40m*\033[0;37;40m -78.46,106.79 # GPS coordinates \033[1;31;40m*\033[0;37;40m moon # Moon phase (add ,+US or ,+France for these cities) - \033[1;31;40m*\033[0;37;40m moon@2009-01-03 # Moon phase for the date (@2016-10-25) - + \033[1;31;40m*\033[0;37;40m moon@2009-01-03 # Moon phase for the date (@2009-01-03) PRESS \033[1;32;40mM\033[0;37;40m TO INSERT MORE DATA - ------------------------------------------------------------------------------------ - """ print(weatherList) selectData = input("Insert your data \033[1;31;40m*\033[0;37;40m : ") if selectData in ['M', 'm']: moreData = """ - ------------------------------------------------------------------------------------ Supported languages - ar af be ca da de el es et fr fa hi hu ia id it nb nl oc pl pt-br ro ru tr th uk vi zh-cn zh-tw (supported) - ------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------ Units - m # metric (SI) (used by default everywhere except US) u # USCS (used by default in US) M # show wind speed in m/s - ------------------------------------------------------------------------------------ """ print(moreData) @@ -309,41 +298,30 @@ def wttrDataV2(): blogo() weatherList = """ ------------------------------------------------------------------------------------ - - - - \033[1;31;40m*\033[0;37;40m uruguay # city name - \033[1;31;40m*\033[0;37;40m ~Giza+pyramid # any location (+ for spaces) + \033[1;31;40m*\033[0;37;40m Uruguay # city name + \033[1;31;40m*\033[0;37;40m Giza+pyramid # any location (+ for spaces) \033[1;31;40m*\033[0;37;40m Москва # Unicode name of any location in any language \033[1;31;40m*\033[0;37;40m muc # airport code (3 letters) - \033[1;31;40m*\033[0;37;40m @lightninghood.com # domain name + \033[1;31;40m*\033[0;37;40m @bitcoin.org # domain name \033[1;31;40m*\033[0;37;40m 94107 # area codes \033[1;31;40m*\033[0;37;40m -78.46,106.79 # GPS coordinates - PRESS \033[1;32;40mM\033[0;37;40m TO INSERT MORE DATA - ------------------------------------------------------------------------------------ - """ print(weatherList) selectData = input("Insert your data \033[1;31;40m*\033[0;37;40m : ") if selectData in ['M', 'm']: moreData = """ - ------------------------------------------------------------------------------------ Supported languages - ar af be ca da de el es et fr fa hi hu ia id it nb nl oc pl pt-br ro ru tr th uk vi zh-cn zh-tw (supported) - ------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------ Units - m # metric (SI) (used by default everywhere except US) u # USCS (used by default in US) M # show wind speed in m/s - ------------------------------------------------------------------------------------ """ print(moreData) @@ -361,10 +339,55 @@ def wttrDataV2(): input("Continue...") except: pass +def wttrDataV3(): + try: + clear() + blogo() + weatherList = """ + ------------------------------------------------------------------------------------ + \033[1;31;40m*\033[0;37;40m Uruguay # city name + \033[1;31;40m*\033[0;37;40m Giza+pyramid # any location (+ for spaces) + \033[1;31;40m*\033[0;37;40m Москва # Unicode name of any location in any language + \033[1;31;40m*\033[0;37;40m muc # airport code (3 letters) + \033[1;31;40m*\033[0;37;40m @bitcoin.org # domain name + \033[1;31;40m*\033[0;37;40m 94107 # area codes + \033[1;31;40m*\033[0;37;40m -78.46,106.79 # GPS coordinates + PRESS \033[1;32;40mM\033[0;37;40m TO INSERT MORE DATA + ------------------------------------------------------------------------------------ + """ + print(weatherList) + selectData = input("Insert your data \033[1;31;40m*\033[0;37;40m : ") + if selectData in ['M', 'm']: + moreData = """ + ------------------------------------------------------------------------------------ + Supported languages + ar af be ca da de el es et fr fa hi hu ia id it nb nl + oc pl pt-br ro ru tr th uk vi zh-cn zh-tw (supported) + ------------------------------------------------------------------------------------ + ------------------------------------------------------------------------------------ + Units + m # metric (SI) (used by default everywhere except US) + u # USCS (used by default in US) + M # show wind speed in m/s + ------------------------------------------------------------------------------------ + """ + print(moreData) + selectData2 = input("Insert your data \033[1;31;40m*\033[0;37;40m : ") + lang = input("Insert your language: ") + unit = input("Insert your metric units: ") + list = "curl '" + lang + "v3.wttr.in" + selectData2 + "?F&" + unit + "'" + else: + list = "curl v3.wttr.in/" + selectData + "?F" + a = os.popen(list).read() + clear() + blogo() + print(a) + input("Continue...") + except: + pass #-----------------------------END wttr.in-------------------------------- - #-----------------------------RATE.SX-------------------------------- def rateSXList():