mirror of
https://github.com/chubin/wttr.in
synced 2024-12-26 11:43:08 +00:00
new global variables
This commit is contained in:
parent
e414e8f924
commit
fcc7b79272
1 changed files with 13 additions and 1 deletions
|
@ -3,7 +3,7 @@ import os
|
||||||
|
|
||||||
MYDIR = os.path.abspath(os.path.dirname( os.path.dirname('__file__') ))
|
MYDIR = os.path.abspath(os.path.dirname( os.path.dirname('__file__') ))
|
||||||
|
|
||||||
GEOLITE = os.path.join( MYDIR, "GeoLite2-City.mmdb" )
|
GEOLITE = os.path.join(MYDIR, 'data', "GeoLite2-City.mmdb")
|
||||||
WEGO = "/home/igor/go/bin/we-lang"
|
WEGO = "/home/igor/go/bin/we-lang"
|
||||||
PYPHOON = "/home/igor/wttr.in/pyphoon/bin/pyphoon-lolcat"
|
PYPHOON = "/home/igor/wttr.in/pyphoon/bin/pyphoon-lolcat"
|
||||||
|
|
||||||
|
@ -33,6 +33,18 @@ MALFORMED_RESPONSE_HTML_PAGE = open(os.path.join(STATIC, 'malformed-response.htm
|
||||||
LISTEN_HOST = ""
|
LISTEN_HOST = ""
|
||||||
LISTEN_PORT = 8002
|
LISTEN_PORT = 8002
|
||||||
|
|
||||||
|
PLAIN_TEXT_AGENTS = [
|
||||||
|
"curl",
|
||||||
|
"httpie",
|
||||||
|
"lwp-request",
|
||||||
|
"wget",
|
||||||
|
"python-requests"
|
||||||
|
]
|
||||||
|
|
||||||
|
PLAIN_TEXT_PAGES = [':help', ':bash.function', ':translation']
|
||||||
|
|
||||||
|
IP2LOCATION_KEY = ''
|
||||||
|
|
||||||
def error(text):
|
def error(text):
|
||||||
if not text.startswith('Too many queries'):
|
if not text.startswith('Too many queries'):
|
||||||
print text
|
print text
|
||||||
|
|
Loading…
Reference in a new issue