summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorAlexandre Flament <alex@al-f.net>2021-02-01 17:16:58 +0100
committerGitHub <noreply@github.com>2021-02-01 17:16:58 +0100
commit34de715e620a192185e093e1e6caca04ae3cb77a (patch)
tree64c07787c3a390dc7f0f29d2b1041af02062b3c7 /utils
parent1742355eb879a1e5ac23a7ff547f0ec79f2e4d4c (diff)
parent6047087aacdfd3b574c97c6f7f5f25ade683e48e (diff)
downloadsearxng-34de715e620a192185e093e1e6caca04ae3cb77a.tar.gz
searxng-34de715e620a192185e093e1e6caca04ae3cb77a.zip
Merge pull request #2500 from dalf/github-action-data
[enh] every Sunday, call utils/fetch_*.py scripts and create a PR automatically
Diffstat (limited to 'utils')
-rw-r--r--utils/fetch_languages.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/utils/fetch_languages.py b/utils/fetch_languages.py
index 1f8dc7786..453693136 100644
--- a/utils/fetch_languages.py
+++ b/utils/fetch_languages.py
@@ -6,18 +6,19 @@
# are written in current directory to avoid overwriting in case something goes wrong.
import json
+from pathlib import Path
from pprint import pformat
from sys import path
from babel import Locale, UnknownLocaleError
from babel.languages import get_global
path.append('../searx') # noqa
-from searx import settings
+from searx import settings, searx_dir
from searx.engines import initialize_engines, engines
# Output files.
-engines_languages_file = 'engines_languages.json'
-languages_file = 'languages.py'
+engines_languages_file = Path(searx_dir) / 'data' / 'engines_languages.json'
+languages_file = Path(searx_dir) / 'languages.py'
# Fetchs supported languages for each engine and writes json file with those.