README.rst 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. .. SPDX-License-Identifier: AGPL-3.0-or-later
  2. ==============================
  3. Only show green hosted results
  4. ==============================
  5. A `SearXNG plugin <https://docs.searxng.org/dev/plugins/development.html>`__ to check if a
  6. domain is part of the `Green WEB <https://www.thegreenwebfoundation.org/>`__.
  7. Installation
  8. ============
  9. **USE WITH CARE**
  10. Its recommended to install (and regularly update) `The Green Domains dataset
  11. <https://github.com/thegreenwebfoundation/admin-portal/blob/master/docs/working-with-greenweb-datasets.md>`__
  12. otherwise the plugin uses the API what sends a lot of requests from the SearXNG
  13. instance to the Green WEB foundation and slows down the SearXNG instance
  14. massively.
  15. Change to the environment in which the plugin is to be installed::
  16. $ sudo utils/searxng.sh instance cmd python -m \
  17. pip install git+https://github.com/return42/tgwf-searx-plugins
  18. Development
  19. ===========
  20. This project is managed by `hatch <https://hatch.pypa.io>`_, for development
  21. tasks you should install ``hatch``:
  22. .. code:: sh
  23. $ pipx install hatch
  24. Format and *lint* your code before commit:
  25. .. code:: sh
  26. $ hatch run fix
  27. $ hatch run check
  28. To enter the development environment use ``shell``:
  29. .. code:: sh
  30. $ hatch shell
  31. To get a developer installation in a SearXNG developer environment:
  32. .. code:: sh
  33. $ git clone git@github.com:return42/tgwf-searx-plugins.git
  34. $ ./manage pyenv.cmd python -m \
  35. pip install -e tgwf-searx-plugins
  36. To register the plugin in SearXNG add ``only_show_green_results.SXNGPlugin`` to
  37. the ``plugins:``:
  38. .. code:: yaml
  39. plugins:
  40. # ...
  41. only_show_green_results.SXNGPlugin:
  42. active: false