mirror of
https://github.com/searxng/searxng.git
synced 2024-11-22 12:10:11 +01:00
SearXNG: searxng_extra
This commit is contained in:
parent
e39a03cc61
commit
1bb82a6b54
2
.github/workflows/data-update.yml
vendored
2
.github/workflows/data-update.yml
vendored
@ -39,7 +39,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Fetch data
|
- name: Fetch data
|
||||||
env:
|
env:
|
||||||
FETCH_SCRIPT: ./searx_extra/update/${{ matrix.fetch }}
|
FETCH_SCRIPT: ./searxng_extra/update/${{ matrix.fetch }}
|
||||||
run: |
|
run: |
|
||||||
V=1 ./manage pyenv.cmd python "$FETCH_SCRIPT"
|
V=1 ./manage pyenv.cmd python "$FETCH_SCRIPT"
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ If you don't trust anyone, you can set up your own, see :ref:`installation`.
|
|||||||
user/index
|
user/index
|
||||||
admin/index
|
admin/index
|
||||||
dev/index
|
dev/index
|
||||||
searx_extra/index
|
searxng_extra/index
|
||||||
utils/index
|
utils/index
|
||||||
src/index
|
src/index
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
.. _searx_extra:
|
.. _searxng_extra:
|
||||||
|
|
||||||
======================================================
|
======================================================
|
||||||
Tooling box ``searx_extra`` for developers and users
|
Tooling box ``searxng_extra`` for developers and users
|
||||||
======================================================
|
======================================================
|
||||||
|
|
||||||
In the folder :origin:`searx_extra/` we maintain some tools useful for
|
In the folder :origin:`searxng_extra/` we maintain some tools useful for
|
||||||
developers and users.
|
developers and users.
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
@ -2,8 +2,8 @@
|
|||||||
.. _standalone_searx.py:
|
.. _standalone_searx.py:
|
||||||
|
|
||||||
===================================
|
===================================
|
||||||
``searx_extra/standalone_searx.py``
|
``searxng_extra/standalone_searx.py``
|
||||||
===================================
|
===================================
|
||||||
|
|
||||||
.. automodule:: searx_extra.standalone_searx
|
.. automodule:: searxng_extra.standalone_searx
|
||||||
:members:
|
:members:
|
18
manage
18
manage
@ -25,7 +25,7 @@ pylint.FILES() {
|
|||||||
# These py files are linted by test.pylint(), all other files are linted by
|
# These py files are linted by test.pylint(), all other files are linted by
|
||||||
# test.pep8()
|
# test.pep8()
|
||||||
|
|
||||||
grep -l -r --include \*.py '^#[[:blank:]]*lint:[[:blank:]]*pylint' searx searx_extra tests
|
grep -l -r --include \*.py '^#[[:blank:]]*lint:[[:blank:]]*pylint' searx searxng_extra tests
|
||||||
}
|
}
|
||||||
|
|
||||||
YAMLLINT_FILES=()
|
YAMLLINT_FILES=()
|
||||||
@ -328,11 +328,11 @@ data.all() {
|
|||||||
data.useragents
|
data.useragents
|
||||||
data.osm_keys_tags
|
data.osm_keys_tags
|
||||||
build_msg DATA "update searx/data/ahmia_blacklist.txt"
|
build_msg DATA "update searx/data/ahmia_blacklist.txt"
|
||||||
python searx_extra/update/update_ahmia_blacklist.py
|
python searxng_extra/update/update_ahmia_blacklist.py
|
||||||
build_msg DATA "update searx/data/wikidata_units.json"
|
build_msg DATA "update searx/data/wikidata_units.json"
|
||||||
python searx_extra/update/update_wikidata_units.py
|
python searxng_extra/update/update_wikidata_units.py
|
||||||
build_msg DATA "update searx/data/currencies.json"
|
build_msg DATA "update searx/data/currencies.json"
|
||||||
python searx_extra/update/update_currencies.py
|
python searxng_extra/update/update_currencies.py
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -341,7 +341,7 @@ data.languages() {
|
|||||||
( set -e
|
( set -e
|
||||||
pyenv.activate
|
pyenv.activate
|
||||||
build_msg ENGINES "fetch languages .."
|
build_msg ENGINES "fetch languages .."
|
||||||
python searx_extra/update/update_languages.py
|
python searxng_extra/update/update_languages.py
|
||||||
build_msg ENGINES "update update searx/languages.py"
|
build_msg ENGINES "update update searx/languages.py"
|
||||||
build_msg DATA "update searx/data/engines_languages.json"
|
build_msg DATA "update searx/data/engines_languages.json"
|
||||||
)
|
)
|
||||||
@ -350,13 +350,13 @@ data.languages() {
|
|||||||
|
|
||||||
data.useragents() {
|
data.useragents() {
|
||||||
build_msg DATA "update searx/data/useragents.json"
|
build_msg DATA "update searx/data/useragents.json"
|
||||||
pyenv.cmd python searx_extra/update/update_firefox_version.py
|
pyenv.cmd python searxng_extra/update/update_firefox_version.py
|
||||||
dump_return $?
|
dump_return $?
|
||||||
}
|
}
|
||||||
|
|
||||||
data.osm_keys_tags() {
|
data.osm_keys_tags() {
|
||||||
build_msg DATA "update searx/data/osm_keys_tags.json"
|
build_msg DATA "update searx/data/osm_keys_tags.json"
|
||||||
pyenv.cmd python searx_extra/update/update_osm_keys_tags.py
|
pyenv.cmd python searxng_extra/update/update_osm_keys_tags.py
|
||||||
dump_return $?
|
dump_return $?
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -524,8 +524,8 @@ node.clean() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pygments.less() {
|
pygments.less() {
|
||||||
build_msg PYGMENTS "searx_extra/update/update_pygments.py"
|
build_msg PYGMENTS "searxng_extra/update/update_pygments.py"
|
||||||
if ! pyenv.cmd python searx_extra/update/update_pygments.py; then
|
if ! pyenv.cmd python searxng_extra/update/update_pygments.py; then
|
||||||
build_msg PYGMENTS "building LESS files for pygments failed"
|
build_msg PYGMENTS "building LESS files for pygments failed"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
@ -31,7 +31,7 @@ def ahmia_blacklist_loader():
|
|||||||
"""Load data from `ahmia_blacklist.txt` and return a list of MD5 values of onion
|
"""Load data from `ahmia_blacklist.txt` and return a list of MD5 values of onion
|
||||||
names. The MD5 values are fetched by::
|
names. The MD5 values are fetched by::
|
||||||
|
|
||||||
searx_extra/update/update_ahmia_blacklist.py
|
searxng_extra/update/update_ahmia_blacklist.py
|
||||||
|
|
||||||
This function is used by :py:mod:`searx.plugins.ahmia_filter`.
|
This function is used by :py:mod:`searx.plugins.ahmia_filter`.
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ Example to use this script:
|
|||||||
|
|
||||||
.. code:: bash
|
.. code:: bash
|
||||||
|
|
||||||
$ python3 searx_extra/standalone_searx.py rain
|
$ python3 searxng_extra/standalone_searx.py rain
|
||||||
|
|
||||||
Example to run it from python:
|
Example to run it from python:
|
||||||
|
|
||||||
@ -31,7 +31,7 @@ Example to run it from python:
|
|||||||
... engine_cs = list(searx.engines.categories.keys())
|
... engine_cs = list(searx.engines.categories.keys())
|
||||||
... # load module
|
... # load module
|
||||||
... spec = importlib.util.spec_from_file_location(
|
... spec = importlib.util.spec_from_file_location(
|
||||||
... 'utils.standalone_searx', 'searx_extra/standalone_searx.py')
|
... 'utils.standalone_searx', 'searxng_extra/standalone_searx.py')
|
||||||
... sas = importlib.util.module_from_spec(spec)
|
... sas = importlib.util.module_from_spec(spec)
|
||||||
... spec.loader.exec_module(sas)
|
... spec.loader.exec_module(sas)
|
||||||
... # use function from module
|
... # use function from module
|
@ -111,7 +111,7 @@ def get_output_filename(relative_name):
|
|||||||
|
|
||||||
def get_css(cssclass, style):
|
def get_css(cssclass, style):
|
||||||
result = f"""/*
|
result = f"""/*
|
||||||
this file is generated automatically by searx_extra/update/update_pygments.py
|
this file is generated automatically by searxng_extra/update/update_pygments.py
|
||||||
using pygments version {pygments.__version__}
|
using pygments version {pygments.__version__}
|
||||||
*/\n\n"""
|
*/\n\n"""
|
||||||
css_text = HtmlFormatter(style=style).get_style_defs(cssclass)
|
css_text = HtmlFormatter(style=style).get_style_defs(cssclass)
|
2
setup.py
2
setup.py
@ -38,7 +38,7 @@ setup(
|
|||||||
author='Adam Tauber',
|
author='Adam Tauber',
|
||||||
author_email='asciimoo@gmail.com',
|
author_email='asciimoo@gmail.com',
|
||||||
license='GNU Affero General Public License',
|
license='GNU Affero General Public License',
|
||||||
packages=find_packages(exclude=["tests*", "searx_extra"]),
|
packages=find_packages(exclude=["tests*", "searxng_extra"]),
|
||||||
zip_safe=False,
|
zip_safe=False,
|
||||||
install_requires=requirements,
|
install_requires=requirements,
|
||||||
extras_require={
|
extras_require={
|
||||||
|
@ -8,7 +8,7 @@ from mock import Mock, patch
|
|||||||
from nose2.tools import params
|
from nose2.tools import params
|
||||||
|
|
||||||
from searx.search import SearchQuery, EngineRef, initialize
|
from searx.search import SearchQuery, EngineRef, initialize
|
||||||
from searx_extra import standalone_searx as sas
|
from searxng_extra import standalone_searx as sas
|
||||||
from tests import SearxTestCase
|
from tests import SearxTestCase
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user