Update ppi.py

This commit is contained in:
Satoshi Nakamoto 2021-10-17 15:13:58 +02:00 committed by GitHub
parent a07720d96b
commit 903cd6ebb0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

83
ppi.py
View file

@ -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():