mirror of
https://github.com/chubin/wttr.in
synced 2024-12-27 04:03:07 +00:00
bin/proxy.py clean up
This commit is contained in:
parent
5353cc3a17
commit
10f5aa579c
2 changed files with 26 additions and 11 deletions
|
@ -39,6 +39,10 @@ GEOLOCATOR_SERVICE = 'http://localhost:8004'
|
||||||
LISTEN_HOST = ""
|
LISTEN_HOST = ""
|
||||||
LISTEN_PORT = 8002
|
LISTEN_PORT = 8002
|
||||||
|
|
||||||
|
PROXY_HOST = "127.0.0.1"
|
||||||
|
PROXY_PORT = 5001
|
||||||
|
PROXY_CACHEDIR = "api-cache"
|
||||||
|
|
||||||
MY_EXTERNAL_IP = '5.9.243.187'
|
MY_EXTERNAL_IP = '5.9.243.187'
|
||||||
|
|
||||||
PLAIN_TEXT_AGENTS = [
|
PLAIN_TEXT_AGENTS = [
|
||||||
|
@ -53,6 +57,7 @@ PLAIN_TEXT_PAGES = [':help', ':bash.function', ':translation']
|
||||||
|
|
||||||
IP2LOCATION_KEY = ''
|
IP2LOCATION_KEY = ''
|
||||||
|
|
||||||
|
|
||||||
def error(text):
|
def error(text):
|
||||||
"log error `text` and raise a RuntimeError exception"
|
"log error `text` and raise a RuntimeError exception"
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
# vim: set encoding=utf-8
|
# vim: fileencoding=utf-8
|
||||||
|
|
||||||
|
"""
|
||||||
|
Translation of almost everything.
|
||||||
|
"""
|
||||||
|
|
||||||
FULL_TRANSLATION = [
|
FULL_TRANSLATION = [
|
||||||
"de", "fr", "id", "it", "nb", "nl", "pl", "ru",
|
"de", "fr", "id", "it", "nb", "nl", "pl", "ru",
|
||||||
|
@ -16,6 +20,12 @@ PARTIAL_TRANSLATION = [
|
||||||
"he",
|
"he",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
PROXY_LANGS = [
|
||||||
|
'az', 'bs', 'ca', 'cy', 'eo', 'he', 'hr',
|
||||||
|
'hy', 'id', 'is', 'it', 'ja',
|
||||||
|
'kk', 'lv', 'mk', 'nb', 'nn', 'sl', 'uz'
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
SUPPORTED_LANGS = FULL_TRANSLATION + PARTIAL_TRANSLATION
|
SUPPORTED_LANGS = FULL_TRANSLATION + PARTIAL_TRANSLATION
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue