summaryrefslogtreecommitdiff
path: root/searx/search
diff options
context:
space:
mode:
authorAlexandre Flament <alexandre.flament@hesge.ch>2024-03-01 09:30:43 +0100
committerAlexandre Flament <alex@al-f.net>2024-03-03 11:18:43 +0100
commit1a66bfa66c5dd1e1fcfceee5703700b8e6e00424 (patch)
tree8c6822f0b7a486db960cef7605c5ede6322404f9 /searx/search
parent08e7c37a3548d6acdca45955b13a898f2db4c3e9 (diff)
downloadsearxng-1a66bfa66c5dd1e1fcfceee5703700b8e6e00424.tar.gz
searxng-1a66bfa66c5dd1e1fcfceee5703700b8e6e00424.zip
checker: display results at the end
Diffstat (limited to 'searx/search')
-rw-r--r--searx/search/checker/__main__.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/searx/search/checker/__main__.py b/searx/search/checker/__main__.py
index 15fcb5ebd..340c27187 100644
--- a/searx/search/checker/__main__.py
+++ b/searx/search/checker/__main__.py
@@ -55,7 +55,7 @@ def iter_processor(engine_name_list):
if processor is not None:
yield name, processor
else:
- stdout.write(f'{BOLD_SEQ}Engine {name:30}{RESET_SEQ}{RED}Engine does not exist{RESET_SEQ}')
+ stdout.write(f'{BOLD_SEQ}Engine {name:30}{RESET_SEQ}{RED}Engine does not exist{RESET_SEQ}\n')
else:
for name, processor in searx.search.PROCESSORS.items():
yield name, processor
@@ -64,12 +64,17 @@ def iter_processor(engine_name_list):
# actual check & display
def run(engine_name_list, verbose):
searx.search.initialize()
+ name_checker_list = []
for name, processor in iter_processor(engine_name_list):
stdout.write(f'{BOLD_SEQ}Engine {name:30}{RESET_SEQ}Checking\n')
if not sys.stdout.isatty():
stderr.write(f'{BOLD_SEQ}Engine {name:30}{RESET_SEQ}Checking\n')
checker = searx.search.checker.Checker(processor)
checker.run()
+ name_checker_list.append((name, checker))
+
+ stdout.write(f'\n== {BOLD_SEQ}Results{RESET_SEQ} ' + '=' * 70 + '\n')
+ for name, checker in name_checker_list:
if checker.test_results.successful:
stdout.write(f'{BOLD_SEQ}Engine {name:30}{RESET_SEQ}{GREEN}OK{RESET_SEQ}\n')
if verbose: