Rename all from searx to searxng

This commit is contained in:
HLFH 2021-09-29 11:26:25 +01:00
parent a582cf3d82
commit ac05f0943c
No known key found for this signature in database
GPG key ID: 200A60A75D394102
682 changed files with 58450 additions and 58450 deletions

View file

@ -3,28 +3,28 @@
# shellcheck shell=bash disable=SC2034
#
# This file should be edited only ones just before the installation of any
# service is done. After the installation of the searx service a copy of this
# file is placed into the $SEARX_SRC of the instance, e.g.::
# service is done. After the installation of the searxng service a copy of this
# file is placed into the $SEARXNG_SRC of the instance, e.g.::
#
# /usr/local/searx/searx-src/.config.sh
# /usr/local/searxng/searxng-src/.config.sh
#
# .. hint::
#
# Before you change a value here, You have to fully uninstall any previous
# installation of searx, morty and filtron services!
# installation of searxng, morty and filtron services!
# utils/searx.sh
# utils/searxng.sh
# --------------
# The setup of the SearXNG instance is done in the settings.yml
# (SEARX_SETTINGS_PATH). Read the remarks in [1] carefully and don't forget to
# (SEARXNG_SETTINGS_PATH). Read the remarks in [1] carefully and don't forget to
# rebuild instance's environment (make buildenv) if needed. The settings.yml
# file of an already installed instance is shown by::
#
# $ ./utils/searx.sh --help
# $ ./utils/searxng.sh --help
# ---- SearXNG instance setup (already installed)
# SEARX_SETTINGS_PATH : /etc/searx/settings.yml
# SEARX_SRC : /usr/local/searx/searx-src
# SEARXNG_SETTINGS_PATH : /etc/searxng/settings.yml
# SEARXNG_SRC : /usr/local/searxng/searxng-src
#
# [1] https://searxng.github.io/searxng/admin/engines/settings.html
@ -49,4 +49,4 @@
# **experimental**: Set SERVICE_USER to run all services by one account, but be
# aware that removing discrete components might conflict!
# SERVICE_USER=searx
# SERVICE_USER=searxng

View file

@ -1,6 +1,6 @@
[run]
branch = True
source = searx
source = searxng
[report]
show_missing = True

View file

@ -93,7 +93,7 @@
(setq-local js-indent-level 2)
;; flycheck should use the eslint checker from simple theme
(setq-local flycheck-javascript-eslint-executable
(expand-file-name "searx/static/themes/simple/node_modules/.bin/eslint" prj-root))
(expand-file-name "searxng/static/themes/simple/node_modules/.bin/eslint" prj-root))
(flycheck-mode)
))))

View file

@ -1,28 +1,28 @@
---
name: Bug report
about: Report a bug in Searx
about: Report a bug in Searxng
title: ''
labels: bug
assignees: ''
---
<!-- PLEASE FILL THESE FIELDS, IT REALLY HELPS THE MAINTAINERS OF SEARX -->
<!-- PLEASE FILL THESE FIELDS, IT REALLY HELPS THE MAINTAINERS OF SEARXNG -->
**Version of Searx, commit number if you are using on master branch and stipulate if you forked Searx**
**Version of Searxng, commit number if you are using on master branch and stipulate if you forked Searxng**
<!-- If you are running on master branch using git execute this command
in order to fetch the latest commit ID:
```
git log -1
```
If you are using searx-docker then look at the bottom of the Searx page
and check for the version after "Powered by searx"
If you are using searxng-docker then look at the bottom of the Searxng page
and check for the version after "Powered by searxng"
Please also stipulate if you are using a forked version of Searx and
Please also stipulate if you are using a forked version of Searxng and
include a link to the fork source code.
-->
**How did you install Searx?**
<!-- Did you install Searx using the official wiki or using searx-docker
or manually by executing the searx/webapp.py file? -->
**How did you install Searxng?**
<!-- Did you install Searxng using the official wiki or using searxng-docker
or manually by executing the searxng/webapp.py file? -->
**What happened?**
<!-- A clear and concise description of what the bug is. -->

View file

@ -1,12 +1,12 @@
---
name: Engine request
about: Request a new engine in Searx
about: Request a new engine in Searxng
title: ''
labels: enhancement, engine request
assignees: ''
---
<!-- PLEASE FILL THESE FIELDS, IT REALLY HELPS THE MAINTAINERS OF SEARX -->
<!-- PLEASE FILL THESE FIELDS, IT REALLY HELPS THE MAINTAINERS OF SEARXNG -->
**Working URL to the engine**
<!-- Please check if the engine is responding correctly before submitting it. -->
@ -17,13 +17,13 @@ assignees: ''
**Features of this engine**
<!-- Features of this engine: Doesn't track its users, fast, easy to integrate, ... -->
**How can Searx fetch the information from this engine?**
**How can Searxng fetch the information from this engine?**
<!-- List API URL, example code (using the correct markdown) and more
that could be useful for the developers in order to implement this engine.
If you don't know what to write, let this part blank.>
**Applicable category of this engine**
<!-- Where should this new engine fit in Searx? Current categories in Searx:
<!-- Where should this new engine fit in Searxng? Current categories in Searxng:
general, files, images, it, map, music, news, science, social media and videos.
You can add multiple categories at the same time. -->

View file

@ -1,12 +1,12 @@
---
name: Feature request
about: Request a new feature in Searx
about: Request a new feature in Searxng
title: ''
labels: enhancement
assignees: ''
---
<!-- PLEASE FILL THESE FIELDS, IT REALLY HELPS THE MAINTAINERS OF SEARX -->
<!-- PLEASE FILL THESE FIELDS, IT REALLY HELPS THE MAINTAINERS OF SEARXNG -->
**Is your feature request related to a problem? Please describe.**
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->

View file

@ -9,14 +9,14 @@ updates:
open-pull-requests-limit: 5
target-branch: "master"
- package-ecosystem: "npm"
directory: "/searx/static/themes/oscar"
directory: "/searxng/static/themes/oscar"
schedule:
interval: "weekly"
day: "friday"
open-pull-requests-limit: 5
target-branch: "master"
- package-ecosystem: "npm"
directory: "/searx/static/themes/simple"
directory: "/searxng/static/themes/simple"
schedule:
interval: "weekly"
day: "friday"

View file

@ -1,4 +1,4 @@
name: "Update searx.data"
name: "Update searxng.data"
on:
schedule:
- cron: "05 06 1 * *"
@ -25,7 +25,7 @@ jobs:
- name: Install Ubuntu packages
run: |
sudo ./utils/searx.sh install packages
sudo ./utils/searxng.sh install packages
- name: Set up Python
uses: actions/setup-python@v2
@ -39,7 +39,7 @@ jobs:
- name: Fetch data
env:
FETCH_SCRIPT: ./searx_extra/update/${{ matrix.fetch }}
FETCH_SCRIPT: ./searxng_extra/update/${{ matrix.fetch }}
run: |
V=1 ./manage pyenv.cmd python "$FETCH_SCRIPT"
@ -47,16 +47,16 @@ jobs:
id: cpr
uses: peter-evans/create-pull-request@v3
with:
commit-message: Update searx.data - ${{ matrix.fetch }}
committer: searx-bot <noreply@github.com>
commit-message: Update searxng.data - ${{ matrix.fetch }}
committer: searxng-bot <noreply@github.com>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
signoff: false
branch: update_data_${{ matrix.fetch }}
delete-branch: true
draft: false
title: 'Update searx.data - ${{ matrix.fetch }}'
title: 'Update searxng.data - ${{ matrix.fetch }}'
body: |
Update searx.data - ${{ matrix.fetch }}
Update searxng.data - ${{ matrix.fetch }}
labels: |
data

View file

@ -19,7 +19,7 @@ jobs:
uses: actions/checkout@v2
- name: Install Ubuntu packages
run: |
sudo ./utils/searx.sh install packages
sudo ./utils/searxng.sh install packages
sudo apt install firefox
- name: Set up Python
uses: actions/setup-python@v2
@ -55,7 +55,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v2
- name: Install Ubuntu packages
run: sudo ./utils/searx.sh install buildhost
run: sudo ./utils/searxng.sh install buildhost
- name: Install node dependencies
run: make V=1 node.env
- name: Build themes
@ -70,7 +70,7 @@ jobs:
with:
persist-credentials: false
- name: Install Ubuntu packages
run: sudo ./utils/searx.sh install buildhost
run: sudo ./utils/searxng.sh install buildhost
- name: Set up Python
uses: actions/setup-python@v2
with:

View file

@ -1,9 +1,9 @@
searxng is a fork from `searx <https://github.com/searx/searx>`_ and is
searxng is a fork from `searxng <https://github.com/searxng/searxng>`_ and is
maintained by Alexandre Flament (`@dalf <https://github.com/dalf>`_) and Markus
Heiser (`@return42 <https://github.com/return42>`_)
People who have submitted patches/translations, reported bugs, consulted
features or generally made searx better:
features or generally made searxng better:
- Adam Tauber `@asciimoo <https://github.com/asciimoo>`_
- Matej Cotman `@matejc <https://github.com/matejc>`_

View file

@ -7,14 +7,14 @@ Core
- drop support for Python 3.5 ( #2459 )
- add support for Python 3.9 ( #2397 #2459 )
- update Python dependencies ( #2428 #2459 #2206 ) ⚠️ pyopenssl is not longer required
- automatic update of searx.data ( #2555 #2585 #2595 #2592 #2600 )
- update searx.data ( #2604 #2605 #2606 #2607 #2415 )
- automatic update of searxng.data ( #2555 #2585 #2595 #2592 #2600 )
- update searxng.data ( #2604 #2605 #2606 #2607 #2415 )
- add ability to send engine data to subsequent requests ( #2615 )
- add checker ( #2419 #2476 #2481 #2682 #2682 #2657 )
- by default allow only HTTPS, not HTTP ( #2641 #2659 )
- replace /translations.js with an embedded JSON ( #2660 )
- activate raise_for_error by default ( #2557 )
- don't dump traceback of SearxEngineResponseException on init ( #2635 )
- don't dump traceback of SearxngEngineResponseException on init ( #2635 )
Documentation
~~~~~~~~~~~~~
@ -36,7 +36,7 @@ Themes
- oscar: Hide links panel in mobile screens ( #2458 )
- oscar: upgrade dependencies ( #2346 #2673 #2662 )
- remove legacy, courgette and pix-art themes ( #2344 )
- add hyperlink to searx instances list in error message ( #2387 )
- add hyperlink to searxng instances list in error message ( #2387 )
- preferences: a tooltip is shown when the mouse is over the engine names ( #2661 )
- Ignore double-quotes when highlighting query parts ( #2553 )
- update autocomplete ( #2593 )
@ -106,7 +106,7 @@ Bug fixes
Code refactoring / reduce the technical debt
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- refactor searx.search.SearchQuery and searx.search.EngineRef ( #2398 )
- refactor searxng.search.SearchQuery and searxng.search.EngineRef ( #2398 )
- dynamically set language_support variable ( #2499 )
- engines: add about variable ( #2460 )
- processors ( #2225 5c6a5407a0b124c3323e73c33b81ec1fbd7d2fce )
@ -140,7 +140,7 @@ Install scripts
- replace ubu1910 image by ubu2010 image ( #2435 )
- LXC switch to Fedora 33 / Fedora 31 reached its EOL #2634 ( #2634 )
- add package which to CentOS-7 boilerplate ( #2623 )
- use SEARX_SETTINGS_TEMPLATE from .config environment ( #2417 )
- use SEARXNG_SETTINGS_TEMPLATE from .config environment ( #2417 )
- determine path to makefile.lxc in a LXC ( #2399 )
- remove unused code ( #2401 #2497 )
- support git versions <v2.22 ( #2620 )
@ -148,7 +148,7 @@ Install scripts
Announcement
~~~~~~~~~~~~
We, the searx maintainer team, would like to say a huge thank you for everybody who had been involved in the development of searx or supported us in the past 7 years - making our first stable release available. Special thanks to [NLNet](https://nlnet.nl) for sponsoring multiple features of this release.
We, the searxng maintainer team, would like to say a huge thank you for everybody who had been involved in the development of searxng or supported us in the past 7 years - making our first stable release available. Special thanks to [NLNet](https://nlnet.nl) for sponsoring multiple features of this release.
0.18.0 2020.12.14
@ -158,16 +158,16 @@ Core
~~~~
- drop Python 2 support ( #2137 #2244 )
- separate index and search routes ( #1681 ). ⚠️ add & remove your searx instance(s) from your browser.
- separate index and search routes ( #1681 ). ⚠️ add & remove your searxng instance(s) from your browser.
- add external_bang ( #2027 #2043 #2059 )
- add external plugins supports ( #2074 )
- add plugin converting strings into hash digests ( #1246 )
- new category: Onions ( #565 )
- allow searx query parts anywhere in the query ( commit aa3c18dda9329fff875328f6ba97483c417b149a 2aef38c3b9d1fe93e9d665a49b10151d63d92392 )
- allow searxng query parts anywhere in the query ( commit aa3c18dda9329fff875328f6ba97483c417b149a 2aef38c3b9d1fe93e9d665a49b10151d63d92392 )
- preferences: use base_url for prefix of sharing 'currenly saved preferences' (#1249 )
- upgrade to request 2.24.0, pyopenssl is optional ( #2199 )
- force admins to set secret_key if debug mode is disabled ( #2256 )
- standalone searx update ( #1591 )
- standalone searxng update ( #1591 )
- architecture clean up ( #2140 #2185 #2195 #2196 #2198 #2189 #2208 #2239 #2241 #2246 #2248 )
- record detail about engine error ( #2332 #2375 #2350 ). Add a new API endpoint: ``/stats/errors``.
- display if an engine does not support HTTPS requests ( #2373 )
@ -271,7 +271,7 @@ Docker image
Bug fixes
~~~~~~~~~
- searx.utils.HTMLTextExtractor: invalid HTML don't raise an Exception ( #2190 )
- searxng.utils.HTMLTextExtractor: invalid HTML don't raise an Exception ( #2190 )
- Fix static URL ( commit da8b227044f45127f705f6ea94a72d368eea73bb )
- Fix autocomplete ( #2127 )
- Fix opensearch.xml ( #2132 #2247 )
@ -301,7 +301,7 @@ Special thanks to `NLNet <https://nlnet.nl>`__ for sponsoring multiple features
- Added autofocus to all search inputs
- CSP friendly oscar theme
- Added option to hide engine errors with `display_error_messages` engine option (true/false values, default is true)
- Tons of accessibility fixes - see https://github.com/searx/searx/issues/350 for details
- Tons of accessibility fixes - see https://github.com/searxng/searxng/issues/350 for details
- More flexible branding options: configurable vcs/issue tracker links
- Added "disable all" & "allow all" options to preferences engine select
- Autocomplete keyboard navigation fixes
@ -360,7 +360,7 @@ News
- Docker image updates
- Bang expression fixes
- Result merging fixes
- New environment variable added: SEARX_BIND_ADDRESS
- New environment variable added: SEARXNG_BIND_ADDRESS
News
@ -425,8 +425,8 @@ News
- Bug fixes
- https://github.com/searx/searx/issues/1088
- https://github.com/searx/searx/issues/1089
- https://github.com/searxng/searxng/issues/1088
- https://github.com/searxng/searxng/issues/1089
- Dependency updates
@ -484,7 +484,7 @@ Special thanks to `NLNet <https://nlnet.nl>`__ for sponsoring multiple features
- Voat.co (general, social media)
- Online Etimology Dictionary (science)
- CCC tv (video, it)
- Searx (all categories - can rotate multiple other instances)
- Searxng (all categories - can rotate multiple other instances)
- Answerer functionality (see answerer section on /preferences)
- Local answerers
@ -702,5 +702,5 @@ New dependencies
News
~~~~
Health status of searx instances and engines: http://stats.searx.oe5tpo.com
(source: https://github.com/pointhi/searx_stats)
Health status of searxng instances and engines: http://stats.searxng.oe5tpo.com
(source: https://github.com/pointhi/searxng_stats)

View file

@ -1,24 +1,24 @@
FROM alpine:3.14
ENTRYPOINT ["/sbin/tini","--","/usr/local/searx/dockerfiles/docker-entrypoint.sh"]
ENTRYPOINT ["/sbin/tini","--","/usr/local/searxng/dockerfiles/docker-entrypoint.sh"]
EXPOSE 8080
VOLUME /etc/searx
VOLUME /etc/searxng
VOLUME /var/log/uwsgi
ARG SEARX_GID=977
ARG SEARX_UID=977
ARG SEARXNG_GID=977
ARG SEARXNG_UID=977
RUN addgroup -g ${SEARX_GID} searx && \
adduser -u ${SEARX_UID} -D -h /usr/local/searx -s /bin/sh -G searx searx
RUN addgroup -g ${SEARXNG_GID} searxng && \
adduser -u ${SEARXNG_UID} -D -h /usr/local/searxng -s /bin/sh -G searxng searxng
ENV INSTANCE_NAME=searxng \
AUTOCOMPLETE= \
BASE_URL= \
MORTY_KEY= \
MORTY_URL= \
SEARX_SETTINGS_PATH=/etc/searx/settings.yml \
UWSGI_SETTINGS_PATH=/etc/searx/uwsgi.ini
SEARXNG_SETTINGS_PATH=/etc/searxng/settings.yml \
UWSGI_SETTINGS_PATH=/etc/searxng/uwsgi.ini
WORKDIR /usr/local/searx
WORKDIR /usr/local/searxng
COPY requirements.txt ./requirements.txt
@ -51,40 +51,40 @@ RUN apk upgrade --no-cache \
&& apk del build-dependencies \
&& rm -rf /root/.cache
COPY --chown=searx:searx . .
COPY --chown=searxng:searxng . .
ARG TIMESTAMP_SETTINGS=0
ARG TIMESTAMP_UWSGI=0
ARG VERSION_GITCOMMIT=unknown
RUN su searx -c "/usr/bin/python3 -m compileall -q searx"; \
touch -c --date=@${TIMESTAMP_SETTINGS} searx/settings.yml; \
RUN su searxng -c "/usr/bin/python3 -m compileall -q searxng"; \
touch -c --date=@${TIMESTAMP_SETTINGS} searxng/settings.yml; \
touch -c --date=@${TIMESTAMP_UWSGI} dockerfiles/uwsgi.ini; \
find /usr/local/searx/searx/static -a \( -name '*.html' -o -name '*.css' -o -name '*.js' \
find /usr/local/searxng/searxng/static -a \( -name '*.html' -o -name '*.css' -o -name '*.js' \
-o -name '*.svg' -o -name '*.ttf' -o -name '*.eot' \) \
-type f -exec gzip -9 -k {} \+ -exec brotli --best {} \+
# Keep these arguments at the end to prevent redundant layer rebuilds
ARG LABEL_DATE=
ARG GIT_URL=unknown
ARG SEARX_GIT_VERSION=unknown
ARG SEARXNG_GIT_VERSION=unknown
ARG LABEL_VCS_REF=
ARG LABEL_VCS_URL=
LABEL maintainer="searxng <${GIT_URL}>" \
description="A privacy-respecting, hackable metasearch engine." \
version="${SEARX_GIT_VERSION}" \
version="${SEARXNG_GIT_VERSION}" \
org.label-schema.schema-version="1.0" \
org.label-schema.name="searxng" \
org.label-schema.version="${SEARX_GIT_VERSION}" \
org.label-schema.version="${SEARXNG_GIT_VERSION}" \
org.label-schema.url="${LABEL_VCS_URL}" \
org.label-schema.vcs-ref=${LABEL_VCS_REF} \
org.label-schema.vcs-url=${LABEL_VCS_URL} \
org.label-schema.build-date="${LABEL_DATE}" \
org.label-schema.usage="https://github.com/searx/searx-docker" \
org.label-schema.usage="https://github.com/searxng/searxng-docker" \
org.opencontainers.image.title="searxng" \
org.opencontainers.image.version="${SEARX_GIT_VERSION}" \
org.opencontainers.image.version="${SEARXNG_GIT_VERSION}" \
org.opencontainers.image.url="${LABEL_VCS_URL}" \
org.opencontainers.image.revision=${LABEL_VCS_REF} \
org.opencontainers.image.source=${LABEL_VCS_URL} \
org.opencontainers.image.created="${LABEL_DATE}" \
org.opencontainers.image.documentation="https://github.com/searx/searx-docker"
org.opencontainers.image.documentation="https://github.com/searxng/searxng-docker"

View file

@ -14,7 +14,7 @@ help:
@./manage --help
@echo '----'
@echo 'run - run developer instance'
@echo 'install - developer install of searx into virtualenv'
@echo 'install - developer install of searxng into virtualenv'
@echo 'uninstall - uninstall developer installation'
@echo 'clean - clean up working tree'
@echo 'search.checker - check search engines'
@ -29,7 +29,7 @@ run: install
sleep 2 ; \
xdg-open http://127.0.0.1:8888/ ; \
) &
SEARX_DEBUG=1 ./manage pyenv.cmd python -m searx.webapp
SEARXNG_DEBUG=1 ./manage pyenv.cmd python -m searxng.webapp
PHONY += install uninstall
install uninstall:
@ -48,10 +48,10 @@ lxc.clean:
PHONY += search.checker search.checker.%
search.checker: install
$(Q)./manage pyenv.cmd searx-checker -v
$(Q)./manage pyenv.cmd searxng-checker -v
search.checker.%: install
$(Q)./manage pyenv.cmd searx-checker -v "$(subst _, ,$(patsubst search.checker.%,%,$@))"
$(Q)./manage pyenv.cmd searxng-checker -v "$(subst _, ,$(patsubst search.checker.%,%,$@))"
PHONY += test ci.test test.shell
ci.test: test.yamllint test.pep8 test.pylint test.unit test.robot
@ -66,10 +66,10 @@ test.shell:
utils/lib_install.sh \
utils/lib_static.sh \
utils/filtron.sh \
utils/searx.sh \
utils/searxng.sh \
utils/morty.sh \
utils/lxc.sh \
utils/lxc-searx.env \
utils/lxc-searxng.env \
.config.sh
$(Q)$(MTOOLS) build_msg TEST "$@ OK"

View file

@ -1,8 +1,8 @@
.. SPDX-License-Identifier: AGPL-3.0-or-later
|searx install|
|searx homepage|
|searx wiki|
|searxng install|
|searxng homepage|
|searxng wiki|
|AGPL License|
|Issues|
|commits|
@ -12,13 +12,13 @@ Privacy-respecting, hackable `metasearch engine`_
.. _metasearch engine: https://en.wikipedia.org/wiki/Metasearch_engine
.. |searx install| image:: https://img.shields.io/badge/-install-blue
.. |searxng install| image:: https://img.shields.io/badge/-install-blue
:target: https://searxng.github.io/searxng/admin/installation.html
.. |searx homepage| image:: https://img.shields.io/badge/-homepage-blue
.. |searxng homepage| image:: https://img.shields.io/badge/-homepage-blue
:target: https://searxng.github.io/searxng
.. |searx wiki| image:: https://img.shields.io/badge/-wiki-blue
.. |searxng wiki| image:: https://img.shields.io/badge/-wiki-blue
:target: https://github.com/searxng/searxng/wiki
.. |AGPL License| image:: https://img.shields.io/badge/license-AGPL-blue.svg
@ -46,7 +46,7 @@ SearXNG is a fork of `searx`_:
* `the differences with searx <https://github.com/searxng/searxng/issues/46>`_
* `exhaustive changelog <https://github.com/searxng/searxng/wiki/Changes-from-version-1.0.0>`_
.. _searx: https://github.com/searx/searx
.. _searxng: https://github.com/searxng/searxng
.. _searx.space: https://searx.space
.. _user: https://searxng.github.io/searxng/user
.. _admin: https://searxng.github.io/searxng/admin

View file

@ -17,7 +17,7 @@ Environment variables:
BIND_ADDRESS uwsgi bind to the specified TCP socket using HTTP protocol.
Default value: ${DEFAULT_BIND_ADDRESS}
Volume:
/etc/searx the docker entry point copies settings.yml and uwsgi.ini in
/etc/searxng the docker entry point copies settings.yml and uwsgi.ini in
this directory (see the -f command line option)"
EOF
@ -48,22 +48,22 @@ do
esac
done
get_searx_version(){
su searx -c \
'python3 -c "import six; import searx.version; six.print_(searx.version.VERSION_STRING)"' \
get_searxng_version(){
su searxng -c \
'python3 -c "import six; import searxng.version; six.print_(searxng.version.VERSION_STRING)"' \
2>/dev/null
}
SEARX_VERSION="$(get_searx_version)"
export SEARX_VERSION
echo "searx version ${SEARX_VERSION}"
SEARXNG_VERSION="$(get_searxng_version)"
export SEARXNG_VERSION
echo "searxng version ${SEARXNG_VERSION}"
# helpers to update the configuration files
patch_uwsgi_settings() {
CONF="$1"
}
patch_searx_settings() {
patch_searxng_settings() {
CONF="$1"
# Make sure that there is trailing slash at the end of BASE_URL
@ -114,7 +114,7 @@ update_conf() {
$PATCH_REF_CONF "${CONF}"
else
# Keep the current configuration
printf '⚠️ Check new version %s to make sure searx is working properly\n' "${NEW_CONF}"
printf '⚠️ Check new version %s to make sure searxng is working properly\n' "${NEW_CONF}"
cp "${REF_CONF}" "${NEW_CONF}"
$PATCH_REF_CONF "${NEW_CONF}"
fi
@ -129,10 +129,10 @@ update_conf() {
}
# make sure there are uwsgi settings
update_conf "${FORCE_CONF_UPDATE}" "${UWSGI_SETTINGS_PATH}" "/usr/local/searx/dockerfiles/uwsgi.ini" "patch_uwsgi_settings"
update_conf "${FORCE_CONF_UPDATE}" "${UWSGI_SETTINGS_PATH}" "/usr/local/searxng/dockerfiles/uwsgi.ini" "patch_uwsgi_settings"
# make sure there are searx settings
update_conf "${FORCE_CONF_UPDATE}" "${SEARX_SETTINGS_PATH}" "/usr/local/searx/searx/settings.yml" "patch_searx_settings"
# make sure there are searxng settings
update_conf "${FORCE_CONF_UPDATE}" "${SEARXNG_SETTINGS_PATH}" "/usr/local/searxng/searxng/settings.yml" "patch_searxng_settings"
# dry run (to update configuration files, then inspect them)
if [ $DRY_RUN -eq 1 ]; then
@ -141,9 +141,9 @@ if [ $DRY_RUN -eq 1 ]; then
fi
touch /var/run/uwsgi-logrotate
chown -R searx:searx /var/log/uwsgi /var/run/uwsgi-logrotate
chown -R searxng:searxng /var/log/uwsgi /var/run/uwsgi-logrotate
unset MORTY_KEY
# Start uwsgi
printf 'Listen on %s\n' "${BIND_ADDRESS}"
exec su-exec searx:searx uwsgi --master --http-socket "${BIND_ADDRESS}" "${UWSGI_SETTINGS_PATH}"
exec su-exec searxng:searxng uwsgi --master --http-socket "${BIND_ADDRESS}" "${UWSGI_SETTINGS_PATH}"

View file

@ -1,7 +1,7 @@
[uwsgi]
# Who will run the code
uid = searx
gid = searx
uid = searxng
gid = searxng
# Number of workers (usually CPU count)
workers = 4
@ -17,11 +17,11 @@ lazy-apps = true
enable-threads = true
# Module to import
module = searx.webapp
module = searxng.webapp
# Virtualenv and python path
pythonpath = /usr/local/searx/
chdir = /usr/local/searx/searx/
pythonpath = /usr/local/searxng/
chdir = /usr/local/searxng/searxng/
# Disable logging for privacy
disable-logging=True
@ -33,15 +33,15 @@ log-backupname = /var/log/uwsgi/uwsgi.log.1
logto = /var/log/uwsgi/uwsgi.log
# No keep alive
# See https://github.com/searx/searx-docker/issues/24
# See https://github.com/searxng/searxng-docker/issues/24
add-header = Connection: close
# uwsgi serves the static files
# expires set to one day as Flask does
static-map = /static=/usr/local/searx/searx/static
static-map = /static=/usr/local/searxng/searxng/static
static-expires = /* 864000
static-gzip-all = True
offload-threads = %k
# Cache
cache2 = name=searxcache,items=2000,blocks=2000,blocksize=4096,bitmap=1
cache2 = name=searxngcache,items=2000,blocks=2000,blocksize=4096,bitmap=1

View file

@ -1,6 +1,6 @@
[theme]
inherit = pocoo
stylesheet = searx.css
stylesheet = searxng.css
[options]
touch_icon =

View file

@ -59,7 +59,7 @@ Sample response
"shortcut": "bb"
},
],
"instance_name": "searx",
"instance_name": "searxng",
"locales": {
"de": "Deutsch (German)",
"en": "English",

View file

@ -8,26 +8,26 @@ digraph G {
filtron [label="Filtron", href="https://searxng.github.io/searxng/utils/filtron.sh.html"];
morty [label="Morty", href="https://searxng.github.io/searxng/utils/morty.sh.html"];
static [label="Static files", href="url to configure static files"];
uwsgi [label="uwsgi", href="https://searxng.github.io/searxng/utils/searx.sh.html"]
searx1 [label="Searx #1"];
searx2 [label="Searx #2"];
searx3 [label="Searx #3"];
searx4 [label="Searx #4"];
uwsgi [label="uwsgi", href="https://searxng.github.io/searxng/utils/searxng.sh.html"]
searxng1 [label="Searxng #1"];
searxng2 [label="Searxng #2"];
searxng3 [label="Searxng #3"];
searxng4 [label="Searxng #4"];
browser -> rp [label="HTTPS"]
subgraph cluster_searx {
label = "Searx instance" fontname="Sans";
subgraph cluster_searxng {
label = "Searxng instance" fontname="Sans";
bgcolor="#fafafa";
{ rank=same; static rp };
rp -> morty [label="optional: images and HTML pages proxy"];
rp -> static [label="optional: reverse proxy serves directly static files"];
rp -> filtron [label="HTTP"];
filtron -> uwsgi [label="HTTP"];
uwsgi -> searx1;
uwsgi -> searx2;
uwsgi -> searx3;
uwsgi -> searx4;
uwsgi -> searxng1;
uwsgi -> searxng2;
uwsgi -> searxng3;
uwsgi -> searxng4;
}
}

View file

@ -6,17 +6,17 @@ Architecture
.. sidebar:: Further reading
- Reverse Proxy: :ref:`Apache <apache searx site>` & :ref:`nginx <nginx searx
- Reverse Proxy: :ref:`Apache <apache searxng site>` & :ref:`nginx <nginx searxng
site>`
- Filtron: :ref:`searx filtron`
- Morty: :ref:`searx morty`
- uWSGI: :ref:`searx uwsgi`
- Searx: :ref:`installation basic`
- Filtron: :ref:`searxng filtron`
- Morty: :ref:`searxng morty`
- uWSGI: :ref:`searxng uwsgi`
- Searxng: :ref:`installation basic`
Herein you will find some hints and suggestions about typical architectures of
SearXNG infrastructures.
We start with a contribution from :pull-searx:`@dalf <1776#issuecomment-567917320>`.
We start with a contribution from :pull-searxng:`@dalf <1776#issuecomment-567917320>`.
It shows a *reference* setup for public SearXNG instances which can build up and
maintained by the scripts from our :ref:`toolboxing`.

View file

@ -15,19 +15,19 @@ Buildhosts
:backlinks: entry
To get best results from build, its recommend to install additional packages
on build hosts (see :ref:`searx.sh`).::
on build hosts (see :ref:`searxng.sh`).::
sudo -H ./utils/searx.sh install buildhost
sudo -H ./utils/searxng.sh install buildhost
This will install packages needed by searx:
This will install packages needed by searxng:
.. kernel-include:: $DOCS_BUILD/includes/searx.rst
.. kernel-include:: $DOCS_BUILD/includes/searxng.rst
:start-after: START distro-packages
:end-before: END distro-packages
and packages needed to build docuemtation and run tests:
.. kernel-include:: $DOCS_BUILD/includes/searx.rst
.. kernel-include:: $DOCS_BUILD/includes/searxng.rst
:start-after: START build-packages
:end-before: END build-packages

View file

@ -6,7 +6,7 @@ Command Line Engines
.. sidebar:: info
- :origin:`command.py <searx/engines/command.py>`
- :origin:`command.py <searxng/engines/command.py>`
- :ref:`offline engines`
With *command engines* administrators can run engines to integrate arbitrary

View file

@ -35,7 +35,7 @@ Explanation of the :ref:`general engine configuration` shown in the table
Show errors **DE**
============= =========== =================================
.. jinja:: searx
.. jinja:: searxng
.. flat-table:: Engines configured at built time (defaults)
:header-rows: 1

View file

@ -20,4 +20,4 @@ Engines & Settings
nosql-engines
search-indexer-engines
command-line-engines
searx.engines.xpath
searxng.engines.xpath

View file

@ -14,17 +14,17 @@ The following `NoSQL databases`_ are supported:
- :ref:`engine mongodb`
All of the engines above are just commented out in the :origin:`settings.yml
<searx/settings.yml>`, as you have to set various options and install
<searxng/settings.yml>`, as you have to set various options and install
dependencies before using them.
By default, the engines use the ``key-value`` template for displaying results /
see :origin:`oscar <searx/templates/oscar/result_templates/key-value.html>` &
:origin:`simple <searx/templates/simple/result_templates/key-value.html>`
see :origin:`oscar <searxng/templates/oscar/result_templates/key-value.html>` &
:origin:`simple <searxng/templates/simple/result_templates/key-value.html>`
themes. If you are not satisfied with the original result layout, you can use
your own template, set ``result_template`` attribute to ``{template_name}`` and
place the templates at::
searx/templates/{theme_name}/result_templates/{template_name}
searxng/templates/{theme_name}/result_templates/{template_name}
Futhermore, if you do not wish to expose these engines on a public instance, you
can still add them and limit the access by setting ``tokens`` as described in
@ -43,11 +43,11 @@ Extra Dependencies
For using :ref:`engine redis_server` or :ref:`engine mongodb` you need to
install additional packages in Python's Virtual Environment of your SearXNG
instance. To switch into the environment (:ref:`searx-src`) you can use
:ref:`searx.sh`::
instance. To switch into the environment (:ref:`searxng-src`) you can use
:ref:`searxng.sh`::
$ sudo utils/searx.sh shell
(searx-pyenv)$ pip install ...
$ sudo utils/searxng.sh shell
(searxng-pyenv)$ pip install ...
.. _engine redis_server:
@ -61,7 +61,7 @@ Redis Server
- ``pip install`` redis_
- redis.io_
- :origin:`redis_server.py <searx/engines/redis_server.py>`
- :origin:`redis_server.py <searxng/engines/redis_server.py>`
Redis is an open source (BSD licensed), in-memory data structure (key value
@ -98,7 +98,7 @@ MongoDB
- ``pip install`` pymongo_
- MongoDB_
- :origin:`mongodb.py <searx/engines/mongodb.py>`
- :origin:`mongodb.py <searxng/engines/mongodb.py>`
MongoDB_ is a document based database program that handles JSON like data.
Before configuring the ``mongodb`` engine, you must install the dependency

View file

@ -8,7 +8,7 @@ Recoll Engine
- `Recoll <https://www.lesbonscomptes.com/recoll/>`_
- `recoll-webui <https://framagit.org/medoc92/recollwebui.git>`_
- :origin:`searx/engines/recoll.py`
- :origin:`searxng/engines/recoll.py`
Recoll_ is a desktop full-text search tool based on Xapian. By itself Recoll_
does not offer WEB or API access, this can be achieved using recoll-webui_

View file

@ -32,7 +32,7 @@ MeiliSearch
.. sidebar:: info
- :origin:`meilisearch.py <searx/engines/meilisearch.py>`
- :origin:`meilisearch.py <searxng/engines/meilisearch.py>`
- `MeiliSearch <https://www.meilisearch.com>`_
- `MeiliSearch Documentation <https://docs.meilisearch.com/>`_
- `Install MeiliSearch
@ -65,7 +65,7 @@ Elasticsearch
.. sidebar:: info
- :origin:`elasticsearch.py <searx/engines/elasticsearch.py>`
- :origin:`elasticsearch.py <searxng/engines/elasticsearch.py>`
- `Elasticsearch <https://www.elastic.co/elasticsearch/>`_
- `Elasticsearch Guide
<https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html>`_
@ -107,7 +107,7 @@ Solr
.. sidebar:: info
- :origin:`solr.py <searx/engines/solr.py>`
- :origin:`solr.py <searxng/engines/solr.py>`
- `Solr <https://solr.apache.org>`_
- `Solr Resources <https://solr.apache.org/resources.html>`_
- `Install Solr <https://solr.apache.org/guide/installing-solr.html>`_

View file

@ -4,6 +4,6 @@
XPath Engine
============
.. automodule:: searx.engines.xpath
.. automodule:: searxng.engines.xpath
:members:

View file

@ -4,7 +4,7 @@
``settings.yml``
================
This page describe the options possibilities of the :origin:`searx/settings.yml`
This page describe the options possibilities of the :origin:`searxng/settings.yml`
file.
.. sidebar:: Further reading ..
@ -24,11 +24,11 @@ settings.yml location
The initial ``settings.yml`` we be load from these locations:
1. the full path specified in the ``SEARX_SETTINGS_PATH`` environment variable.
2. ``/etc/searx/settings.yml``
1. the full path specified in the ``SEARXNG_SETTINGS_PATH`` environment variable.
2. ``/etc/searxng/settings.yml``
If these files don't exist (or are empty or can't be read), SearXNG uses the
:origin:`searx/settings.yml` file. Read :ref:`settings use_default_settings` to
:origin:`searxng/settings.yml` file. Read :ref:`settings use_default_settings` to
see how you can simplify your *user defined* ``settings.yml``.
@ -74,7 +74,7 @@ Global Settings
instance_name: "SearXNG" # displayed name
contact_url: false # mailto:contact@example.com
``debug`` : ``$SEARX_DEBUG``
``debug`` : ``$SEARXNG_DEBUG``
Allow a more detailed log if you run SearXNG directly. Display *detailed* error
messages in the browser too, so this must be deactivated in production.
@ -94,7 +94,7 @@ Global Settings
port: 8888
bind_address: "127.0.0.1" # address to listen on
secret_key: "ultrasecretkey" # change this!
image_proxy: false # proxying image results through searx
image_proxy: false # proxying image results through searxng
default_locale: "" # default interface locale
default_theme: oscar # ui theme
default_http_headers:
@ -109,17 +109,17 @@ Global Settings
Changing a value tagged by :ref:`buildenv <make buildenv>`, needs to
rebuild instance's environment :ref:`utils/brand.env <make buildenv>`.
``base_url`` : :ref:`buildenv SEARX_URL <make buildenv>`
``base_url`` : :ref:`buildenv SEARXNG_URL <make buildenv>`
The base URL where SearXNG is deployed. Used to create correct inbound links.
If you change the value, don't forget to rebuild instance's environment
(:ref:`utils/brand.env <make buildenv>`)
``port`` & ``bind_address``: :ref:`buildenv SEARX_PORT & SEARX_BIND_ADDRESS <make buildenv>`
``port`` & ``bind_address``: :ref:`buildenv SEARXNG_PORT & SEARXNG_BIND_ADDRESS <make buildenv>`
Port number and *bind address* of the SearXNG web application if you run it
directly using ``python searx/webapp.py``. Doesn't apply to SearXNG running on
directly using ``python searxng/webapp.py``. Doesn't apply to SearXNG running on
Apache or Nginx.
``secret_key`` : ``$SEARX_SECRET``
``secret_key`` : ``$SEARXNG_SECRET``
Used for cryptography purpose.
``image_proxy`` :
@ -128,7 +128,7 @@ Global Settings
``default_locale`` :
SearXNG interface language. If blank, the locale is detected by using the
browser language. If it doesn't work, or you are deploying a language
specific instance of searx, a locale can be defined using an ISO language
specific instance of searxng, a locale can be defined using an ISO language
code, like ``fr``, ``en``, ``de``.
``default_theme`` :
@ -137,7 +137,7 @@ Global Settings
.. _HTTP headers: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers
``default_http_headers``:
Set additional HTTP headers, see `#755 <https://github.com/searx/searx/issues/715>`__
Set additional HTTP headers, see `#755 <https://github.com/searxng/searxng/issues/715>`__
``outgoing:``
-------------
@ -293,7 +293,7 @@ engine is shown. Most of the options have a default value or even are optional.
``timeout`` : optional
Timeout of the search with the current search engine. **Be careful, it will
modify the global timeout of searx.**
modify the global timeout of searxng.**
``api_key`` : optional
In a few cases, using an API needs the use of a secret key. How to obtain them
@ -339,16 +339,16 @@ use_default_settings
- :ref:`settings location`
- :ref:`use_default_settings.yml`
- :origin:`/etc/searx/settings.yml <utils/templates/etc/searx/use_default_settings.yml>`
- :origin:`/etc/searxng/settings.yml <utils/templates/etc/searxng/use_default_settings.yml>`
The user defined ``settings.yml`` is loaded from the :ref:`settings location`
and can relied on the default configuration :origin:`searx/settings.yml` using:
and can relied on the default configuration :origin:`searxng/settings.yml` using:
``use_default_settings: true``
``server:``
In the following example, the actual settings are the default settings defined
in :origin:`searx/settings.yml` with the exception of the ``secret_key`` and
in :origin:`searxng/settings.yml` with the exception of the ``secret_key`` and
the ``bind_address``:
.. code-block:: yaml

View file

@ -18,7 +18,7 @@ Relational Database Management System (RDBMS) are supported:
- :ref:`engine mysql_server`
All of the engines above are just commented out in the :origin:`settings.yml
<searx/settings.yml>`, as you have to set the required attributes for the
<searxng/settings.yml>`, as you have to set the required attributes for the
engines, e.g. ``database:`` ...
.. code:: yaml
@ -30,13 +30,13 @@ engines, e.g. ``database:`` ...
query_str: ...
By default, the engines use the ``key-value`` template for displaying results /
see :origin:`oscar <searx/templates/oscar/result_templates/key-value.html>` &
:origin:`simple <searx/templates/simple/result_templates/key-value.html>`
see :origin:`oscar <searxng/templates/oscar/result_templates/key-value.html>` &
:origin:`simple <searxng/templates/simple/result_templates/key-value.html>`
themes. If you are not satisfied with the original result layout, you can use
your own template, set ``result_template`` attribute to ``{template_name}`` and
place the templates at::
searx/templates/{theme_name}/result_templates/{template_name}
searxng/templates/{theme_name}/result_templates/{template_name}
If you do not wish to expose these engines on a public instance, you can still
add them and limit the access by setting ``tokens`` as described in section
@ -63,7 +63,7 @@ SQLite
.. sidebar:: info
- :origin:`sqlite.py <searx/engines/sqlite.py>`
- :origin:`sqlite.py <searxng/engines/sqlite.py>`
.. _MediathekView: https://mediathekview.de/
@ -74,7 +74,7 @@ this example of the SQlite engine download the database:
- https://liste.mediathekview.de/filmliste-v2.db.bz2
and unpack into ``searx/data/filmliste-v2.db``. To search the database use e.g
and unpack into ``searxng/data/filmliste-v2.db``. To search the database use e.g
Query to test: ``!mediathekview concert``
.. code:: yaml
@ -84,7 +84,7 @@ Query to test: ``!mediathekview concert``
disabled: False
categories: general
result_template: default.html
database: searx/data/filmliste-v2.db
database: searxng/data/filmliste-v2.db
query_str: >-
SELECT title || ' (' || time(duration, 'unixepoch') || ')' AS title,
COALESCE( NULLIF(url_video_hd,''), NULLIF(url_video_sd,''), url_video) AS url,
@ -99,11 +99,11 @@ Extra Dependencies
For using :ref:`engine postgresql` or :ref:`engine mysql_server` you need to
install additional packages in Python's Virtual Environment of your SearXNG
instance. To switch into the environment (:ref:`searx-src`) you can use
:ref:`searx.sh`::
instance. To switch into the environment (:ref:`searxng-src`) you can use
:ref:`searxng.sh`::
$ sudo utils/searx.sh shell
(searx-pyenv)$ pip install ...
$ sudo utils/searxng.sh shell
(searxng-pyenv)$ pip install ...
.. _engine postgresql:
@ -115,7 +115,7 @@ PostgreSQL
.. sidebar:: info
- :origin:`postgresql.py <searx/engines/postgresql.py>`
- :origin:`postgresql.py <searxng/engines/postgresql.py>`
- ``pip install`` psycopg2_
PostgreSQL is a powerful and robust open source database. Before configuring
@ -127,7 +127,7 @@ find an example configuration below:
- name: my_database
engine: postgresql
database: my_database
username: searx
username: searxng
password: password
query_str: 'SELECT * from my_table WHERE my_column = %(query)s'
@ -140,7 +140,7 @@ MySQL
.. sidebar:: info
- :origin:`mysql_server.py <searx/engines/mysql_server.py>`
- :origin:`mysql_server.py <searxng/engines/mysql_server.py>`
- ``pip install`` mysql-connector-python_
MySQL is said to be the most popular open source database. Before enabling MySQL
@ -155,7 +155,7 @@ example configuration for quering a MySQL server:
- name: my_database
engine: mysql_server
database: my_database
username: searx
username: searxng
password: password
limit: 5
query_str: 'SELECT * from my_table WHERE my_column=%(query)s'

View file

@ -1,5 +1,5 @@
.. _searx filtron:
.. _searxng filtron:
==========================
How to protect an instance
@ -8,7 +8,7 @@ How to protect an instance
.. sidebar:: further reading
- :ref:`filtron.sh`
- :ref:`nginx searx site`
- :ref:`nginx searxng site`
.. contents:: Contents
@ -19,10 +19,10 @@ How to protect an instance
.. _filtron: https://github.com/asciimoo/filtron
SearXNG depends on external search services. To avoid the abuse of these services
it is advised to limit the number of requests processed by searx.
it is advised to limit the number of requests processed by searxng.
An application firewall, filtron_ solves exactly this problem. Filtron is just
a middleware between your web server (nginx, apache, ...) and searx, we describe
a middleware between your web server (nginx, apache, ...) and searxng, we describe
such infratructures in chapter: :ref:`architecture`.
@ -168,9 +168,9 @@ Use it along with ``nginx`` with the following example configuration.
.. code:: nginx
# https://example.org/searx
# https://example.org/searxng
location /searx {
location /searxng {
proxy_pass http://127.0.0.1:4004/;
proxy_set_header Host $host;
@ -178,14 +178,14 @@ Use it along with ``nginx`` with the following example configuration.
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Scheme $scheme;
proxy_set_header X-Script-Name /searx;
proxy_set_header X-Script-Name /searxng;
}
location /searx/static {
/usr/local/searx/searx-src/searx/static;
location /searxng/static {
/usr/local/searxng/searxng-src/searxng/static;
}
Requests are coming from port 4004 going through filtron and then forwarded to
port 8888 where a SearXNG is being run. For a complete setup see: :ref:`nginx
searx site`.
searxng site`.

View file

@ -7,12 +7,12 @@ Administrator documentation
:caption: Contents
installation
installation-searx
installation-searxng
installation-uwsgi
installation-nginx
installation-apache
installation-docker
update-searx
update-searxng
engines/index
api
architecture

View file

@ -47,13 +47,13 @@ Install with apache
----
**Install** :ref:`apache searx site` using :ref:`filtron.sh <filtron.sh overview>`
**Install** :ref:`apache searxng site` using :ref:`filtron.sh <filtron.sh overview>`
.. code:: bash
$ sudo -H ./utils/filtron.sh apache install
**Install** :ref:`apache searx site` using :ref:`morty.sh <morty.sh overview>`
**Install** :ref:`apache searxng site` using :ref:`morty.sh <morty.sh overview>`
.. code:: bash
@ -163,7 +163,7 @@ How this default intro site is configured, depends on the linux distribution
less /etc/httpd/conf.d/welcome.conf
.. _apache searx site:
.. _apache searxng site:
Apache Reverse Proxy
====================
@ -192,14 +192,14 @@ except in :ref:`The Debian Layout`.
sudo -H a2enmod proxy
sudo -H a2enmod proxy_http
In :ref:`The Debian Layout` you create a ``searx.conf`` with the
``<Location /searx >`` directive and save this file in the *sites
In :ref:`The Debian Layout` you create a ``searxng.conf`` with the
``<Location /searxng >`` directive and save this file in the *sites
available* folder at ``/etc/apache2/sites-available``. To enable the
``searx.conf`` use :man:`a2ensite`:
``searxng.conf`` use :man:`a2ensite`:
.. code:: sh
sudo -H a2ensite searx.conf
sudo -H a2ensite searxng.conf
.. group-tab:: Arch Linux
@ -230,7 +230,7 @@ except in :ref:`The Debian Layout`.
With ProxyPreserveHost_ the incoming Host HTTP request header is passed to the
proxied host.
.. _apache searx via filtron plus morty:
.. _apache searxng via filtron plus morty:
.. tabs::
@ -244,9 +244,9 @@ proxied host.
.. code:: apache
<Location /searx >
<Location /searxng >
# SetEnvIf Request_URI "/searx" dontlog
# SetEnvIf Request_URI "/searxng" dontlog
# CustomLog /dev/null combined env=dontlog
Require all granted
@ -258,11 +258,11 @@ proxied host.
ProxyPreserveHost On
ProxyPass http://127.0.0.1:4004
RequestHeader set X-Script-Name /searx
RequestHeader set X-Script-Name /searxng
</Location>
2. Configure reverse proxy for :ref:`morty <searx morty>`, listening on
2. Configure reverse proxy for :ref:`morty <searxng morty>`, listening on
*localhost 3000*
.. code:: apache
@ -286,8 +286,8 @@ proxied host.
</Location>
For a fully result proxification add :ref:`morty's <searx morty>` **public
URL** to your :origin:`searx/settings.yml`:
For a fully result proxification add :ref:`morty's <searxng morty>` **public
URL** to your :origin:`searxng/settings.yml`:
.. code:: yaml
@ -302,10 +302,10 @@ proxied host.
uWSGI support
=============
Be warned, with this setup, your instance isn't :ref:`protected <searx
Be warned, with this setup, your instance isn't :ref:`protected <searxng
filtron>`, nevertheless it is good enough for intranet usage. In modern Linux
distributions, the `mod_proxy_uwsgi`_ is compiled into the *normal* apache
package and you need to install only the :ref:`uWSGI <searx uwsgi>` package:
package and you need to install only the :ref:`uWSGI <searxng uwsgi>` package:
.. tabs::
@ -334,15 +334,15 @@ The next example shows a configuration using the `uWSGI Apache support`_ via
unix sockets and `mod_proxy_uwsgi`_.
For socket communication, you have to activate ``socket =
/run/uwsgi/app/searx/socket`` and comment out the ``http = 127.0.0.1:8888``
/run/uwsgi/app/searxng/socket`` and comment out the ``http = 127.0.0.1:8888``
configuration in your :ref:`uwsgi ini file <uwsgi configuration>`. If not
already exists, create a folder for the unix sockets, which can be used by the
searx account (see :ref:`create searx user`):
searxng account (see :ref:`create searxng user`):
.. code:: bash
sudo -H mkdir -p /run/uwsgi/app/searx/
sudo -H chown -R searx:searx /run/uwsgi/app/searx/
sudo -H mkdir -p /run/uwsgi/app/searxng/
sudo -H chown -R searxng:searxng /run/uwsgi/app/searxng/
If the server is public; to limit access to your intranet replace ``Allow from
all`` directive and replace ``192.168.0.0/16`` with your subnet IP/class.
@ -357,10 +357,10 @@ all`` directive and replace ``192.168.0.0/16`` with your subnet IP/class.
LoadModule proxy_module /usr/lib/apache2/modules/mod_proxy.so
LoadModule proxy_uwsgi_module /usr/lib/apache2/modules/mod_proxy_uwsgi.so
# SetEnvIf Request_URI /searx dontlog
# SetEnvIf Request_URI /searxng dontlog
# CustomLog /dev/null combined env=dontlog
<Location /searx>
<Location /searxng>
Require all granted
Order deny,allow
@ -369,7 +369,7 @@ all`` directive and replace ``192.168.0.0/16`` with your subnet IP/class.
Allow from all
ProxyPreserveHost On
ProxyPass unix:/run/uwsgi/app/searx/socket|uwsgi://uwsgi-uds-searx/
ProxyPass unix:/run/uwsgi/app/searxng/socket|uwsgi://uwsgi-uds-searxng/
</Location>
@ -382,10 +382,10 @@ all`` directive and replace ``192.168.0.0/16`` with your subnet IP/class.
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_uwsgi_module modules/mod_proxy_uwsgi.so
# SetEnvIf Request_URI /searx dontlog
# SetEnvIf Request_URI /searxng dontlog
# CustomLog /dev/null combined env=dontlog
<Location /searx>
<Location /searxng>
Require all granted
Order deny,allow
@ -394,7 +394,7 @@ all`` directive and replace ``192.168.0.0/16`` with your subnet IP/class.
Allow from all
ProxyPreserveHost On
ProxyPass unix:/run/uwsgi/app/searx/socket|uwsgi://uwsgi-uds-searx/
ProxyPass unix:/run/uwsgi/app/searxng/socket|uwsgi://uwsgi-uds-searxng/
</Location>
@ -408,10 +408,10 @@ all`` directive and replace ``192.168.0.0/16`` with your subnet IP/class.
LoadModule proxy_uwsgi_module modules/mod_proxy_uwsgi.so
<IfModule proxy_uwsgi_module>
# SetEnvIf Request_URI /searx dontlog
# SetEnvIf Request_URI /searxng dontlog
# CustomLog /dev/null combined env=dontlog
<Location /searx>
<Location /searxng>
Require all granted
Order deny,allow
@ -420,7 +420,7 @@ all`` directive and replace ``192.168.0.0/16`` with your subnet IP/class.
Allow from all
ProxyPreserveHost On
ProxyPass unix:/run/uwsgi/app/searx/socket|uwsgi://uwsgi-uds-searx/
ProxyPass unix:/run/uwsgi/app/searxng/socket|uwsgi://uwsgi-uds-searxng/
</Location>
@ -436,16 +436,16 @@ all`` directive and replace ``192.168.0.0/16`` with your subnet IP/class.
<IfModule mod_uwsgi.c>
# SetEnvIf Request_URI "/searx" dontlog
# SetEnvIf Request_URI "/searxng" dontlog
# CustomLog /dev/null combined env=dontlog
<Location /searx >
<Location /searxng >
Require all granted
Options FollowSymLinks Indexes
SetHandler uwsgi-handler
uWSGISocket /run/uwsgi/app/searx/socket
uWSGISocket /run/uwsgi/app/searxng/socket
Order deny,allow
Deny from all
@ -468,21 +468,21 @@ Restart service
.. code:: sh
sudo -H systemctl restart apache2
sudo -H service uwsgi restart searx
sudo -H service uwsgi restart searxng
.. group-tab:: Arch Linux
.. code:: sh
sudo -H systemctl restart httpd
sudo -H systemctl restart uwsgi@searx
sudo -H systemctl restart uwsgi@searxng
.. group-tab:: Fedora / RHEL
.. code:: sh
sudo -H systemctl restart httpd
sudo -H touch /etc/uwsgi.d/searx.ini
sudo -H touch /etc/uwsgi.d/searxng.ini
disable logs
@ -492,11 +492,11 @@ For better privacy you can disable Apache logs. In the examples above activate
one of the lines and `restart apache`_::
# SetEnvIf Request_URI "/searx" dontlog
# SetEnvIf Request_URI "/searxng" dontlog
# CustomLog /dev/null combined env=dontlog
The ``CustomLog`` directive disable logs for the whole (virtual) server, use it
when the URL of the service does not have a path component (``/searx``) / is
when the URL of the service does not have a path component (``/searxng``) / is
located at root (``/``).
.. _The Debian Layout:

View file

@ -25,8 +25,8 @@ Docker installation
If you intend to create a public instance using Docker, use our well
maintained searxng-docker_ image which includes
- :ref:`protection <searx filtron>` `[filtron]`_,
- a :ref:`result proxy <searx morty>` `[morty]`_ and
- :ref:`protection <searxng filtron>` `[filtron]`_,
- a :ref:`result proxy <searxng morty>` `[morty]`_ and
- a HTTPS reverse proxy `[caddy]`_.
Make sure you have `installed Docker <https://docs.docker.com/get-docker/>`_ and
@ -63,7 +63,7 @@ instance using `docker run <https://docs.docker.com/engine/reference/run/>`_:
$ docker pull searxng/searxng
$ docker run --rm \
-d -p ${PORT}:8080 \
-v "${PWD}/searx:/etc/searx" \
-v "${PWD}/searxng:/etc/searxng" \
-e "BASE_URL=http://localhost:$PORT/" \
-e "INSTANCE_NAME=my-instance" \
searxng/searxng
@ -75,7 +75,7 @@ Open your WEB browser and visit the URL:
$ xdg-open "http://localhost:$PORT"
Inside ``${PWD}/searx``, you will find ``settings.yml`` and ``uwsgi.ini``. You
Inside ``${PWD}/searxng``, you will find ``settings.yml`` and ``uwsgi.ini``. You
can modify these files according to your needs and restart the Docker image.
.. code:: sh
@ -139,7 +139,7 @@ Build the image
It's also possible to build SearXNG from the embedded :origin:`Dockerfile`::
$ git clone https://github.com/searxng/searxng.git
$ cd searx
$ cd searxng
$ make docker.build
...
Successfully built 49586c016434

View file

@ -34,13 +34,13 @@ Install with nginx
----
**Install** :ref:`nginx searx site` using :ref:`filtron.sh <filtron.sh overview>`
**Install** :ref:`nginx searxng site` using :ref:`filtron.sh <filtron.sh overview>`
.. code:: bash
$ sudo -H ./utils/filtron.sh nginx install
**Install** :ref:`nginx searx site` using :ref:`morty.sh <morty.sh overview>`
**Install** :ref:`nginx searxng site` using :ref:`morty.sh <morty.sh overview>`
.. code:: bash
@ -126,7 +126,7 @@ depends on the linux distribution:
include /etc/nginx/conf.d/*.conf;
.. _nginx searx site:
.. _nginx searxng site:
A nginx SearXNG site
====================
@ -146,12 +146,12 @@ Started wiki`_ is always a good resource *to keep in the pocket*.
.. group-tab:: Ubuntu / debian
Create configuration at ``/etc/nginx/sites-available/searx`` and place a
Create configuration at ``/etc/nginx/sites-available/searxng`` and place a
symlink to sites-enabled:
.. code:: sh
sudo -H ln -s /etc/nginx/sites-available/searx /etc/nginx/sites-enabled/searx
sudo -H ln -s /etc/nginx/sites-available/searxng /etc/nginx/sites-enabled/searxng
.. group-tab:: Arch Linux
@ -160,10 +160,10 @@ Started wiki`_ is always a good resource *to keep in the pocket*.
.. group-tab:: Fedora / RHEL
Create configuration at ``/etc/nginx/conf.d/searx`` and place a
Create configuration at ``/etc/nginx/conf.d/searxng`` and place a
symlink to sites-enabled:
.. _nginx searx via filtron plus morty:
.. _nginx searxng via filtron plus morty:
.. tabs::
@ -177,9 +177,9 @@ Started wiki`_ is always a good resource *to keep in the pocket*.
.. code:: nginx
# https://example.org/searx
# https://example.org/searxng
location /searx {
location /searxng {
proxy_pass http://127.0.0.1:4004/;
proxy_set_header Host $host;
@ -187,15 +187,15 @@ Started wiki`_ is always a good resource *to keep in the pocket*.
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Scheme $scheme;
proxy_set_header X-Script-Name /searx;
proxy_set_header X-Script-Name /searxng;
}
location /searx/static/ {
alias /usr/local/searx/searx-src/searx/static/;
location /searxng/static/ {
alias /usr/local/searxng/searxng-src/searxng/static/;
}
2. Configure reverse proxy for :ref:`morty <searx morty>`, listening on
2. Configure reverse proxy for :ref:`morty <searxng morty>`, listening on
*localhost 3000*:
.. code:: nginx
@ -212,8 +212,8 @@ Started wiki`_ is always a good resource *to keep in the pocket*.
proxy_set_header X-Scheme $scheme;
}
For a fully result proxification add :ref:`morty's <searx morty>` **public
URL** to your :origin:`searx/settings.yml`:
For a fully result proxification add :ref:`morty's <searxng morty>` **public
URL** to your :origin:`searxng/settings.yml`:
.. code:: yaml
@ -228,10 +228,10 @@ Started wiki`_ is always a good resource *to keep in the pocket*.
.. group-tab:: proxy or uWSGI
Be warned, with this setup, your instance isn't :ref:`protected <searx
Be warned, with this setup, your instance isn't :ref:`protected <searxng
filtron>`. Nevertheless it is good enough for intranet usage and it is a
excellent example of; *how different services can be set up*. The next
example shows a reverse proxy configuration wrapping the :ref:`searx-uWSGI
example shows a reverse proxy configuration wrapping the :ref:`searxng-uWSGI
application <uwsgi configuration>`, listening on ``http =
127.0.0.1:8888``.
@ -251,7 +251,7 @@ Started wiki`_ is always a good resource *to keep in the pocket*.
Alternatively you can use the `uWSGI support from nginx`_ via unix
sockets. For socket communication, you have to activate ``socket =
/run/uwsgi/app/searx/socket`` and comment out the ``http =
/run/uwsgi/app/searxng/socket`` and comment out the ``http =
127.0.0.1:8888`` configuration in your :ref:`uwsgi ini file <uwsgi
configuration>`.
@ -259,8 +259,8 @@ Started wiki`_ is always a good resource *to keep in the pocket*.
port 80 (IPv4 and IPv6 http://[::]:80). The uWSGI app is configured at
location ``/`` by importing the `uwsgi_params`_ and passing requests to
the uWSGI socket (``uwsgi_pass``). The ``server``\'s root points to the
:ref:`searx-src clone <searx-src>` and wraps directly the
:origin:`searx/static/` content at ``location /static``.
:ref:`searxng-src clone <searxng-src>` and wraps directly the
:origin:`searxng/static/` content at ``location /static``.
.. code:: nginx
@ -273,73 +273,73 @@ Started wiki`_ is always a good resource *to keep in the pocket*.
location / {
include uwsgi_params;
uwsgi_pass unix:/run/uwsgi/app/searx/socket;
uwsgi_pass unix:/run/uwsgi/app/searxng/socket;
}
root /usr/local/searx/searx-src/searx;
root /usr/local/searxng/searxng-src/searxng;
location /static { }
}
If not already exists, create a folder for the unix sockets, which can be
used by the searx account:
used by the searxng account:
.. code:: bash
mkdir -p /run/uwsgi/app/searx/
sudo -H chown -R searx:searx /run/uwsgi/app/searx/
mkdir -p /run/uwsgi/app/searxng/
sudo -H chown -R searxng:searxng /run/uwsgi/app/searxng/
.. group-tab:: \.\. at subdir URL
Be warned, with these setups, your instance isn't :ref:`protected <searx
Be warned, with these setups, your instance isn't :ref:`protected <searxng
filtron>`. The examples are just here to demonstrate how to export the
SearXNG application from a subdirectory URL ``https://example.org/searx/``.
SearXNG application from a subdirectory URL ``https://example.org/searxng/``.
.. code:: nginx
# https://hostname.local/searx
# https://hostname.local/searxng
location /searx {
location /searxng {
proxy_pass http://127.0.0.1:8888;
proxy_set_header Host $host;
proxy_set_header Connection $http_connection;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Scheme $scheme;
proxy_set_header X-Script-Name /searx;
proxy_set_header X-Script-Name /searxng;
proxy_buffering off;
}
location /searx/static/ {
alias /usr/local/searx/searx-src/searx/static/;
location /searxng/static/ {
alias /usr/local/searxng/searxng-src/searxng/static/;
}
The ``X-Script-Name /searx`` is needed by the SearXNG implementation to
The ``X-Script-Name /searxng`` is needed by the SearXNG implementation to
calculate relative URLs correct. The next example shows a uWSGI
configuration. Since there are no HTTP headers in a (u)WSGI protocol, the
value is shipped via the SCRIPT_NAME_ in the WSGI environment.
.. code:: nginx
# https://hostname.local/searx
# https://hostname.local/searxng
location /searx {
uwsgi_param SCRIPT_NAME /searx;
location /searxng {
uwsgi_param SCRIPT_NAME /searxng;
include uwsgi_params;
uwsgi_pass unix:/run/uwsgi/app/searx/socket;
uwsgi_pass unix:/run/uwsgi/app/searxng/socket;
}
location /searx/static/ {
alias /usr/local/searx/searx-src/searx/;
location /searxng/static/ {
alias /usr/local/searxng/searxng-src/searxng/;
}
For SearXNG to work correctly the ``base_url`` must be set in the
:origin:`searx/settings.yml`.
:origin:`searxng/settings.yml`.
.. code:: yaml
server:
# replace example.org with your server's public name
base_url : https://example.org/searx/
base_url : https://example.org/searxng/
Restart service:
@ -351,21 +351,21 @@ Restart service:
.. code:: sh
sudo -H systemctl restart nginx
sudo -H service uwsgi restart searx
sudo -H service uwsgi restart searxng
.. group-tab:: Arch Linux
.. code:: sh
sudo -H systemctl restart nginx
sudo -H systemctl restart uwsgi@searx
sudo -H systemctl restart uwsgi@searxng
.. group-tab:: Fedora
.. code:: sh
sudo -H systemctl restart nginx
sudo -H touch /etc/uwsgi.d/searx.ini
sudo -H touch /etc/uwsgi.d/searxng.ini
Disable logs

View file

@ -17,51 +17,51 @@ universe repository.
Install packages
================
.. kernel-include:: $DOCS_BUILD/includes/searx.rst
.. kernel-include:: $DOCS_BUILD/includes/searxng.rst
:start-after: START distro-packages
:end-before: END distro-packages
.. hint::
This installs also the packages needed by :ref:`searx uwsgi`
This installs also the packages needed by :ref:`searxng uwsgi`
.. _create searx user:
.. _create searxng user:
Create user
===========
.. kernel-include:: $DOCS_BUILD/includes/searx.rst
.. kernel-include:: $DOCS_BUILD/includes/searxng.rst
:start-after: START create user
:end-before: END create user
.. _searx-src:
.. _searxng-src:
Install SearXNG & dependencies
==============================
Start a interactive shell from new created user and clone searx:
Start a interactive shell from new created user and clone searxng:
.. kernel-include:: $DOCS_BUILD/includes/searx.rst
:start-after: START clone searx
:end-before: END clone searx
.. kernel-include:: $DOCS_BUILD/includes/searxng.rst
:start-after: START clone searxng
:end-before: END clone searxng
In the same shell create *virtualenv*:
.. kernel-include:: $DOCS_BUILD/includes/searx.rst
.. kernel-include:: $DOCS_BUILD/includes/searxng.rst
:start-after: START create virtualenv
:end-before: END create virtualenv
To install searx's dependencies, exit the SearXNG *bash* session you opened above
To install searxng's dependencies, exit the SearXNG *bash* session you opened above
and restart a new. Before install, first check if your *virtualenv* was sourced
from the login (*~/.profile*):
.. kernel-include:: $DOCS_BUILD/includes/searx.rst
.. kernel-include:: $DOCS_BUILD/includes/searxng.rst
:start-after: START manage.sh update_packages
:end-before: END manage.sh update_packages
.. tip::
Open a second terminal for the configuration tasks and leave the ``(searx)$``
Open a second terminal for the configuration tasks and leave the ``(searxng)$``
terminal open for the tasks below.
@ -75,31 +75,31 @@ Configuration
- :ref:`settings global`
- :ref:`settings location`
- :ref:`settings use_default_settings`
- :origin:`/etc/searx/settings.yml <utils/templates/etc/searx/use_default_settings.yml>`
- :origin:`/etc/searxng/settings.yml <utils/templates/etc/searxng/use_default_settings.yml>`
To create a initial ``/etc/searx/settings.yml`` you can start with a copy of the
file :origin:`utils/templates/etc/searx/use_default_settings.yml`. This setup
To create a initial ``/etc/searxng/settings.yml`` you can start with a copy of the
file :origin:`utils/templates/etc/searxng/use_default_settings.yml`. This setup
:ref:`use default settings <settings use_default_settings>` from
:origin:`searx/settings.yml` and is recommended since :pull-searx:`2291` is merged.
:origin:`searxng/settings.yml` and is recommended since :pull-searxng:`2291` is merged.
For a *minimal setup*, configure like shown below replace ``searx@$(uname
For a *minimal setup*, configure like shown below replace ``searxng@$(uname
-n)`` with a name of your choice, set ``ultrasecretkey`` -- *and/or* edit
``/etc/searx/settings.yml`` to your needs.
``/etc/searxng/settings.yml`` to your needs.
.. kernel-include:: $DOCS_BUILD/includes/searx.rst
:start-after: START searx config
:end-before: END searx config
.. kernel-include:: $DOCS_BUILD/includes/searxng.rst
:start-after: START searxng config
:end-before: END searxng config
.. tabs::
.. group-tab:: Use default settings
.. literalinclude:: ../../utils/templates/etc/searx/settings.yml
.. literalinclude:: ../../utils/templates/etc/searxng/settings.yml
:language: yaml
.. group-tab:: searx/settings.yml
.. group-tab:: searxng/settings.yml
.. literalinclude:: ../../searx/settings.yml
.. literalinclude:: ../../searxng/settings.yml
:language: yaml
@ -107,12 +107,12 @@ Check
=====
To check your SearXNG setup, optional enable debugging and start the *webapp*.
SearXNG looks at the exported environment ``$SEARX_SETTINGS_PATH`` for a
SearXNG looks at the exported environment ``$SEARXNG_SETTINGS_PATH`` for a
configuration file.
.. kernel-include:: $DOCS_BUILD/includes/searx.rst
:start-after: START check searx installation
:end-before: END check searx installation
.. kernel-include:: $DOCS_BUILD/includes/searxng.rst
:start-after: START check searxng installation
:end-before: END check searxng installation
If everything works fine, hit ``[CTRL-C]`` to stop the *webapp* and disable the
debug option in ``settings.yml``. You can now exit SearXNG user bash (enter exit

View file

@ -1,4 +1,4 @@
.. _searx uwsgi:
.. _searxng uwsgi:
=====
uwsgi
@ -35,17 +35,17 @@ recommend two methods
`systemd.unit`_ template files as described here `One service per app in systemd`_.
There is one `systemd unit template`_ and one `uwsgi ini file`_ per uWSGI-app
placed at dedicated locations. Take archlinux and a searx.ini as example::
placed at dedicated locations. Take archlinux and a searxng.ini as example::
unit template --> /usr/lib/systemd/system/uwsgi@.service
uwsgi ini files --> /etc/uwsgi/searx.ini
uwsgi ini files --> /etc/uwsgi/searxng.ini
The SearXNG app can be maintained as know from common systemd units::
systemctl enable uwsgi@searx
systemctl start uwsgi@searx
systemctl restart uwsgi@searx
systemctl stop uwsgi@searx
systemctl enable uwsgi@searxng
systemctl start uwsgi@searxng
systemctl restart uwsgi@searxng
systemctl stop uwsgi@searxng
The `uWSGI Emperor`_ mode which fits for maintaining a large range of uwsgi apps.
@ -54,12 +54,12 @@ The `uWSGI Emperor`_ mode which fits for maintaining a large range of uwsgi apps
systemd unit. The Emperor service will scan specific directories for `uwsgi
ini file`_\s (also know as *vassals*). If a *vassal* is added, removed or the
timestamp is modified, a corresponding action takes place: a new uWSGI
instance is started, reload or stopped. Take Fedora and a searx.ini as
instance is started, reload or stopped. Take Fedora and a searxng.ini as
example::
to start a new SearXNG instance create --> /etc/uwsgi.d/searx.ini
to reload the instance edit timestamp --> touch /etc/uwsgi.d/searx.ini
to stop instance remove ini --> rm /etc/uwsgi.d/searx.ini
to start a new SearXNG instance create --> /etc/uwsgi.d/searxng.ini
to reload the instance edit timestamp --> touch /etc/uwsgi.d/searxng.ini
to stop instance remove ini --> rm /etc/uwsgi.d/searxng.ini
Distributors
============
@ -80,15 +80,15 @@ do similar for the uWSGI infrastructure (with less comfort), the folders are::
The `uwsgi ini file`_ is enabled by a symbolic link::
ln -s /etc/uwsgi/apps-available/searx.ini /etc/uwsgi/apps-enabled/
ln -s /etc/uwsgi/apps-available/searxng.ini /etc/uwsgi/apps-enabled/
From debian's documentation (``/usr/share/doc/uwsgi/README.Debian.gz``): You
could control specific instance(s) by issuing::
service uwsgi <command> <confname> <confname> ...
sudo -H service uwsgi start searx
sudo -H service uwsgi stop searx
sudo -H service uwsgi start searxng
sudo -H service uwsgi stop searxng
My experience is, that this command is a bit buggy.
@ -104,47 +104,47 @@ restart the uwsgi application.
.. group-tab:: Ubuntu / debian
.. kernel-include:: $DOCS_BUILD/includes/searx.rst
:start-after: START searx uwsgi-description ubuntu-20.04
:end-before: END searx uwsgi-description ubuntu-20.04
.. kernel-include:: $DOCS_BUILD/includes/searxng.rst
:start-after: START searxng uwsgi-description ubuntu-20.04
:end-before: END searxng uwsgi-description ubuntu-20.04
.. hotfix: a bug group-tab need this comment
.. group-tab:: Arch Linux
.. kernel-include:: $DOCS_BUILD/includes/searx.rst
:start-after: START searx uwsgi-description arch
:end-before: END searx uwsgi-description arch
.. kernel-include:: $DOCS_BUILD/includes/searxng.rst
:start-after: START searxng uwsgi-description arch
:end-before: END searxng uwsgi-description arch
.. hotfix: a bug group-tab need this comment
.. group-tab:: Fedora / RHEL
.. kernel-include:: $DOCS_BUILD/includes/searx.rst
:start-after: START searx uwsgi-description fedora
:end-before: END searx uwsgi-description fedora
.. kernel-include:: $DOCS_BUILD/includes/searxng.rst
:start-after: START searxng uwsgi-description fedora
:end-before: END searxng uwsgi-description fedora
.. tabs::
.. group-tab:: Ubuntu / debian
.. kernel-include:: $DOCS_BUILD/includes/searx.rst
:start-after: START searx uwsgi-appini ubuntu-20.04
:end-before: END searx uwsgi-appini ubuntu-20.04
.. kernel-include:: $DOCS_BUILD/includes/searxng.rst
:start-after: START searxng uwsgi-appini ubuntu-20.04
:end-before: END searxng uwsgi-appini ubuntu-20.04
.. hotfix: a bug group-tab need this comment
.. group-tab:: Arch Linux
.. kernel-include:: $DOCS_BUILD/includes/searx.rst
:start-after: START searx uwsgi-appini arch
:end-before: END searx uwsgi-appini arch
.. kernel-include:: $DOCS_BUILD/includes/searxng.rst
:start-after: START searxng uwsgi-appini arch
:end-before: END searxng uwsgi-appini arch
.. hotfix: a bug group-tab need this comment
.. group-tab:: Fedora / RHEL
.. kernel-include:: $DOCS_BUILD/includes/searx.rst
:start-after: START searx uwsgi-appini fedora
:end-before: END searx uwsgi-appini fedora
.. kernel-include:: $DOCS_BUILD/includes/searxng.rst
:start-after: START searxng uwsgi-appini fedora
:end-before: END searxng uwsgi-appini fedora

View file

@ -27,7 +27,7 @@ Installation scripts
.. sidebar:: Update OS first!
To avoid unwanted side effects, update your OS before installing searx.
To avoid unwanted side effects, update your OS before installing searxng.
The following will install a setup as shown in :ref:`architecture`. First you
need to get a clone. The clone is only needed for the installation procedure
@ -35,29 +35,29 @@ and some maintenance tasks (alternatively you can create your own fork).
For the installation procedure, use a *sudoer* login to run the scripts. If you
install from ``root``, take into account that the scripts are creating a
``searx``, a ``filtron`` and a ``morty`` user. In the installation procedure
these new created users do need read access to the clone of searx, which is not
``searxng``, a ``filtron`` and a ``morty`` user. In the installation procedure
these new created users do need read access to the clone of searxng, which is not
the case if you clone into a folder below ``/root``.
.. code:: bash
$ cd ~/Downloads
$ git clone https://github.com/searxng/searxng.git searx
$ cd searx
$ git clone https://github.com/searxng/searxng.git searxng
$ cd searxng
.. sidebar:: further read
- :ref:`toolboxing`
- :ref:`update searx`
- :ref:`inspect searx`
- :ref:`update searxng`
- :ref:`inspect searxng`
**Install** :ref:`SearXNG service <searx.sh>`
**Install** :ref:`SearXNG service <searxng.sh>`
This installs SearXNG as described in :ref:`installation basic`.
.. code:: bash
$ sudo -H ./utils/searx.sh install all
$ sudo -H ./utils/searxng.sh install all
**Install** :ref:`filtron reverse proxy <filtron.sh>`
@ -86,12 +86,12 @@ install the SearXNG plugins from **The Green Web Foundation** `[ref]
.. code:: bash
$ sudo -H ./utils/searx.sh shell
$ sudo -H ./utils/searxng.sh shell
// exit with [CTRL-D]
(searx-pyenv) searx@ryzen:~$ pip install git+https://github.com/return42/tgwf-searx-plugins
(searxng-pyenv) searxng@ryzen:~$ pip install git+https://github.com/return42/tgwf-searx-plugins
In the :ref:`settings.yml` activate the ``plugins:`` section and add module
``only_show_green_results`` from tgwf-searx-plugins.
``only_show_green_results`` from tgwf-searxng-plugins.
.. code:: yaml

View file

@ -1,5 +1,5 @@
.. _searx morty:
.. _searxng morty:
=========================
How to setup result proxy
@ -15,9 +15,9 @@ How to setup result proxy
By default SearXNG can only act as an image proxy for result images, but it is
possible to proxify all the result URLs with an external service, morty_.
To use this feature, morty has to be installed and activated in searx's
To use this feature, morty has to be installed and activated in searxng's
``settings.yml``. Add the following snippet to your ``settings.yml`` and
restart searx:
restart searxng:
.. code:: yaml
@ -30,8 +30,8 @@ instances without a HTTP proxy. If your morty service is public, the url is the
address of the reverse proxy (e.g ``https://example.org/morty``).
For more information about *result proxy* have a look at *"SearXNG via filtron
plus morty"* in the :ref:`nginx <nginx searx via filtron plus morty>` and
:ref:`apache <apache searx via filtron plus morty>` sections.
plus morty"* in the :ref:`nginx <nginx searxng via filtron plus morty>` and
:ref:`apache <apache searxng via filtron plus morty>` sections.
``url``
Is the address of the running morty service.

View file

@ -14,7 +14,7 @@ Configuration defaults (at built time):
.. _configured plugins:
.. jinja:: searx
.. jinja:: searxng
.. flat-table:: Plugins configured at built time (defaults)
:header-rows: 1

View file

@ -1,4 +1,4 @@
.. _update searx:
.. _update searxng:
=============
How to update
@ -7,11 +7,11 @@ How to update
How to update depends on the :ref:`installation` method. If you have used the
:ref:`installation scripts`, use ``update`` command from the scripts.
**Update** :ref:`SearXNG service <searx.sh>`
**Update** :ref:`SearXNG service <searxng.sh>`
.. code:: sh
sudo -H ./utils/searx.sh update searx
sudo -H ./utils/searxng.sh update searxng
**Update** :ref:`filtron reverse proxy <filtron.sh>`
@ -25,7 +25,7 @@ How to update depends on the :ref:`installation` method. If you have used the
$ sudo -H ./utils/morty.sh update morty
.. _inspect searx:
.. _inspect searxng:
======================
How to inspect & debug
@ -39,11 +39,11 @@ How to inspect & debug
How to debug depends on the :ref:`installation` method. If you have used the
:ref:`installation scripts`, use ``inspect`` command from the scripts.
**Inspect** :ref:`SearXNG service <searx.sh>`
**Inspect** :ref:`SearXNG service <searxng.sh>`
.. code:: sh
sudo -H ./utils/searx.sh inspect service
sudo -H ./utils/searxng.sh inspect service
**Inspect** :ref:`filtron reverse proxy <filtron.sh>`

View file

@ -1,4 +1,4 @@
.. template evaluated by: ./utils/searx.sh docs
.. template evaluated by: ./utils/searxng.sh docs
.. hint: all dollar-names are variables, dollar sign itself is quoted by: \\$
.. START distro-packages
@ -72,7 +72,7 @@ ${fedora_build}
.. END create user
.. START clone searx
.. START clone searxng
.. tabs::
@ -81,9 +81,9 @@ ${fedora_build}
.. code-block:: sh
$ sudo -H -u ${SERVICE_USER} -i
(${SERVICE_USER})$ git clone \"$GIT_URL\" \"$SEARX_SRC\"
(${SERVICE_USER})$ git clone \"$GIT_URL\" \"$SEARXNG_SRC\"
.. END clone searx
.. END clone searxng
.. START create virtualenv
@ -93,8 +93,8 @@ ${fedora_build}
.. code-block:: sh
(${SERVICE_USER})$ python3 -m venv \"${SEARX_PYENV}\"
(${SERVICE_USER})$ echo \". ${SEARX_PYENV}/bin/activate\" >> \"$SERVICE_HOME/.profile\"
(${SERVICE_USER})$ python3 -m venv \"${SEARXNG_PYENV}\"
(${SERVICE_USER})$ echo \". ${SEARXNG_PYENV}/bin/activate\" >> \"$SERVICE_HOME/.profile\"
.. END create virtualenv
@ -109,7 +109,7 @@ ${fedora_build}
$ sudo -H -u ${SERVICE_USER} -i
(${SERVICE_USER})$ command -v python && python --version
$SEARX_PYENV/bin/python
$SEARXNG_PYENV/bin/python
Python 3.8.1
# update pip's boilerplate ..
@ -118,14 +118,14 @@ ${fedora_build}
pip install -U wheel
pip install -U pyyaml
# jump to searx's working tree and install SearXNG into virtualenv
(${SERVICE_USER})$ cd \"$SEARX_SRC\"
# jump to searxng's working tree and install SearXNG into virtualenv
(${SERVICE_USER})$ cd \"$SEARXNG_SRC\"
(${SERVICE_USER})$ pip install -e .
.. END manage.sh update_packages
.. START searx config
.. START searxng config
.. tabs::
@ -133,17 +133,17 @@ ${fedora_build}
.. code-block:: sh
$ sudo -H mkdir -p \"$(dirname ${SEARX_SETTINGS_PATH})\"
$ sudo -H cp \"$SEARX_SRC/utils/templates/etc/searx/settings.yml\" \\
\"${SEARX_SETTINGS_PATH}\"
$ sudo -H mkdir -p \"$(dirname ${SEARXNG_SETTINGS_PATH})\"
$ sudo -H cp \"$SEARXNG_SRC/utils/templates/etc/searxng/settings.yml\" \\
\"${SEARXNG_SETTINGS_PATH}\"
.. group-tab:: searx/settings.yml
.. group-tab:: searxng/settings.yml
.. code-block:: sh
$ sudo -H mkdir -p \"$(dirname ${SEARX_SETTINGS_PATH})\"
$ sudo -H cp \"$SEARX_SRC/searx/settings.yml\" \\
\"${SEARX_SETTINGS_PATH}\"
$ sudo -H mkdir -p \"$(dirname ${SEARXNG_SETTINGS_PATH})\"
$ sudo -H cp \"$SEARXNG_SRC/searxng/settings.yml\" \\
\"${SEARXNG_SETTINGS_PATH}\"
.. tabs::
@ -151,11 +151,11 @@ ${fedora_build}
.. code-block:: sh
$ sudo -H sed -i -e \"s/ultrasecretkey/\$(openssl rand -hex 16)/g\" \"$SEARX_SETTINGS_PATH\"
$ sudo -H sed -i -e \"s/ultrasecretkey/\$(openssl rand -hex 16)/g\" \"$SEARXNG_SETTINGS_PATH\"
.. END searx config
.. END searxng config
.. START check searx installation
.. START check searxng installation
.. tabs::
@ -164,18 +164,18 @@ ${fedora_build}
.. code-block:: sh
# enable debug ..
$ sudo -H sed -i -e \"s/debug : False/debug : True/g\" \"$SEARX_SETTINGS_PATH\"
$ sudo -H sed -i -e \"s/debug : False/debug : True/g\" \"$SEARXNG_SETTINGS_PATH\"
# start webapp
$ sudo -H -u ${SERVICE_USER} -i
(${SERVICE_USER})$ cd ${SEARX_SRC}
(${SERVICE_USER})$ export SEARX_SETTINGS_PATH=\"${SEARX_SETTINGS_PATH}\"
(${SERVICE_USER})$ python searx/webapp.py
(${SERVICE_USER})$ cd ${SEARXNG_SRC}
(${SERVICE_USER})$ export SEARXNG_SETTINGS_PATH=\"${SEARXNG_SETTINGS_PATH}\"
(${SERVICE_USER})$ python searxng/webapp.py
# disable debug
$ sudo -H sed -i -e \"s/debug : True/debug : False/g\" \"$SEARX_SETTINGS_PATH\"
$ sudo -H sed -i -e \"s/debug : True/debug : False/g\" \"$SEARXNG_SETTINGS_PATH\"
Open WEB browser and visit http://$SEARX_INTERNAL_HTTP . If you are inside a
Open WEB browser and visit http://$SEARXNG_INTERNAL_HTTP . If you are inside a
container or in a script, test with curl:
.. tabs::
@ -184,13 +184,13 @@ container or in a script, test with curl:
.. code-block:: sh
$ xdg-open http://$SEARX_INTERNAL_HTTP
$ xdg-open http://$SEARXNG_INTERNAL_HTTP
.. group-tab:: curl
.. code-block:: none
$ curl --location --verbose --head --insecure $SEARX_INTERNAL_HTTP
$ curl --location --verbose --head --insecure $SEARXNG_INTERNAL_HTTP
* Trying 127.0.0.1:8888...
* TCP_NODELAY set
@ -206,4 +206,4 @@ container or in a script, test with curl:
HTTP/1.0 200 OK
...
.. END check searx installation
.. END check searxng installation

View file

@ -4,8 +4,8 @@
import sys, os
from pallets_sphinx_themes import ProjectLink
from searx import get_setting
from searx.version import VERSION_STRING, GIT_URL, GIT_BRANCH
from searxng import get_setting
from searxng.version import VERSION_STRING, GIT_URL, GIT_BRANCH
# Project --------------------------------------------------------------
@ -14,7 +14,7 @@ copyright = '2021 SearXNG team, 2015-2021 Adam Tauber, Noémi Ványi'
author = '2021 SearXNG team, 2015-2021 Adam Tauber'
release, version = VERSION_STRING, VERSION_STRING
SEARX_URL = get_setting('server.base_url') or 'https://example.org/searxng'
SEARXNG_URL = get_setting('server.base_url') or 'https://example.org/searxng'
ISSUE_URL = get_setting('brand.issue_url')
DOCS_URL = get_setting('brand.docs_url')
PUBLIC_INSTANCES = get_setting('brand.public_instances')
@ -37,13 +37,13 @@ numfig = True
exclude_patterns = ['build-templates/*.rst']
import searx.engines
import searx.plugins
searx.engines.load_engines(searx.settings['engines'])
import searxng.engines
import searxng.plugins
searxng.engines.load_engines(searxng.settings['engines'])
jinja_contexts = {
'searx': {
'engines': searx.engines.engines,
'plugins': searx.plugins.plugins
'searxng': {
'engines': searxng.engines.engines,
'plugins': searxng.plugins.plugins
},
}
@ -53,12 +53,12 @@ extlinks = {}
# upstream links
extlinks['wiki'] = ('https://github.com/searxng/searxng/wiki/%s', ' ')
extlinks['pull'] = ('https://github.com/searxng/searxng/pull/%s', 'PR ')
extlinks['pull-searx'] = ('https://github.com/searx/searx/pull/%s', 'PR ')
extlinks['pull-searxng'] = ('https://github.com/searxng/searxng/pull/%s', 'PR ')
# links to custom brand
extlinks['origin'] = (GIT_URL + '/blob/' + GIT_BRANCH + '/%s', 'git://')
extlinks['patch'] = (GIT_URL + '/commit/%s', '#')
extlinks['search'] = (SEARX_URL + '/%s', '#')
extlinks['search'] = (SEARXNG_URL + '/%s', '#')
extlinks['docs'] = (DOCS_URL + '/%s', 'docs: ')
extlinks['pypi'] = ('https://pypi.org/project/%s', 'PyPi: ')
extlinks['man'] = ('https://manpages.debian.org/jump?q=%s', '')
@ -105,7 +105,7 @@ issues_github_path = "searxng/searxng"
sys.path.append(os.path.abspath('_themes'))
sys.path.insert(0, os.path.abspath("../utils/"))
html_theme_path = ['_themes']
html_theme = "searx"
html_theme = "searxng"
# sphinx.ext.imgmath setup
html_math_renderer = 'imgmath'
@ -138,5 +138,5 @@ html_show_sourcelink = False
# LaTeX ----------------------------------------------------------------
latex_documents = [
(master_doc, "searx-{}.tex".format(VERSION_STRING), html_title, author, "manual")
(master_doc, "searxng-{}.tex".format(VERSION_STRING), html_title, author, "manual")
]

View file

@ -33,14 +33,14 @@ capabilities.
A few widely used features work differently or turned off by default or not
implemented at all **as a consequence of privacy-by-design**.
If a feature reduces the privacy preserving aspects of searx, it should be
If a feature reduces the privacy preserving aspects of searxng, it should be
switched off by default or should not implemented at all. There are plenty of
search engines already providing such features. If a feature reduces the
protection of searx, users must be informed about the effect of choosing to
protection of searxng, users must be informed about the effect of choosing to
enable it. Features that protect privacy but differ from the expectations of
the user should also be explained.
Also, if you think that something works weird with searx, it's might be because
Also, if you think that something works weird with searxng, it's might be because
of the tool you use is designed in a way to interfere with the privacy respect.
Submitting a bugreport to the vendor of the tool that misbehaves might be a good
feedback to reconsider the disrespect to its customers (e.g. ``GET`` vs ``POST``

View file

@ -20,7 +20,7 @@ better results.
Because there is no general search API which could be used for every search
engine, an adapter has to be built between SearXNG and the external search
engines. Adapters are stored under the folder :origin:`searx/engines`.
engines. Adapters are stored under the folder :origin:`searxng/engines`.
.. _general engine configuration:
@ -70,7 +70,7 @@ For a more detailed description, see :ref:`settings engine` in the :ref:`settin
argument type information
======================= =========== ===============================================
name string name of search-engine
engine string name of searx-engine (filename without ``.py``)
engine string name of searxng-engine (filename without ``.py``)
enable_http bool enable HTTP (by default only HTTPS is enabled).
shortcut string shortcut of search-engine
timeout string specific timeout for search-engine
@ -184,7 +184,7 @@ Specify Request
---------------
The function :py:func:`def request(query, params):
<searx.engines.demo_online.request>` always returns the ``params`` variable, the
<searxng.engines.demo_online.request>` always returns the ``params`` variable, the
following parameters can be used to specify a search request:
.. table::

View file

@ -42,10 +42,10 @@ be set on a *production* system.
prerequisites from various projects on developer's desktop is always a good
choice.**
The scripts from :ref:`searx_utils` can divide in those to install and maintain
The scripts from :ref:`searxng_utils` can divide in those to install and maintain
software:
- :ref:`searx.sh`
- :ref:`searxng.sh`
- :ref:`filtron.sh`
- :ref:`morty.sh`
@ -88,13 +88,13 @@ fork:
.. code:: sh
$ cd ~/Downloads
$ git clone https://github.com/searxng/searxng.git searx
$ cd searx
$ git clone https://github.com/searxng/searxng.git searxng
$ cd searxng
The :ref:`lxc-searx.env` consists of several images, see ``export
LXC_SUITE=(...`` near by :origin:`utils/lxc-searx.env#L19`. For this blog post
The :ref:`lxc-searxng.env` consists of several images, see ``export
LXC_SUITE=(...`` near by :origin:`utils/lxc-searxng.env#L19`. For this blog post
we exercise on a archlinux_ image. The container of this image is named
``searx-archlinux``. Lets build the container, but be sure that this container
``searxng-archlinux``. Lets build the container, but be sure that this container
does not already exists, so first lets remove possible old one:
.. tabs::
@ -103,14 +103,14 @@ does not already exists, so first lets remove possible old one:
.. code:: sh
$ sudo -H ./utils/lxc.sh remove searx-archlinux
$ sudo -H ./utils/lxc.sh build searx-archlinux
$ sudo -H ./utils/lxc.sh remove searxng-archlinux
$ sudo -H ./utils/lxc.sh build searxng-archlinux
.. sidebar:: The ``searx-archlinux`` container
.. sidebar:: The ``searxng-archlinux`` container
is the base of all our exercises here.
In this container we install all services :ref:`including searx, morty & filtron
In this container we install all services :ref:`including searxng, morty & filtron
<lxc.sh install suite>` in once:
.. tabs::
@ -119,7 +119,7 @@ In this container we install all services :ref:`including searx, morty & filtron
.. code:: sh
$ sudo -H ./utils/lxc.sh install suite searx-archlinux
$ sudo -H ./utils/lxc.sh install suite searxng-archlinux
To proxy HTTP from filtron and morty in the container to the outside of the
container, install nginx into the container. Once for the bot blocker filtron:
@ -130,10 +130,10 @@ container, install nginx into the container. Once for the bot blocker filtron:
.. code:: sh
$ sudo -H ./utils/lxc.sh cmd searx-archlinux \
$ sudo -H ./utils/lxc.sh cmd searxng-archlinux \
./utils/filtron.sh nginx install
...
INFO: got 429 from http://10.174.184.156/searx
INFO: got 429 from http://10.174.184.156/searxng
and once for the content sanitizer (content proxy morty):
@ -143,7 +143,7 @@ and once for the content sanitizer (content proxy morty):
.. code:: sh
$ sudo -H ./utils/lxc.sh cmd searx-archlinux \
$ sudo -H ./utils/lxc.sh cmd searxng-archlinux \
./utils/morty.sh nginx install
...
INFO: got 200 from http://10.174.184.156/morty/
@ -154,8 +154,8 @@ and once for the content sanitizer (content proxy morty):
blocker (filtron) and WEB content sanitizer (content proxy morty), both are
needed for a *privacy protecting* search engine.
On your system, the IP of your ``searx-archlinux`` container differs from
http://10.174.184.156/searx, just open the URL reported in your installation
On your system, the IP of your ``searxng-archlinux`` container differs from
http://10.174.184.156/searxng, just open the URL reported in your installation
protocol in your WEB browser from the desktop to test the instance from outside
of the container.
@ -169,7 +169,7 @@ In containers, work as usual
Usually you open a root-bash using ``sudo -H bash``. In case of LXC containers
open the root-bash in the container using ``./utils/lxc.sh cmd
searx-archlinux``:
searxng-archlinux``:
.. tabs::
@ -177,26 +177,26 @@ searx-archlinux``:
.. code:: sh
$ sudo -H ./utils/lxc.sh cmd searx-archlinux bash
INFO: [searx-archlinux] bash
[root@searx-archlinux searx]# pwd
/share/searx
$ sudo -H ./utils/lxc.sh cmd searxng-archlinux bash
INFO: [searxng-archlinux] bash
[root@searxng-archlinux searxng]# pwd
/share/searxng
The prompt ``[root@searx-archlinux ...]`` signals, that you are the root user in
the searx-container. To debug the running SearXNG instance use:
The prompt ``[root@searxng-archlinux ...]`` signals, that you are the root user in
the searxng-container. To debug the running SearXNG instance use:
.. tabs::
.. group-tab:: root@searx-archlinux
.. group-tab:: root@searxng-archlinux
.. code:: sh
$ ./utils/searx.sh inspect service
$ ./utils/searxng.sh inspect service
...
use [CTRL-C] to stop monitoring the log
...
Back in the browser on your desktop open the service http://10.174.184.156/searx
Back in the browser on your desktop open the service http://10.174.184.156/searxng
and run your application tests while the debug log is shown in the terminal from
above. You can stop monitoring using ``CTRL-C``, this also disables the *"debug
option"* in SearXNG's settings file and restarts the SearXNG uwsgi application.
@ -204,29 +204,29 @@ To debug services from filtron and morty analogous use:
.. tabs::
.. group-tab:: root@searx-archlinux
.. group-tab:: root@searxng-archlinux
.. code:: sh
$ ./utils/filtron.sh inspect service
$ ./utils/morty.sh inspect service
Another point we have to notice is that each service (:ref:`SearXNG <searx.sh>`,
Another point we have to notice is that each service (:ref:`SearXNG <searxng.sh>`,
:ref:`filtron <filtron.sh>` and :ref:`morty <morty.sh>`) runs under dedicated
system user account with the same name (compare :ref:`create searx user`). To
system user account with the same name (compare :ref:`create searxng user`). To
get a shell from theses accounts, simply call one of the scripts:
.. tabs::
.. group-tab:: root@searx-archlinux
.. group-tab:: root@searxng-archlinux
.. code:: sh
$ ./utils/searx.sh shell
$ ./utils/searxng.sh shell
$ ./utils/filtron.sh shell
$ ./utils/morty.sh shell
To get in touch, open a shell from the service user (searx@searx-archlinux):
To get in touch, open a shell from the service user (searxng@searxng-archlinux):
.. tabs::
@ -234,23 +234,23 @@ To get in touch, open a shell from the service user (searx@searx-archlinux):
.. code:: sh
$ sudo -H ./utils/lxc.sh cmd searx-archlinux \
./utils/searx.sh shell
$ sudo -H ./utils/lxc.sh cmd searxng-archlinux \
./utils/searxng.sh shell
// exit with [CTRL-D]
(searx-pyenv) [searx@searx-archlinux ~]$ ...
(searxng-pyenv) [searxng@searxng-archlinux ~]$ ...
The prompt ``[searx@searx-archlinux]`` signals that you are logged in as system
user ``searx`` in the ``searx-archlinux`` container and the python *virtualenv*
``(searx-pyenv)`` environment is activated.
The prompt ``[searxng@searxng-archlinux]`` signals that you are logged in as system
user ``searxng`` in the ``searxng-archlinux`` container and the python *virtualenv*
``(searxng-pyenv)`` environment is activated.
.. tabs::
.. group-tab:: searx@searx-archlinux
.. group-tab:: searxng@searxng-archlinux
.. code:: sh
(searx-pyenv) [searx@searx-archlinux ~]$ pwd
/usr/local/searx
(searxng-pyenv) [searxng@searxng-archlinux ~]$ pwd
/usr/local/searxng
@ -261,13 +261,13 @@ In this section we will see how to change the *"Fully functional SearXNG suite"*
from a LXC container (which is quite ready for production) into a developer
suite. For this, we have to keep an eye on the :ref:`installation basic`:
- SearXNG setup in: ``/etc/searx/settings.yml``
- SearXNG user's home: ``/usr/local/searx``
- virtualenv in: ``/usr/local/searx/searx-pyenv``
- SearXNG software in: ``/usr/local/searx/searx-src``
- SearXNG setup in: ``/etc/searxng/settings.yml``
- SearXNG user's home: ``/usr/local/searxng``
- virtualenv in: ``/usr/local/searxng/searxng-pyenv``
- SearXNG software in: ``/usr/local/searxng/searxng-src``
With the use of the :ref:`searx.sh` the SearXNG service was installed as
:ref:`uWSGI application <searx uwsgi>`. To maintain this service, we can use
With the use of the :ref:`searxng.sh` the SearXNG service was installed as
:ref:`uWSGI application <searxng uwsgi>`. To maintain this service, we can use
``systemctl`` (compare :ref:`service architectures on distributions <uwsgi
configuration>`).
@ -277,30 +277,30 @@ configuration>`).
.. code:: sh
$ sudo -H ./utils/lxc.sh cmd searx-archlinux \
systemctl stop uwsgi@searx
$ sudo -H ./utils/lxc.sh cmd searxng-archlinux \
systemctl stop uwsgi@searxng
With the command above, we stopped the SearXNG uWSGI-App in the archlinux
container.
The uWSGI-App for the archlinux dsitros is configured in
:origin:`utils/templates/etc/uwsgi/apps-archlinux/searx.ini`, from where at
:origin:`utils/templates/etc/uwsgi/apps-archlinux/searxng.ini`, from where at
least you should attend the settings of ``uid``, ``chdir``, ``env`` and
``http``::
env = SEARX_SETTINGS_PATH=/etc/searx/settings.yml
env = SEARXNG_SETTINGS_PATH=/etc/searxng/settings.yml
http = 127.0.0.1:8888
chdir = /usr/local/searx/searx-src/searx
virtualenv = /usr/local/searx/searx-pyenv
pythonpath = /usr/local/searx/searx-src
chdir = /usr/local/searxng/searxng-src/searxng
virtualenv = /usr/local/searxng/searxng-pyenv
pythonpath = /usr/local/searxng/searxng-src
If you have read the :ref:`"Good to know section" <lxc.sh>` you remember, that
each container shares the root folder of the repository and the command
``utils/lxc.sh cmd`` handles relative path names **transparent**. To wrap the
SearXNG installation into a developer one, we simple have to create a smylink to
the **transparent** reposetory from the desktop. Now lets replace the
repository at ``searx-src`` in the container with the working tree from outside
repository at ``searxng-src`` in the container with the working tree from outside
of the container:
.. tabs::
@ -309,11 +309,11 @@ of the container:
.. code:: sh
$ sudo -H ./utils/lxc.sh cmd searx-archlinux \
mv /usr/local/searx/searx-src /usr/local/searx/searx-src.old
$ sudo -H ./utils/lxc.sh cmd searxng-archlinux \
mv /usr/local/searxng/searxng-src /usr/local/searxng/searxng-src.old
$ sudo -H ./utils/lxc.sh cmd searx-archlinux \
ln -s /share/searx/ /usr/local/searx/searx-src
$ sudo -H ./utils/lxc.sh cmd searxng-archlinux \
ln -s /share/searxng/ /usr/local/searxng/searxng-src
Now we can develop as usual in the working tree of our desktop system. Every
time the software was changed, you have to restart the SearXNG service (in the
@ -325,8 +325,8 @@ conatiner):
.. code:: sh
$ sudo -H ./utils/lxc.sh cmd searx-archlinux \
systemctl restart uwsgi@searx
$ sudo -H ./utils/lxc.sh cmd searxng-archlinux \
systemctl restart uwsgi@searxng
Remember: :ref:`working in containers` .. here are just some examples from my
@ -340,28 +340,28 @@ daily usage:
.. code:: sh
$ sudo -H ./utils/lxc.sh cmd searx-archlinux \
./utils/searx.sh inspect service
$ sudo -H ./utils/lxc.sh cmd searxng-archlinux \
./utils/searxng.sh inspect service
Run :ref:`makefile`, e.g. to test inside the container:
.. code:: sh
$ sudo -H ./utils/lxc.sh cmd searx-archlinux \
$ sudo -H ./utils/lxc.sh cmd searxng-archlinux \
make test
To install all prerequisites needed for a :ref:`buildhosts`:
.. code:: sh
$ sudo -H ./utils/lxc.sh cmd searx-archlinux \
./utils/searx.sh install buildhost
$ sudo -H ./utils/lxc.sh cmd searxng-archlinux \
./utils/searxng.sh install buildhost
To build the docs on a buildhost :ref:`buildhosts`:
.. code:: sh
$ sudo -H ./utils/lxc.sh cmd searx-archlinux \
$ sudo -H ./utils/lxc.sh cmd searxng-archlinux \
make docs.html
.. _lxcdev summary:
@ -373,14 +373,14 @@ We build up a fully functional SearXNG suite in a archlinux container:
.. code:: sh
$ sudo -H ./utils/lxc.sh install suite searx-archlinux
$ sudo -H ./utils/lxc.sh install suite searxng-archlinux
To access HTTP from the desktop we installed nginx for the services inside the
conatiner:
.. tabs::
.. group-tab:: [root@searx-archlinux]
.. group-tab:: [root@searxng-archlinux]
.. code:: sh
@ -393,13 +393,13 @@ the container :
.. tabs::
.. group-tab:: [root@searx-archlinux]
.. group-tab:: [root@searxng-archlinux]
.. code:: sh
$ mv /usr/local/searx/searx-src /usr/local/searx/searx-src.old
$ ln -s /share/searx/ /usr/local/searx/searx-src
$ systemctl restart uwsgi@searx
$ mv /usr/local/searxng/searxng-src /usr/local/searxng/searxng-src.old
$ ln -s /share/searxng/ /usr/local/searxng/searxng-src
$ systemctl restart uwsgi@searxng
To get information about the searxNG suite in the archlinux container we can
use:
@ -410,11 +410,11 @@ use:
.. code:: sh
$ sudo -H ./utils/lxc.sh show suite searx-archlinux
$ sudo -H ./utils/lxc.sh show suite searxng-archlinux
...
[searx-archlinux] INFO: (eth0) filtron: http://10.174.184.156:4004/ http://10.174.184.156/searx
[searx-archlinux] INFO: (eth0) morty: http://10.174.184.156:3000/
[searx-archlinux] INFO: (eth0) docs.live: http://10.174.184.156:8080/
[searx-archlinux] INFO: (eth0) IPv6: http://[fd42:573b:e0b3:e97e:216:3eff:fea5:9b65]
[searxng-archlinux] INFO: (eth0) filtron: http://10.174.184.156:4004/ http://10.174.184.156/searxng
[searxng-archlinux] INFO: (eth0) morty: http://10.174.184.156:3000/
[searxng-archlinux] INFO: (eth0) docs.live: http://10.174.184.156:8080/
[searxng-archlinux] INFO: (eth0) IPv6: http://[fd42:573b:e0b3:e97e:216:3eff:fea5:9b65]
...

View file

@ -40,16 +40,16 @@ We do no longer need to build up the virtualenv manually. Jump into your git
working tree and release a ``make install`` to get a virtualenv with a
*developer install* of SearXNG (:origin:`setup.py`). ::
$ cd ~/searx-clone
$ cd ~/searxng-clone
$ make install
PYENV [virtualenv] installing ./requirements*.txt into local/py3
...
PYENV OK
PYENV [install] pip install -e 'searx[test]'
PYENV [install] pip install -e 'searxng[test]'
...
Successfully installed argparse-1.4.0 searx
BUILDENV INFO:searx:load the default settings from ./searx/settings.yml
BUILDENV INFO:searx:Initialisation done
Successfully installed argparse-1.4.0 searxng
BUILDENV INFO:searxng:load the default settings from ./searxng/settings.yml
BUILDENV INFO:searxng:Initialisation done
BUILDENV build utils/brand.env
If you release ``make install`` multiple times the installation will only
@ -66,11 +66,11 @@ the check fails if you edit the requirements listed in
PYENV [virtualenv] installing ./requirements*.txt into local/py3
...
PYENV OK
PYENV [install] pip install -e 'searx[test]'
PYENV [install] pip install -e 'searxng[test]'
...
Successfully installed argparse-1.4.0 searx
BUILDENV INFO:searx:load the default settings from ./searx/settings.yml
BUILDENV INFO:searx:Initialisation done
Successfully installed argparse-1.4.0 searxng
BUILDENV INFO:searxng:load the default settings from ./searxng/settings.yml
BUILDENV INFO:searxng:Initialisation done
BUILDENV build utils/brand.env
.. sidebar:: drop environment
@ -107,10 +107,10 @@ The ``make buildenv`` target will update the *build environment* in:
Tasks running outside of an *installed instance*, need the following settings
from the YAML configuration:
- ``SEARX_URL`` from :ref:`server.base_url <settings global server>` (aka
- ``SEARXNG_URL`` from :ref:`server.base_url <settings global server>` (aka
``PUBLIC_URL``)
- ``SEARX_BIND_ADDRESS`` from :ref:`server.bind_address <settings global server>`
- ``SEARX_PORT`` from :ref:`server.port <settings global server>`
- ``SEARXNG_BIND_ADDRESS`` from :ref:`server.bind_address <settings global server>`
- ``SEARXNG_PORT`` from :ref:`server.port <settings global server>`
.. _make run:
@ -118,13 +118,13 @@ from the YAML configuration:
============
To get up a running a developer instance simply call ``make run``. This enables
*debug* option in :origin:`searx/settings.yml`, starts a ``./searx/webapp.py``
*debug* option in :origin:`searxng/settings.yml`, starts a ``./searxng/webapp.py``
instance, disables *debug* option again and opens the URL in your favorite WEB
browser (:man:`xdg-open`)::
$ make run
PYENV OK
SEARX_DEBUG=1 ./manage.sh pyenv.cmd python ./searx/webapp.py
SEARXNG_DEBUG=1 ./manage.sh pyenv.cmd python ./searxng/webapp.py
...
INFO:werkzeug: * Running on http://127.0.0.1:8888/ (Press CTRL+C to quit)
@ -210,15 +210,15 @@ by underline::
make search.checker.google_news
To see HTTP requests and more use SEARX_DEBUG::
To see HTTP requests and more use SEARXNG_DEBUG::
make SEARX_DEBUG=1 search.checker.google_news
make SEARXNG_DEBUG=1 search.checker.google_news
.. _3xx: https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#3xx_redirection
To filter out HTTP redirects (3xx_)::
make SEARX_DEBUG=1 search.checker.google_news | grep -A1 "HTTP/1.1\" 3[0-9][0-9]"
make SEARXNG_DEBUG=1 search.checker.google_news | grep -A1 "HTTP/1.1\" 3[0-9][0-9]"
...
Engine google news Checking
https://news.google.com:443 "GET /search?q=life&hl=en&lr=lang_en&ie=utf8&oe=utf8&ceid=US%3Aen&gl=US HTTP/1.1" 302 0
@ -246,8 +246,8 @@ Build Python packages in ``./dist/py``::
running bdist_wheel
$ ls ./dist
searx-0.18.0-py3-none-any.whl searx-0.18.0.tar.gz
searxng-0.18.0-py3-none-any.whl searxng-0.18.0.tar.gz
To upload packages to PyPi_, there is also a ``pypi.upload`` target (to test use
``pypi.upload.test``). Since you are not the owner of :pypi:`searx` you will
``pypi.upload.test``). Since you are not the owner of :pypi:`searxng` you will
never need to upload.

View file

@ -9,28 +9,28 @@ Offline Engines
- :ref:`demo offline engine`
- :ref:`sql engines`
- :ref:`engine command`
- :origin:`Redis <searx/engines/redis_server.py>`
- :origin:`Redis <searxng/engines/redis_server.py>`
To extend the functionality of SearXNG, offline engines are going to be
introduced. An offline engine is an engine which does not need Internet
connection to perform a search and does not use HTTP to communicate.
Offline engines can be configured, by adding those to the `engines` list of
:origin:`settings.yml <searx/settings.yml>`. An example skeleton for offline
:origin:`settings.yml <searxng/settings.yml>`. An example skeleton for offline
engines can be found in :ref:`demo offline engine` (:origin:`demo_offline.py
<searx/engines/demo_offline.py>`).
<searxng/engines/demo_offline.py>`).
Programming Interface
=====================
:py:func:`init(engine_settings=None) <searx.engines.demo_offline.init>`
:py:func:`init(engine_settings=None) <searxng.engines.demo_offline.init>`
All offline engines can have their own init function to setup the engine before
accepting requests. The function gets the settings from settings.yml as a
parameter. This function can be omitted, if there is no need to setup anything
in advance.
:py:func:`search(query, params) <searx.engines.demo_offline.searc>`
:py:func:`search(query, params) <searxng.engines.demo_offline.searc>`
Each offline engine has a function named ``search``. This function is
responsible to perform a search and return the results in a presentable
@ -55,10 +55,10 @@ admins can install packages in advance.
If there is a need to install additional packages in *Python's Virtual
Environment* of your SearXNG instance you need to switch into the environment
(:ref:`searx-src`) first, for this you can use :ref:`searx.sh`::
(:ref:`searxng-src`) first, for this you can use :ref:`searxng.sh`::
$ sudo utils/searx.sh shell
(searx-pyenv)$ pip install ...
$ sudo utils/searxng.sh shell
(searxng-pyenv)$ pip install ...
Private engines (Security)

View file

@ -8,7 +8,7 @@ Plugins
- :ref:`plugins generic`
Plugins can extend or replace functionality of various components of searx.
Plugins can extend or replace functionality of various components of searxng.
Example plugin
==============
@ -41,7 +41,7 @@ Register your plugin
====================
To enable your plugin register your plugin in
searx > plugin > __init__.py.
searxng > plugin > __init__.py.
And at the bottom of the file add your plugin like.
``plugins.register(name_of_python_file)``
@ -65,7 +65,7 @@ plugin. A plugin doesn't need to implement all the hooks.
* False to stop the search
:param flask.request request:
:param searx.search.SearchWithPlugins search:
:param searxng.search.SearchWithPlugins search:
:return: False to stop the search
:rtype: bool
@ -75,7 +75,7 @@ plugin. A plugin doesn't need to implement all the hooks.
Runs AFTER the search request.
:param flask.request request: Flask request.
:param searx.search.SearchWithPlugins search: Context.
:param searxng.search.SearchWithPlugins search: Context.
.. py:function:: on_result(request, search, result) -> bool
@ -95,7 +95,7 @@ plugin. A plugin doesn't need to implement all the hooks.
* False to remove the result
:param flask.request request:
:param searx.search.SearchWithPlugins search:
:param searxng.search.SearchWithPlugins search:
:param typing.Dict result: Result, see - :ref:`engine results`
:return: True to keep the result
:rtype: bool

View file

@ -11,7 +11,7 @@ you simply by using :ref:`make <makefile>`.
.. code:: sh
git clone https://github.com/searxng/searxng.git searx
git clone https://github.com/searxng/searxng.git searxng
Here is how a minimal workflow looks like:

View file

@ -14,7 +14,7 @@ documentation, with the builders from the Sphinx_ project a HTML output is
generated and deployed at :docs:`github.io <.>`. For build prerequisites read
:ref:`docs build`.
The source files of Searx's documentation are located at :origin:`docs`. Sphinx
The source files of Searxng's documentation are located at :origin:`docs`. Sphinx
assumes source files to be encoded in UTF-8 by defaul. Run :ref:`make docs.live
<make docs.live>` to build HTML while editing.
@ -290,7 +290,7 @@ content becomes smart.
files & folders origin :origin:`docs/dev/reST.rst` ``:origin:`docs/dev/reST.rst```
pull request :pull:`4` ``:pull:`4```
patch :patch:`af2cae6` ``:patch:`af2cae6```
PyPi package :pypi:`searx` ``:pypi:`searx```
PyPi package :pypi:`searxng` ``:pypi:`searxng```
manual page man :man:`bash` ``:man:`bash```
intersphinx_
--------------------------------------------------------------------------------------------------
@ -494,7 +494,7 @@ Figures & Images
is flexible. To get best results in the generated output format, install
ImageMagick_ and Graphviz_.
Searx's sphinx setup includes: :ref:`linuxdoc:kfigure`. Scaleable here means;
Searxng's sphinx setup includes: :ref:`linuxdoc:kfigure`. Scaleable here means;
scaleable in sense of the build process. Normally in absence of a converter
tool, the build process will break. From the authors POV its annoying to care
about the build process when handling with images, especially since he has no
@ -1288,20 +1288,20 @@ install` (with SearXNG modules installed). We use this e.g. to build chapter:
:language: reST
:start-after: .. _configured engines:
The context for the template is selected in the line ``.. jinja:: searx``. In
sphinx's build configuration (:origin:`docs/conf.py`) the ``searx`` context
The context for the template is selected in the line ``.. jinja:: searxng``. In
sphinx's build configuration (:origin:`docs/conf.py`) the ``searxng`` context
contains the ``engines`` and ``plugins``.
.. code:: py
import searx.search
import searx.engines
import searx.plugins
searx.search.initialize()
import searxng.search
import searxng.engines
import searxng.plugins
searxng.search.initialize()
jinja_contexts = {
'searx': {
'engines': searx.engines.engines,
'plugins': searx.plugins.plugins
'searxng': {
'engines': searxng.engines.engines,
'plugins': searxng.plugins.plugins
},
}

View file

@ -25,7 +25,7 @@ Parameters
``q`` : required
The search query. This string is passed to external search services. Thus,
SearXNG supports syntax of each search service. For example, ``site:github.com
searx`` is a valid query for Google. However, if simply the query above is
searxng`` is a valid query for Google. However, if simply the query above is
passed to any search engine which does not filter its results based on this
syntax, you might not get the results you wanted.
@ -62,7 +62,7 @@ Parameters
``image_proxy`` : default ``False``
[ ``True``, ``False`` ]
Proxy image results through searx.
Proxy image results through searxng.
``autocomplete`` : default *empty*
[ ``google``, ``dbpedia``, ``duckduckgo``, ``startpage``, ``wikipedia`` ]
@ -112,9 +112,9 @@ Parameters
``Vim-like_hotkeys``, ``Self_Informations``, ``Tracker_URL_remover``,
``Search_on_category_select``, ``Hostname_replace``
``enabled_engines`` : optional : *all* :origin:`engines <searx/engines>`
``enabled_engines`` : optional : *all* :origin:`engines <searxng/engines>`
List of enabled engines.
``disabled_engines`` : optional : *all* :origin:`engines <searx/engines>`
``disabled_engines`` : optional : *all* :origin:`engines <searxng/engines>`
List of disabled engines.

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View file

@ -6,7 +6,7 @@ Welcome to SearXNG
.. hint::
This is not searx, but searxng.
This is not searxng, but searxng.
SearXNG is a free internet metasearch engine which aggregates results from more
than 70 search services. Users are neither tracked nor profiled. Additionally,
@ -32,7 +32,7 @@ If you don't trust anyone, you can set up your own, see :ref:`installation`.
user/index
admin/index
dev/index
searx_extra/index
searxng_extra/index
utils/index
src/index

View file

@ -1,9 +0,0 @@
.. _standalone_searx.py:
===================================
``searx_extra/standalone_searx.py``
===================================
.. automodule:: searx_extra.standalone_searx
:members:

View file

@ -1,14 +1,14 @@
.. _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.
.. toctree::
:maxdepth: 2
:caption: Contents
standalone_searx.py
standalone_searxng.py

View file

@ -0,0 +1,9 @@
.. _standalone_searxng.py:
===================================
``searxng_extra/standalone_searxng.py``
===================================
.. automodule:: searxng_extra.standalone_searx
:members:

View file

@ -11,4 +11,4 @@ every item from the source code, but we will add documentation when requested.
:caption: Contents
:glob:
searx.*
searxng.*

View file

@ -1,8 +0,0 @@
.. _searx.locales:
=======
Locales
=======
.. automodule:: searx.locales
:members:

View file

@ -1,38 +0,0 @@
.. _searx.search:
======
Search
======
.. autoclass:: searx.search.EngineRef
:members:
.. autoclass:: searx.search.SearchQuery
:members:
.. autoclass:: searx.search.Search
.. attribute:: search_query
:type: searx.search.SearchQuery
.. attribute:: result_container
:type: searx.results.ResultContainer
.. automethod:: search() -> searx.results.ResultContainer
.. autoclass:: searx.search.SearchWithPlugins
:members:
.. attribute:: search_query
:type: searx.search.SearchQuery
.. attribute:: result_container
:type: searx.results.ResultContainer
.. attribute:: ordered_plugin_list
:type: typing.List
.. attribute:: request
:type: flask.request
.. automethod:: search() -> searx.results.ResultContainer

View file

@ -4,6 +4,6 @@
Demo Offline Engine
===================
.. automodule:: searx.engines.demo_offline
.. automodule:: searxng.engines.demo_offline
:members:

View file

@ -4,6 +4,6 @@
Demo Online Engine
==================
.. automodule:: searx.engines.demo_online
.. automodule:: searxng.engines.demo_online
:members:

View file

@ -27,7 +27,7 @@ Definitions`_. Not all parameters can be appied and some engines are *special*
Google WEB
==========
.. automodule:: searx.engines.google
.. automodule:: searxng.engines.google
:members:
.. _google images engine:
@ -35,7 +35,7 @@ Google WEB
Google Images
=============
.. automodule:: searx.engines.google_images
.. automodule:: searxng.engines.google_images
:members:
.. _google videos engine:
@ -43,7 +43,7 @@ Google Images
Google Videos
=============
.. automodule:: searx.engines.google_videos
.. automodule:: searxng.engines.google_videos
:members:
.. _google news engine:
@ -51,5 +51,5 @@ Google Videos
Google News
===========
.. automodule:: searx.engines.google_news
.. automodule:: searxng.engines.google_news
:members:

View file

@ -4,5 +4,5 @@
Load Engines
============
.. automodule:: searx.engines
.. automodule:: searxng.engines
:members:

View file

@ -0,0 +1,8 @@
.. _searxng.locales:
=======
Locales
=======
.. automodule:: searxng.locales
:members:

View file

@ -0,0 +1,38 @@
.. _searxng.search:
======
Search
======
.. autoclass:: searxng.search.EngineRef
:members:
.. autoclass:: searxng.search.SearchQuery
:members:
.. autoclass:: searxng.search.Search
.. attribute:: search_query
:type: searxng.search.SearchQuery
.. attribute:: result_container
:type: searxng.results.ResultContainer
.. automethod:: search() -> searxng.results.ResultContainer
.. autoclass:: searxng.search.SearchWithPlugins
:members:
.. attribute:: search_query
:type: searxng.search.SearchQuery
.. attribute:: result_container
:type: searxng.results.ResultContainer
.. attribute:: ordered_plugin_list
:type: typing.List
.. attribute:: request
:type: flask.request
.. automethod:: search() -> searxng.results.ResultContainer

View file

@ -7,7 +7,7 @@
.. sidebar:: further reading
- :ref:`searx filtron`
- :ref:`searxng filtron`
- :ref:`architecture`
- :ref:`installation` (:ref:`nginx <installation nginx>` & :ref:`apache
<installation apache>`)

View file

@ -1,4 +1,4 @@
.. _searx_utils:
.. _searxng_utils:
.. _toolboxing:
===================
@ -11,7 +11,7 @@ In the folder :origin:`utils/` we maintain some tools useful for administrators.
:maxdepth: 2
:caption: Contents
searx.sh
searxng.sh
filtron.sh
morty.sh
lxc.sh
@ -36,7 +36,7 @@ Scripts to maintain services often dispose of common commands and environments.
Sets timeout for interactive prompts. If you want to run a script in batch
job, with defaults choices, set ``FORCE_TIMEOUT=0``. By example; to install a
reverse proxy for filtron on all containers of the :ref:`SearXNG suite
<lxc-searx.env>` use ::
<lxc-searxng.env>` use ::
sudo -H ./utils/lxc.sh cmd -- FORCE_TIMEOUT=0 ./utils/filtron.sh apache install

View file

@ -23,7 +23,7 @@
With the use of *Linux Containers* (LXC_) we can scale our tasks over a stack of
containers, what we call the: *lxc suite*. The *SearXNG suite*
(:origin:`lxc-searx.env <utils/lxc-searx.env>`) is loaded by default, every time
(:origin:`lxc-searxng.env <utils/lxc-searxng.env>`) is loaded by default, every time
you start the ``lxc.sh`` script (*you do not need to care about*).
Before you can start with containers, you need to install and initiate LXD_
@ -49,7 +49,7 @@ help>`.
If you do not want to build all containers, **you can build just one**::
$ sudo -H ./utils/lxc.sh build searx-ubu1804
$ sudo -H ./utils/lxc.sh build searxng-ubu1804
*Good to know ...*
@ -62,9 +62,9 @@ of::
In the containers, you can run what ever you want, e.g. to start a bash use::
$ sudo -H ./utils/lxc.sh cmd searx-ubu1804 bash
INFO: [searx-ubu1804] bash
root@searx-ubu1804:/share/searx#
$ sudo -H ./utils/lxc.sh cmd searxng-ubu1804 bash
INFO: [searxng-ubu1804] bash
root@searxng-ubu1804:/share/searxng#
If there comes the time you want to **get rid off all** the containers and
**clean up local images** just type::
@ -120,8 +120,8 @@ Reboot your system and check the iptables rules::
Install suite
=============
To install the complete :ref:`SearXNG suite (includes searx, morty & filtron)
<lxc-searx.env>` into all LXC_ use::
To install the complete :ref:`SearXNG suite (includes searxng, morty & filtron)
<lxc-searxng.env>` into all LXC_ use::
$ sudo -H ./utils/lxc.sh install suite
@ -131,12 +131,12 @@ command. To test instances from containers just open the URLs in your
WEB-Browser::
$ sudo ./utils/lxc.sh show suite | grep filtron
[searx-ubu1604] INFO: (eth0) filtron: http://n.n.n.246:4004/ http://n.n.n.246/searx
[searx-ubu1804] INFO: (eth0) filtron: http://n.n.n.147:4004/ http://n.n.n.147/searx
[searx-ubu1910] INFO: (eth0) filtron: http://n.n.n.140:4004/ http://n.n.n.140/searx
[searx-ubu2004] INFO: (eth0) filtron: http://n.n.n.18:4004/ http://n.n.n.18/searx
[searx-fedora31] INFO: (eth0) filtron: http://n.n.n.46:4004/ http://n.n.n.46/searx
[searx-archlinux] INFO: (eth0) filtron: http://n.n.n.32:4004/ http://n.n.n.32/searx
[searxng-ubu1604] INFO: (eth0) filtron: http://n.n.n.246:4004/ http://n.n.n.246/searxng
[searxng-ubu1804] INFO: (eth0) filtron: http://n.n.n.147:4004/ http://n.n.n.147/searxng
[searxng-ubu1910] INFO: (eth0) filtron: http://n.n.n.140:4004/ http://n.n.n.140/searxng
[searxng-ubu2004] INFO: (eth0) filtron: http://n.n.n.18:4004/ http://n.n.n.18/searxng
[searxng-fedora31] INFO: (eth0) filtron: http://n.n.n.46:4004/ http://n.n.n.46/searxng
[searxng-archlinux] INFO: (eth0) filtron: http://n.n.n.32:4004/ http://n.n.n.32/searxng
To :ref:`install a nginx <installation nginx>` reverse proxy for filtron and
morty use (or alternatively use :ref:`apache <installation apache>`)::
@ -152,8 +152,8 @@ Running commands
:ref:`toolboxing`. By example: to setup a :ref:`buildhosts` and run the
Makefile target ``test`` in the archlinux_ container::
sudo -H ./utils/lxc.sh cmd searx-archlinux ./utils/searx.sh install buildhost
sudo -H ./utils/lxc.sh cmd searx-archlinux make test
sudo -H ./utils/lxc.sh cmd searxng-archlinux ./utils/searxng.sh install buildhost
sudo -H ./utils/lxc.sh cmd searxng-archlinux make test
Setup SearXNG buildhost
@ -164,11 +164,11 @@ The installation procedure to set up a :ref:`build host<buildhosts>` takes its
time. Installation in all containers will take more time (time for another cup
of coffee).::
sudo -H ./utils/lxc.sh cmd -- ./utils/searx.sh install buildhost
sudo -H ./utils/lxc.sh cmd -- ./utils/searxng.sh install buildhost
To build (live) documentation inside a archlinux_ container::
sudo -H ./utils/lxc.sh cmd searx-archlinux make docs.clean docs.live
sudo -H ./utils/lxc.sh cmd searxng-archlinux make docs.clean docs.live
...
[I 200331 15:00:42 server:296] Serving on http://0.0.0.0:8080
@ -176,7 +176,7 @@ To get IP of the container and the port number *live docs* is listening::
$ sudo ./utils/lxc.sh show suite | grep docs.live
...
[searx-archlinux] INFO: (eth0) docs.live: http://n.n.n.12:8080/
[searxng-archlinux] INFO: (eth0) docs.live: http://n.n.n.12:8080/
.. _lxc.sh help:
@ -189,10 +189,10 @@ The ``--help`` output of the script is largely self-explanatory:
.. program-output:: ../utils/lxc.sh --help
.. _lxc-searx.env:
.. _lxc-searxng.env:
SearXNG suite
=============
.. literalinclude:: ../../utils/lxc-searx.env
.. literalinclude:: ../../utils/lxc-searxng.env
:language: bash

View file

@ -14,7 +14,7 @@
- :ref:`architecture`
- :ref:`installation` (:ref:`nginx <installation nginx>` & :ref:`apache
<installation apache>`)
- :ref:`searx morty`
- :ref:`searxng morty`
To simplify installation and maintenance of a morty_ instance you can use the
script :origin:`utils/morty.sh`. In most cases you will install morty_ simply by
@ -37,7 +37,7 @@ into this user account:
.. hint::
To add morty to your SearXNG instance read chapter :ref:`searx morty`.
To add morty to your SearXNG instance read chapter :ref:`searxng morty`.
Create user
===========

View file

@ -1,8 +1,8 @@
.. _searx.sh:
.. _searxng.sh:
==================
``utils/searx.sh``
``utils/searxng.sh``
==================
.. sidebar:: further reading
@ -13,7 +13,7 @@
- :ref:`installation apache`
To simplify installation and maintenance of a SearXNG instance you can use the
script :origin:`utils/searx.sh`.
script :origin:`utils/searxng.sh`.
Install
=======
@ -22,9 +22,9 @@ In most cases you will install SearXNG simply by running the command:
.. code:: bash
sudo -H ./utils/searx.sh install all
sudo -H ./utils/searxng.sh install all
The script adds a ``${SERVICE_USER}`` (default:``searx``) and installs searx
The script adds a ``${SERVICE_USER}`` (default:``searxng``) and installs searxng
into this user account. The installation is described in chapter
:ref:`installation basic`.
@ -36,4 +36,4 @@ Overview
The ``--help`` output of the script is largely self-explanatory
(:ref:`toolboxing common`):
.. program-output:: ../utils/searx.sh --help
.. program-output:: ../utils/searxng.sh --help

144
manage
View file

@ -11,7 +11,7 @@ source "$(dirname "${BASH_SOURCE[0]}")/utils/lib_static.sh"
# config
PYOBJECTS="searx"
PYOBJECTS="searxng"
PY_SETUP_EXTRAS='[test]'
GECKODRIVER_VERSION="v0.28.0"
# SPHINXOPTS=
@ -25,15 +25,15 @@ pylint.FILES() {
# These py files are linted by test.pylint(), all other files are linted by
# test.pep8()
grep -l -r --include \*.py '^#[[:blank:]]*lint:[[:blank:]]*pylint' searx searx_extra tests
grep -l -r --include \*.py '^#[[:blank:]]*lint:[[:blank:]]*pylint' searxng searxng_extra tests
}
YAMLLINT_FILES=()
while IFS= read -r line; do
YAMLLINT_FILES+=("$line")
done <<< "$(git ls-files './tests/*.yml' './searx/*.yml' './utils/templates/etc/searx/*.yml')"
done <<< "$(git ls-files './tests/*.yml' './searxng/*.yml' './utils/templates/etc/searxng/*.yml')"
PYLINT_SEARX_DISABLE_OPTION="\
PYLINT_SEARXNG_DISABLE_OPTION="\
I,C,R,\
W0105,W0212,W0511,W0603,W0613,W0621,W0702,W0703,W1401,\
E1136"
@ -48,9 +48,9 @@ weblate.:
push.translations: push translation changes from SearXNG to Weblate's counterpart
to.translations: Update 'translations' branch with last additions from Weblate.
data.:
all : update searx/languages.py and ./data/*
languages : update searx/data/engines_languages.json & searx/languages.py
useragents: update searx/data/useragents.json with the most recent versions of Firefox.
all : update searxng/languages.py and ./data/*
languages : update searxng/data/engines_languages.json & searxng/languages.py
useragents: update searxng/data/useragents.json with the most recent versions of Firefox.
docs.:
html : build HTML documentation
live : autobuild HTML documentation while editing
@ -70,14 +70,14 @@ py.:
build : Build python packages at ./${PYDIST}
clean : delete virtualenv and intermediate py files
pyenv.:
install : developer install of searx into virtualenv
install : developer install of searxng into virtualenv
uninstall : uninstall developer installation
cmd ... : run command ... in virtualenv
OK : test if virtualenv is OK
pypi.upload:
Upload python packages to PyPi (to test use pypi.upload.test)
test.:
pylint : lint PYLINT_FILES, searx/engines, searx & tests
pylint : lint PYLINT_FILES, searxng/engines, searxng & tests
pep8 : pycodestyle (pep8) for all files except PYLINT_FILES
unit : run unit tests
coverage : run unit tests with coverage
@ -105,17 +105,17 @@ export DOCS_BUILD
buildenv() {
# settings file from repository's working tree are used by default
SEARX_SETTINGS_PATH="${REPO_ROOT}/searx/settings.yml"
SEARXNG_SETTINGS_PATH="${REPO_ROOT}/searxng/settings.yml"
if [ -r '/etc/searx/settings.yml' ]; then
if ask_yn "should settings read from: /etc/searx/settings.yml"; then
SEARX_SETTINGS_PATH='/etc/searx/settings.yml'
if [ -r '/etc/searxng/settings.yml' ]; then
if ask_yn "should settings read from: /etc/searxng/settings.yml"; then
SEARXNG_SETTINGS_PATH='/etc/searxng/settings.yml'
fi
fi
export SEARX_SETTINGS_PATH
export SEARXNG_SETTINGS_PATH
(
set -e
SEARX_DEBUG=1 pyenv.cmd python utils/build_env.py 2>&1 \
SEARXNG_DEBUG=1 pyenv.cmd python utils/build_env.py 2>&1 \
| prefix_stdout "${_Blue}BUILDENV${_creset} "
)
return "${PIPESTATUS[0]}"
@ -202,16 +202,16 @@ weblate.translations.commit() {
weblate.to.translations
# copy the changes to the master branch
cp -rv --preserve=mode,timestamps "${TRANSLATIONS_WORKTREE}/searx/translations" "searx"
cp -rv --preserve=mode,timestamps "${TRANSLATIONS_WORKTREE}/searxng/translations" "searxng"
# compile translations
build_msg BABEL 'compile translation catalogs into binary MO files'
pybabel compile --statistics \
-d "searx/translations"
-d "searxng/translations"
# git add/commit (no push)
commit_body=$(cd "${TRANSLATIONS_WORKTREE}"; git log --pretty=format:'%h - %as - %aN <%ae>' "${existing_commit_hash}..HEAD")
commit_message=$(echo -e "[translations] update\n${commit_body}")
git add searx/translations
git add searxng/translations
git commit -m "${commit_message}"
)
exitcode=$?
@ -228,7 +228,7 @@ weblate.push.translations() {
# (weblate).
# In branch master of SearXNG (origin) check for meaningful changes in
# folder 'searx/translations', commit changes on branch 'translations' and
# folder 'searxng/translations', commit changes on branch 'translations' and
# at least, pull updated branches on Weblate's counterpart (weblate).
# 1. Create git worktree ${TRANSLATIONS_WORKTREE} and checkout branch
@ -241,7 +241,7 @@ weblate.push.translations() {
local messages_pot diff_messages_pot last_commit_hash last_commit_detail \
last_commit_message exitcode
messages_pot="${TRANSLATIONS_WORKTREE}/searx/translations/messages.pot"
messages_pot="${TRANSLATIONS_WORKTREE}/searxng/translations/messages.pot"
( set -e
pyenv.activate
# get translations branch in git worktree (TRANSLATIONS_WORKTREE)
@ -251,11 +251,11 @@ weblate.push.translations() {
build_msg BABEL 'extract messages from source files and generate POT file'
pybabel extract -F babel.cfg \
-o "${messages_pot}" \
"searx/"
"searxng/"
# stop if there is no meaningful change in the master branch
diff_messages_pot=$(cd "${TRANSLATIONS_WORKTREE}";\
git diff -- "searx/translations/messages.pot")
git diff -- "searxng/translations/messages.pot")
if ! echo "$diff_messages_pot" | grep -qE "[\+\-](msgid|msgstr)"; then
build_msg BABEL 'no changes detected, exiting'
return 42
@ -296,7 +296,7 @@ weblate.push.translations() {
build_msg BABEL 'update existing message catalogs from POT file'
pybabel update -N \
-i "${messages_pot}" \
-d "${TRANSLATIONS_WORKTREE}/searx/translations"
-d "${TRANSLATIONS_WORKTREE}/searxng/translations"
# git add/commit/push
last_commit_hash=$(git log -n1 --pretty=format:'%h')
@ -304,7 +304,7 @@ weblate.push.translations() {
last_commit_message="[translations] update messages.pot and messages.po files\nFrom ${last_commit_detail}"
pushd "${TRANSLATIONS_WORKTREE}"
git add searx/translations
git add searxng/translations
git commit -m "${last_commit_message}"
git push
popd
@ -327,12 +327,12 @@ data.all() {
data.languages
data.useragents
data.osm_keys_tags
build_msg DATA "update searx/data/ahmia_blacklist.txt"
python searx_extra/update/update_ahmia_blacklist.py
build_msg DATA "update searx/data/wikidata_units.json"
python searx_extra/update/update_wikidata_units.py
build_msg DATA "update searx/data/currencies.json"
python searx_extra/update/update_currencies.py
build_msg DATA "update searxng/data/ahmia_blacklist.txt"
python searxng_extra/update/update_ahmia_blacklist.py
build_msg DATA "update searxng/data/wikidata_units.json"
python searxng_extra/update/update_wikidata_units.py
build_msg DATA "update searxng/data/currencies.json"
python searxng_extra/update/update_currencies.py
)
}
@ -341,22 +341,22 @@ data.languages() {
( set -e
pyenv.activate
build_msg ENGINES "fetch languages .."
python searx_extra/update/update_languages.py
build_msg ENGINES "update update searx/languages.py"
build_msg DATA "update searx/data/engines_languages.json"
python searxng_extra/update/update_languages.py
build_msg ENGINES "update update searxng/languages.py"
build_msg DATA "update searxng/data/engines_languages.json"
)
dump_return $?
}
data.useragents() {
build_msg DATA "update searx/data/useragents.json"
pyenv.cmd python searx_extra/update/update_firefox_version.py
build_msg DATA "update searxng/data/useragents.json"
pyenv.cmd python searxng_extra/update/update_firefox_version.py
dump_return $?
}
data.osm_keys_tags() {
build_msg DATA "update searx/data/osm_keys_tags.json"
pyenv.cmd python searx_extra/update/update_osm_keys_tags.py
build_msg DATA "update searxng/data/osm_keys_tags.json"
pyenv.cmd python searxng_extra/update/update_osm_keys_tags.py
dump_return $?
}
@ -366,7 +366,7 @@ docs.prebuild() {
set -e
[ "$VERBOSE" = "1" ] && set -x
mkdir -p "${DOCS_BUILD}/includes"
./utils/searx.sh doc | cat > "${DOCS_BUILD}/includes/searx.rst"
./utils/searxng.sh doc | cat > "${DOCS_BUILD}/includes/searxng.rst"
./utils/filtron.sh doc | cat > "${DOCS_BUILD}/includes/filtron.rst"
./utils/morty.sh doc | cat > "${DOCS_BUILD}/includes/morty.rst"
)
@ -385,10 +385,10 @@ docker.buildx() {
docker.build() {
pyenv.install
local SEARX_GIT_VERSION
local SEARXNG_GIT_VERSION
local VERSION_GITCOMMIT
local GITHUB_USER
local SEARX_IMAGE_NAME
local SEARXNG_IMAGE_NAME
local BUILD
build_msg DOCKER build
@ -413,8 +413,8 @@ docker.build() {
# This is a git repository
git update-index -q --refresh
python -m searx.version freeze
eval "$(python -m searx.version)"
python -m searxng.version freeze
eval "$(python -m searxng.version)"
# Get the last git commit id
VERSION_GITCOMMIT=$(echo "$VERSION_STRING" | cut -d- -f3)
@ -422,35 +422,35 @@ docker.build() {
# define the docker image name
GITHUB_USER=$(echo "${GIT_URL}" | sed 's/.*github\.com\/\([^\/]*\).*/\1/')
SEARX_IMAGE_NAME="${SEARX_IMAGE_NAME:-${GITHUB_USER:-searxng}/searxng}"
SEARXNG_IMAGE_NAME="${SEARXNG_IMAGE_NAME:-${GITHUB_USER:-searxng}/searxng}"
BUILD="build"
if [ "$1" = "buildx" ]; then
# buildx includes the push option
CACHE_TAG="${SEARX_IMAGE_NAME}:latest-build-cache"
CACHE_TAG="${SEARXNG_IMAGE_NAME}:latest-build-cache"
BUILD="buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 --push --cache-from=type=registry,ref=$CACHE_TAG --cache-to=type=registry,ref=$CACHE_TAG,mode=max"
shift
fi
build_msg DOCKER "Build command: ${BUILD}"
# build Docker image
build_msg DOCKER "Building image ${SEARX_IMAGE_NAME}:${SEARX_GIT_VERSION}"
build_msg DOCKER "Building image ${SEARXNG_IMAGE_NAME}:${SEARXNG_GIT_VERSION}"
# shellcheck disable=SC2086
docker $BUILD \
--build-arg BASE_IMAGE="${DEPENDENCIES_IMAGE_NAME}" \
--build-arg GIT_URL="${GIT_URL}" \
--build-arg SEARX_GIT_VERSION="${VERSION_STRING}" \
--build-arg SEARXNG_GIT_VERSION="${VERSION_STRING}" \
--build-arg VERSION_GITCOMMIT="${VERSION_GITCOMMIT}" \
--build-arg LABEL_DATE="$(date -u +"%Y-%m-%dT%H:%M:%SZ")" \
--build-arg LABEL_VCS_REF="$(git rev-parse HEAD)" \
--build-arg LABEL_VCS_URL="${GIT_URL}" \
--build-arg TIMESTAMP_SETTINGS="$(git log -1 --format="%cd" --date=unix -- searx/settings.yml)" \
--build-arg TIMESTAMP_SETTINGS="$(git log -1 --format="%cd" --date=unix -- searxng/settings.yml)" \
--build-arg TIMESTAMP_UWSGI="$(git log -1 --format="%cd" --date=unix -- dockerfiles/uwsgi.ini)" \
-t "${SEARX_IMAGE_NAME}:latest" -t "${SEARX_IMAGE_NAME}:${VERSION_STRING}" .
-t "${SEARXNG_IMAGE_NAME}:latest" -t "${SEARXNG_IMAGE_NAME}:${VERSION_STRING}" .
if [ "$1" = "push" ]; then
docker push "${SEARX_IMAGE_NAME}:latest"
docker push "${SEARX_IMAGE_NAME}:${SEARX_GIT_VERSION}"
docker push "${SEARXNG_IMAGE_NAME}:latest"
docker push "${SEARXNG_IMAGE_NAME}:${SEARXNG_GIT_VERSION}"
fi
)
dump_return $?
@ -495,17 +495,17 @@ gecko.driver() {
node.env() {
if ! required_commands npm; then
info_msg "to install build tools use::"
info_msg " sudo -H ./utils/searx.sh install buildhost"
info_msg " sudo -H ./utils/searxng.sh install buildhost"
die 1 "install needed build tools first"
fi
( set -e
build_msg INSTALL "searx/static/themes/oscar/package.json"
npm --prefix searx/static/themes/oscar install
build_msg INSTALL "searxng/static/themes/oscar/package.json"
npm --prefix searxng/static/themes/oscar install
build_msg INSTALL "searx/static/themes/simple/package.json"
npm --prefix searx/static/themes/simple install
build_msg INSTALL "searxng/static/themes/simple/package.json"
npm --prefix searxng/static/themes/simple install
)
dump_return $?
}
@ -517,15 +517,15 @@ node.clean() {
fi
build_msg CLEAN "locally installed npm dependencies"
( set -e
npm --prefix searx/static/themes/oscar run clean
npm --prefix searx/static/themes/simple run clean
npm --prefix searxng/static/themes/oscar run clean
npm --prefix searxng/static/themes/simple run clean
)
dump_return $?
}
pygments.less() {
build_msg PYGMENTS "searx_extra/update/update_pygments.py"
if ! pyenv.cmd python searx_extra/update/update_pygments.py; then
build_msg PYGMENTS "searxng_extra/update/update_pygments.py"
if ! pyenv.cmd python searxng_extra/update/update_pygments.py; then
build_msg PYGMENTS "building LESS files for pygments failed"
return 1
fi
@ -569,7 +569,7 @@ pyenv.install() {
( set -e
pyenv
build_msg PYENV "[install] pip install -e 'searx${PY_SETUP_EXTRAS}'"
build_msg PYENV "[install] pip install -e 'searxng${PY_SETUP_EXTRAS}'"
"${PY_ENV_BIN}/python" -m pip install -e ".${PY_SETUP_EXTRAS}"
buildenv
)
@ -613,17 +613,17 @@ test.pylint() {
--additional-builtins="${PYLINT_ADDITIONAL_BUILTINS_FOR_ENGINES}" \
"${PYLINT_FILES[@]}"
build_msg TEST "[pylint] searx/engines"
build_msg TEST "[pylint] searxng/engines"
python ${PYLINT_OPTIONS} ${PYLINT_VERBOSE} \
--disable="${PYLINT_SEARX_DISABLE_OPTION}" \
--disable="${PYLINT_SEARXNG_DISABLE_OPTION}" \
--additional-builtins="${PYLINT_ADDITIONAL_BUILTINS_FOR_ENGINES}" \
searx/engines
searxng/engines
build_msg TEST "[pylint] searx tests"
build_msg TEST "[pylint] searxng tests"
python ${PYLINT_OPTIONS} ${PYLINT_VERBOSE} \
--disable="${PYLINT_SEARX_DISABLE_OPTION}" \
--ignore=searx/engines \
searx tests
--disable="${PYLINT_SEARXNG_DISABLE_OPTION}" \
--ignore=searxng/engines \
searxng tests
)
dump_return $?
}
@ -633,10 +633,10 @@ test.pep8() {
local _exclude=""
printf -v _exclude '%s, ' "${PYLINT_FILES[@]}"
pyenv.cmd pycodestyle \
--exclude="searx/static, searx/languages.py, $_exclude " \
--exclude="searxng/static, searxng/languages.py, $_exclude " \
--max-line-length=120 \
--ignore "E117,E252,E402,E722,E741,W503,W504,W605" \
searx tests
searxng tests
dump_return $?
}
@ -650,7 +650,7 @@ test.coverage() {
build_msg TEST 'unit test coverage'
( set -e
pyenv.activate
python -m nose2 -C --log-capture --with-coverage --coverage searx -s tests/unit
python -m nose2 -C --log-capture --with-coverage --coverage searxng -s tests/unit
coverage report
coverage html
)
@ -682,13 +682,13 @@ themes.all() {
themes.oscar() {
build_msg GRUNT "theme: oscar"
npm --prefix searx/static/themes/oscar run build
npm --prefix searxng/static/themes/oscar run build
dump_return $?
}
themes.simple() {
build_msg GRUNT "theme: simple"
npm --prefix searx/static/themes/simple run build
npm --prefix searxng/static/themes/simple run build
dump_return $?
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1 +0,0 @@
js/searx_src/autocomplete.js

View file

@ -1,2 +0,0 @@
(function(t,e){"use strict";var a=e.currentScript||function(){var t=e.getElementsByTagName("script");return t[t.length-1]}();t.searx={touch:"ontouchstart"in t||t.DocumentTouch&&document instanceof DocumentTouch||false,method:a.getAttribute("data-method"),autocompleter:a.getAttribute("data-autocompleter")==="true",search_on_category_select:a.getAttribute("data-search-on-category-select")==="true",infinite_scroll:a.getAttribute("data-infinite-scroll")==="true",static_path:a.getAttribute("data-static-path"),translations:JSON.parse(a.getAttribute("data-translations"))};e.getElementsByTagName("html")[0].className=t.searx.touch?"js touch":"js"})(window,document);
//# sourceMappingURL=searx.head.min.js.map

View file

@ -1 +0,0 @@
{"version":3,"file":"searx.head.min.js","sources":["searx.head.js"],"names":["w","d","script","currentScript","scripts","getElementsByTagName","length","searx","touch","DocumentTouch","document","method","getAttribute","autocompleter","search_on_category_select","infinite_scroll","static_path","translations","JSON","parse","className","window"],"mappings":"CAkBA,SAAUA,EAAGC,gBAIT,IAAIC,EAASD,EAAEE,eAAkB,WAC7B,IAAIC,EAAUH,EAAEI,qBAAqB,UACrC,OAAOD,EAAQA,EAAQE,OAAS,GAFH,GAMjCN,EAAEO,MAAQ,CACNC,MAAS,iBAAkBR,GAAMA,EAAES,eAAiBC,oBAAoBD,eAAkB,MAC1FE,OAAQT,EAAOU,aAAa,eAC5BC,cAAeX,EAAOU,aAAa,wBAA0B,OAC7DE,0BAA2BZ,EAAOU,aAAa,oCAAsC,OACrFG,gBAAiBb,EAAOU,aAAa,0BAA4B,OACjEI,YAAad,EAAOU,aAAa,oBACjCK,aAAcC,KAAKC,MAAMjB,EAAOU,aAAa,uBAIjDX,EAAEI,qBAAqB,QAAQ,GAAGe,UAAapB,EAAEO,MAAW,MAAE,WAAW,MArB7E,CAsBGc,OAAQX"}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

Some files were not shown because too many files have changed in this diff Show more