on master help sign in
802 files changed+136647−43066
since splitsnapshots
unifiedsplit
.config.mk−13 .config.sh+23−20 .coveragerc+1−10 .dir-locals.el+1−1 .dockerignore+16−1 .github/ISSUE_TEMPLATE/bug-report.md+39 .github/ISSUE_TEMPLATE/config.yml+14 .github/ISSUE_TEMPLATE/engine-request.md+31 .github/ISSUE_TEMPLATE/feature-request.md+21 .github/dependabot.yml+10 .github/workflows/data-update.yml+66 .github/workflows/integration.yml+151 .gitignore+4−1 .pylintrc+2−2 .travis.yml−56 AUTHORS.rst+48−5 CHANGELOG.rst+336−3 CONTRIBUTING.md+49 Dockerfile+26−18 Makefile+77−96 PULL_REQUEST_TEMPLATE.md+25 README.rst+53−43 dockerfiles/docker-entrypoint.sh+33−20 dockerfiles/uwsgi.ini+10 docs/admin/arch_public.dot+4−4 docs/admin/architecture.rst+8−6 docs/admin/buildhosts.rst+24−9 docs/admin/engines.rst+29−12 docs/admin/engines/recoll.rst+50 docs/admin/filtron.rst+103−96 docs/admin/installation-apache.rst+462−42 docs/admin/installation-docker.rst+39−7 docs/admin/installation-nginx.rst+105−56 docs/admin/installation-searx.rst+43−13 docs/admin/installation-uwsgi.rst+13−12 docs/admin/installation.rst+30−11 docs/admin/morty.rst+15−4 docs/admin/plugins.rst+1−1 docs/admin/settings.rst+276−69 docs/admin/update-searx.rst+46−10 docs/blog/command-line-engines.rst+65 docs/blog/index.rst+7−2 docs/blog/lxcdev-202006.rst+413 docs/blog/private-engines.rst+3−1 docs/blog/python3.rst+1−1 docs/blog/search-database-engines.rst+95 docs/blog/search-indexer-engines.rst+114 docs/blog/sql-engines.rst+117 docs/build-templates/filtron.rst+52 docs/build-templates/morty.rst+52 docs/build-templates/searx.rst+68−17 docs/conf.py+39−26 docs/dev/contribution_guide.rst+29−25 docs/dev/engine_overview.rst+70−31 docs/dev/makefile.rst+127−130 docs/dev/plugins.rst+15 docs/dev/quickstart.rst+26−103 docs/dev/reST.rst+35−26 docs/dev/search_api.rst+4−4 docs/index.rst+1 docs/searx_extra/index.rst+14 docs/searx_extra/standalone_searx.py.rst+9 docs/user/own-instance.rst+5−5 docs/user/search_syntax.rst+24 docs/utils/filtron.sh.rst+25−21 docs/utils/index.rst+19−11 docs/utils/lxc.sh.rst+149 docs/utils/morty.sh.rst+43−2 docs/utils/searx.sh.rst+3−37 manage+504 manage.sh−275 requirements-dev.txt+19−18 requirements.txt+16−12 searx/__init__.py+53−41 searx/answerers/__init__.py+2−6 searx/answerers/random/answerer.py+13−19 searx/answerers/statistics/answerer.py+6−9 searx/autocomplete.py+40−92 searx/data/__init__.py+50 searx/data/ahmia_blacklist.txt+35730 searx/data/currencies.json+14643−7619 searx/data/engines_languages.json+1112−858 searx/data/external_bangs.json+19068 searx/data/external_urls.json+156 searx/data/osm_keys_tags.json+15416 searx/data/useragents.json+5−7 searx/data/wikidata_units.json+1223 searx/engines/1337x.py+23−9 searx/engines/__init__.py+58−24 searx/engines/acgsou.py−75 searx/engines/ahmia.py+85 searx/engines/apkmirror.py+33−26 searx/engines/archlinux.py+17−14 searx/engines/arxiv.py+23−25 searx/engines/bandcamp.py+73 searx/engines/base.py+13−17 searx/engines/bing.py+15−18 searx/engines/bing_images.py+22−23 searx/engines/bing_news.py+21−19 searx/engines/bing_videos.py+14−11 searx/engines/btdigg.py+16−12 searx/engines/ccengine.py+53 searx/engines/command.py+172 searx/engines/core.py+82 searx/engines/currency_convert.py+18−63 searx/engines/dailymotion.py+12−12 searx/engines/deezer.py+13−10 searx/engines/deviantart.py+50−54 searx/engines/dictzone.py+21−29 searx/engines/digbt.py+13−15 searx/engines/digg.py+45−45 searx/engines/doku.py+16−14 searx/engines/duckduckgo.py+118−75 searx/engines/duckduckgo_definitions.py+172−82 searx/engines/duckduckgo_images.py+21−24 searx/engines/duden.py+31−34 searx/engines/dummy-offline.py+11−3 searx/engines/dummy.py+11−3 searx/engines/ebay.py+73 searx/engines/elasticsearch.py+144 searx/engines/etools.py+13−11 searx/engines/faroo.py−96 searx/engines/fdroid.py+13−9 searx/engines/filecrop.py−88 searx/engines/flickr.py+12−10 searx/engines/flickr_noapi.py+17−20 searx/engines/framalibre.py+14−14 searx/engines/freesound.py+69 searx/engines/frinkiac.py+16−9 searx/engines/genius.py+19−18 searx/engines/gentoo.py+14−13 searx/engines/gigablast.py+105−96 searx/engines/github.py+13−10 searx/engines/google.py+280−330 searx/engines/google_images.py+183−71 searx/engines/google_news.py+168−58 searx/engines/google_scholar.py+156 searx/engines/google_videos.py+174−70 searx/engines/imdb.py+55 searx/engines/ina.py+18−23 searx/engines/invidious.py+38−16 searx/engines/json_engine.py+19−12 searx/engines/kickass.py+13−11 searx/engines/loc.py+68 searx/engines/mediathekviewweb.py+68 searx/engines/mediawiki.py+14−14 searx/engines/meilisearch.py+59 searx/engines/microsoft_academic.py+37−41 searx/engines/mixcloud.py+12−9 searx/engines/mongodb.py+61 searx/engines/mysql_server.py+62 searx/engines/nyaa.py+13−10 searx/engines/onesearch.py+57 searx/engines/opensemantic.py+46 searx/engines/openstreetmap.py+418−72 searx/engines/pdbe.py+11−8 searx/engines/peertube.py+96 searx/engines/photon.py+13−11 searx/engines/piratebay.py+72−67 searx/engines/postgresql.py+69 searx/engines/prowlarr.py+80 searx/engines/pubmed.py+17−13 searx/engines/qwant.py+199−88 searx/engines/recoll.py+111 searx/engines/reddit.py+12−9 searx/engines/redis_server.py+69 searx/engines/rumble.py+81 searx/engines/scanr_structures.py+12−9 searx/engines/searchcode_code.py+13−11 searx/engines/searchcode_doc.py−49 searx/engines/searx_engine.py+10−8 searx/engines/seedpeer.py−78 searx/engines/semantic_scholar.py+42 searx/engines/sepiasearch.py+102 searx/engines/seznam.py+66 searx/engines/sjp.py+92 searx/engines/solidtorrents.py+53 searx/engines/solr.py+74 searx/engines/soundcloud.py+16−18 searx/engines/spotify.py+18−14 searx/engines/springer.py+74 searx/engines/sqlite.py+51 searx/engines/stackexchange.py+67 searx/engines/stackoverflow.py−57 searx/engines/startpage.py+172−34 searx/engines/tineye.py+86 searx/engines/tokyotoshokan.py+13−11 searx/engines/torrentz.py+16−15 searx/engines/translated.py+18−35 searx/engines/twitter.py−87 searx/engines/unsplash.py+12−9 searx/engines/vimeo.py+15−14 searx/engines/wikidata.py+647−453 searx/engines/wikipedia.py+47−74 searx/engines/wolframalpha_api.py+24−19 searx/engines/wolframalpha_noapi.py+17−12 searx/engines/wordnik.py+77 searx/engines/www1x.py+21−22 searx/engines/xpath.py+41−81 searx/engines/xpath_flex.py+121 searx/engines/yacy.py+23−17 searx/engines/yahoo.py+104−102 searx/engines/yahoo_news.py+84−83 searx/engines/yandex.py−64 searx/engines/yggtorrent.py+128 searx/engines/youtube_api.py+19−11 searx/engines/youtube_noapi.py+90−20 searx/exceptions.py+71−1 searx/external_bang.py+89 searx/external_urls.py+89 searx/languages.py+69−73 searx/metrology/__init__.py searx/metrology/error_recorder.py+144 searx/network/__init__.py+188 searx/network/client.py+219 searx/network/network.py+358 searx/network/raise_for_httperror.py+66 searx/plugins/__init__.py+110−9 searx/plugins/ahmia_filter.py+33 searx/plugins/hash_plugin.py+54 searx/plugins/hostname_replace.py+28 searx/plugins/https_rewrite.py+1−4 searx/plugins/oa_doi_rewrite.py+3−3 searx/plugins/open_results_on_new_tab.py−25 searx/plugins/self_info.py+5−7 searx/plugins/tracker_url_remover.py+2−1 searx/poolrequests.py−159 searx/preferences.py+73−29 searx/query.py+297−160 searx/results.py+93−54 searx/search.py−550 searx/search/__init__.py+216 searx/search/checker/__init__.py+4 searx/search/checker/__main__.py+95 searx/search/checker/background.py+125 searx/search/checker/impl.py+416 searx/search/models.py+71 searx/search/processors/__init__.py+41 searx/search/processors/abstract.py+52 searx/search/processors/offline.py+51 searx/search/processors/online.py+262 searx/search/processors/online_currency.py+69 searx/search/processors/online_dictionary.py+55 searx/settings.yml+1104−134 searx/settings_loader.py+132 searx/settings_robot.yml+12−3 searx/shared/__init__.py+31 searx/shared/shared_abstract.py+21 searx/shared/shared_simple.py+39 searx/shared/shared_uwsgi.py+64 searx/static/css/bootstrap.min.css−1 searx/static/fonts/glyphicons-halflings-regular.eot searx/static/fonts/glyphicons-halflings-regular.svg−229 searx/static/fonts/glyphicons-halflings-regular.ttf searx/static/fonts/glyphicons-halflings-regular.woff searx/static/js/bootstrap.min.js−6 searx/static/js/html5shiv.min.js−4 searx/static/js/jquery-1.11.1.min.js−4 searx/static/js/mootools-autocompleter-1.1.2-min.js−2 searx/static/js/mootools-core-1.4.5-min.js−491 searx/static/js/require-2.1.15.min.js−36 searx/static/js/respond.min.js−5 searx/static/js/typeahead.bundle.min.js−7 searx/static/less/bootstrap/.csscomb.json−297 searx/static/less/bootstrap/.csslintrc−19 searx/static/less/bootstrap/alerts.less−68 searx/static/less/bootstrap/badges.less−55 searx/static/less/bootstrap/bootstrap.less−53 searx/static/less/bootstrap/breadcrumbs.less−26 searx/static/less/bootstrap/button-groups.less−240 searx/static/less/bootstrap/buttons.less−157 searx/static/less/bootstrap/carousel.less−243 searx/static/less/bootstrap/close.less−33 searx/static/less/bootstrap/code.less−68 searx/static/less/bootstrap/component-animations.less−31 searx/static/less/bootstrap/dropdowns.less−215 searx/static/less/bootstrap/forms.less−540 searx/static/less/bootstrap/glyphicons.less−233 searx/static/less/bootstrap/grid.less−84 searx/static/less/bootstrap/input-groups.less−166 searx/static/less/bootstrap/jumbotron.less−48 searx/static/less/bootstrap/labels.less−64 searx/static/less/bootstrap/list-group.less−131 searx/static/less/bootstrap/media.less−56 searx/static/less/bootstrap/mixins.less−39 searx/static/less/bootstrap/mixins/alerts.less−14 searx/static/less/bootstrap/mixins/background-variant.less−8 searx/static/less/bootstrap/mixins/border-radius.less−18 searx/static/less/bootstrap/mixins/buttons.less−50 searx/static/less/bootstrap/mixins/center-block.less−7 searx/static/less/bootstrap/mixins/clearfix.less−22 searx/static/less/bootstrap/mixins/forms.less−81 searx/static/less/bootstrap/mixins/gradients.less−59 searx/static/less/bootstrap/mixins/grid-framework.less−91 searx/static/less/bootstrap/mixins/grid.less−122 searx/static/less/bootstrap/mixins/hide-text.less−21 searx/static/less/bootstrap/mixins/image.less−34 searx/static/less/bootstrap/mixins/labels.less−12 searx/static/less/bootstrap/mixins/list-group.less−29 searx/static/less/bootstrap/mixins/nav-divider.less−10 searx/static/less/bootstrap/mixins/nav-vertical-align.less−9 searx/static/less/bootstrap/mixins/opacity.less−8 searx/static/less/bootstrap/mixins/pagination.less−23 searx/static/less/bootstrap/mixins/panels.less−24 searx/static/less/bootstrap/mixins/progress-bar.less−10 searx/static/less/bootstrap/mixins/reset-filter.less−8 searx/static/less/bootstrap/mixins/resize.less−6 searx/static/less/bootstrap/mixins/responsive-visibility.less−15 searx/static/less/bootstrap/mixins/size.less−10 searx/static/less/bootstrap/mixins/tab-focus.less−9 searx/static/less/bootstrap/mixins/table-row.less−28 searx/static/less/bootstrap/mixins/text-emphasis.less−8 searx/static/less/bootstrap/mixins/text-overflow.less−8 searx/static/less/bootstrap/mixins/vendor-prefixes.less−224 searx/static/less/bootstrap/modals.less−150 searx/static/less/bootstrap/navbar.less−655 searx/static/less/bootstrap/navs.less−242 searx/static/less/bootstrap/normalize.less−425 searx/static/less/bootstrap/pager.less−55 searx/static/less/bootstrap/pagination.less−88 searx/static/less/bootstrap/panels.less−243 searx/static/less/bootstrap/popovers.less−133 searx/static/less/bootstrap/print.less−101 searx/static/less/bootstrap/progress-bars.less−105 searx/static/less/bootstrap/responsive-embed.less−34 searx/static/less/bootstrap/responsive-utilities.less−194 searx/static/less/bootstrap/scaffolding.less−150 searx/static/less/bootstrap/tables.less−233 searx/static/less/bootstrap/theme.less−258 searx/static/less/bootstrap/thumbnails.less−36 searx/static/less/bootstrap/tooltip.less−95 searx/static/less/bootstrap/type.less−313 searx/static/less/bootstrap/typeahead.less−153 searx/static/less/bootstrap/utilities.less−57 searx/static/less/bootstrap/variables.less−846 searx/static/less/bootstrap/wells.less−29 searx/static/plugins/external_plugins/.gitignore+3 searx/static/plugins/js/infinite_scroll.js+33−17 searx/static/plugins/js/open_results_on_new_tab.js−3 searx/static/plugins/js/search_on_category_select.js+18 searx/static/themes/simple/js/searx_src/searx_imageresult.js → searx/static/themes/__common__/js/image_layout.js+61−49 searx/static/themes/courgette/css/style-rtl.css−1 searx/static/themes/courgette/css/style.css−1 searx/static/themes/courgette/img/bg-body-index.jpg searx/static/themes/courgette/img/favicon.png searx/static/themes/courgette/img/github_ribbon.png searx/static/themes/courgette/img/icons/icon_500px.ico searx/static/themes/courgette/img/icons/icon_bing.ico searx/static/themes/courgette/img/icons/icon_dailymotion.ico searx/static/themes/courgette/img/icons/icon_deezer.ico searx/static/themes/courgette/img/icons/icon_deviantart.ico searx/static/themes/courgette/img/icons/icon_digg.ico searx/static/themes/courgette/img/icons/icon_duckduckgo.ico searx/static/themes/courgette/img/icons/icon_flickr.ico searx/static/themes/courgette/img/icons/icon_github.ico searx/static/themes/courgette/img/icons/icon_google play apps.ico searx/static/themes/courgette/img/icons/icon_google play movies.ico searx/static/themes/courgette/img/icons/icon_google play music.ico searx/static/themes/courgette/img/icons/icon_google.ico searx/static/themes/courgette/img/icons/icon_kickass.ico searx/static/themes/courgette/img/icons/icon_openstreetmap.ico searx/static/themes/courgette/img/icons/icon_searchcode code.ico searx/static/themes/courgette/img/icons/icon_searchcode doc.ico searx/static/themes/courgette/img/icons/icon_searchcode.ico searx/static/themes/courgette/img/icons/icon_soundcloud.ico searx/static/themes/courgette/img/icons/icon_stackoverflow.ico searx/static/themes/courgette/img/icons/icon_startpage.ico searx/static/themes/courgette/img/icons/icon_subtitleseeker.ico searx/static/themes/courgette/img/icons/icon_twitter.ico searx/static/themes/courgette/img/icons/icon_vimeo.ico searx/static/themes/courgette/img/icons/icon_wikipedia.ico searx/static/themes/courgette/img/icons/icon_yahoo.ico searx/static/themes/courgette/img/icons/icon_youtube.ico searx/static/themes/courgette/img/preference-icon.png searx/static/themes/courgette/img/search-icon.png searx/static/themes/courgette/img/searx-mobile.png searx/static/themes/courgette/img/searx.png searx/static/themes/courgette/img/searx_logo.svg−203 searx/static/themes/courgette/js/searx.js−45 searx/static/themes/courgette/less/style-rtl.less−42 searx/static/themes/courgette/less/style.less−695 searx/static/themes/legacy/css/style-rtl.css−1 searx/static/themes/legacy/css/style.css−1 searx/static/themes/legacy/img/favicon.png searx/static/themes/legacy/img/github_ribbon.png searx/static/themes/legacy/img/icons/icon_500px.ico searx/static/themes/legacy/img/icons/icon_bing.ico searx/static/themes/legacy/img/icons/icon_dailymotion.ico searx/static/themes/legacy/img/icons/icon_deezer.ico searx/static/themes/legacy/img/icons/icon_deviantart.ico searx/static/themes/legacy/img/icons/icon_digg.ico searx/static/themes/legacy/img/icons/icon_duckduckgo.ico searx/static/themes/legacy/img/icons/icon_flickr.ico searx/static/themes/legacy/img/icons/icon_github.ico searx/static/themes/legacy/img/icons/icon_google play apps.ico searx/static/themes/legacy/img/icons/icon_google play movies.ico searx/static/themes/legacy/img/icons/icon_google play music.ico searx/static/themes/legacy/img/icons/icon_google.ico searx/static/themes/legacy/img/icons/icon_kickass.ico searx/static/themes/legacy/img/icons/icon_openstreetmap.ico searx/static/themes/legacy/img/icons/icon_searchcode code.ico searx/static/themes/legacy/img/icons/icon_searchcode doc.ico searx/static/themes/legacy/img/icons/icon_searchcode.ico searx/static/themes/legacy/img/icons/icon_soundcloud.ico searx/static/themes/legacy/img/icons/icon_stackoverflow.ico searx/static/themes/legacy/img/icons/icon_startpage.ico searx/static/themes/legacy/img/icons/icon_subtitleseeker.ico searx/static/themes/legacy/img/icons/icon_twitter.ico searx/static/themes/legacy/img/icons/icon_vimeo.ico searx/static/themes/legacy/img/icons/icon_wikipedia.ico searx/static/themes/legacy/img/icons/icon_yahoo.ico searx/static/themes/legacy/img/icons/icon_youtube.ico searx/static/themes/legacy/img/preference-icon.png searx/static/themes/legacy/img/search-icon.png searx/static/themes/legacy/img/searx.png searx/static/themes/legacy/img/searx_logo.svg−203 searx/static/themes/legacy/js/searx.js−49 searx/static/themes/legacy/less/autocompleter.less−61 searx/static/themes/legacy/less/code.less−83 searx/static/themes/legacy/less/definitions.less−119 searx/static/themes/legacy/less/mixins.less−27 searx/static/themes/legacy/less/search.less−68 searx/static/themes/legacy/less/style-rtl.less−11 searx/static/themes/legacy/less/style.less−743 searx/static/themes/oscar/.gitignore+1−1 searx/static/themes/oscar/README.rst+39 searx/static/themes/oscar/css/bootstrap-theme.css+587 searx/static/themes/oscar/css/bootstrap-theme.min.css+6 searx/static/themes/oscar/css/bootstrap-theme.min.css.map+1 searx/static/themes/oscar/css/bootstrap.css+6990 searx/static/themes/oscar/css/bootstrap.min.css+5 searx/static/themes/oscar/css/bootstrap.min.css.map+1 searx/static/themes/oscar/css/images/layers-2x.png searx/static/themes/oscar/css/images/layers.png searx/static/themes/oscar/css/images/marker-icon-2x.png searx/static/themes/oscar/css/images/marker-icon.png searx/static/themes/oscar/css/images/marker-shadow.png searx/static/themes/oscar/css/leaflet.css+640 searx/static/themes/oscar/css/leaflet.min.css+1−93 searx/static/themes/oscar/css/leaflet.min.css.map+1 searx/static/themes/oscar/css/logicodev-dark.css+383−179 searx/static/themes/oscar/css/logicodev-dark.min.css+1−1 searx/static/themes/oscar/css/logicodev-dark.min.css.map+1 searx/static/themes/oscar/css/logicodev.css+396−182 searx/static/themes/oscar/css/logicodev.min.css+1−1 searx/static/themes/oscar/css/logicodev.min.css.map+1 searx/static/themes/oscar/css/pointhi.css+235−104 searx/static/themes/oscar/css/pointhi.min.css+1−1 searx/static/themes/oscar/css/pointhi.min.css.map+1 searx/static/themes/oscar/fonts/glyphicons-halflings-regular.eot searx/static/themes/oscar/fonts/glyphicons-halflings-regular.svg+288 searx/static/themes/oscar/fonts/glyphicons-halflings-regular.ttf searx/static/themes/oscar/fonts/glyphicons-halflings-regular.woff searx/static/themes/oscar/fonts/glyphicons-halflings-regular.woff2 searx/static/themes/oscar/gruntfile.js+88−32 searx/static/themes/oscar/img/icons/bandcamp.png searx/static/themes/oscar/img/map/layers-2x.png searx/static/themes/oscar/img/map/layers.png searx/static/themes/oscar/img/map/marker-icon-2x-green.png searx/static/themes/oscar/img/map/marker-icon-2x-orange.png searx/static/themes/oscar/img/map/marker-icon-2x-red.png searx/static/themes/oscar/img/map/marker-icon-2x.png searx/static/themes/oscar/img/map/marker-icon-green.png searx/static/themes/oscar/img/map/marker-icon-orange.png searx/static/themes/oscar/img/map/marker-icon-red.png searx/static/themes/oscar/img/map/marker-icon.png searx/static/themes/oscar/img/map/marker-shadow.png searx/static/themes/oscar/js/bootstrap.bundle.min.js+7 searx/static/themes/oscar/js/bootstrap.min.js+6 searx/static/themes/oscar/js/jquery.min.js+2 searx/static/themes/oscar/js/leaflet-0.7.3.min.js−9 searx/static/themes/oscar/js/leaflet.js+6 searx/static/themes/oscar/js/searx.js+274−156 searx/static/themes/oscar/js/searx.min.js+4−2 searx/static/themes/oscar/js/searx.min.js.map+1 searx/static/themes/oscar/js/searx_src/00_requirejs_config.js−23 searx/static/themes/oscar/js/searx_src/autocompleter.js−37 searx/static/themes/oscar/js/searx_src/leaflet_map.js−167 searx/static/themes/oscar/js/typeahead.bundle.min.js+9 searx/static/themes/oscar/less/logicodev/code.less−101 searx/static/themes/oscar/less/logicodev/infobox.less−37 searx/static/themes/oscar/less/logicodev/preferences.less−3 searx/static/themes/oscar/less/logicodev/search.less−80 searx/static/themes/oscar/less/pointhi/code.less−79 searx/static/themes/oscar/less/pointhi/infobox.less−11 searx/static/themes/oscar/less/pointhi/preferences.less−3 searx/static/themes/oscar/package.json+14−6 searx/static/themes/oscar/js/searx_src/01_init.js → searx/static/themes/oscar/src/js/01_init.js+5−1 searx/static/themes/oscar/src/js/autocompleter.js+60 searx/static/themes/oscar/js/searx_src/element_modifiers.js → searx/static/themes/oscar/src/js/element_modifiers.js+18 searx/static/themes/oscar/src/js/infobox.js+11 searx/static/themes/oscar/src/js/leaflet_map.js+79 searx/static/themes/oscar/src/js/toggleall.js+10 searx/static/themes/oscar/src/less/bootstrap/bootstrap.less+3 searx/static/themes/oscar/src/less/bootstrap/typeahead.less+154 searx/static/themes/oscar/less/logicodev-dark/oscar.less → searx/static/themes/oscar/src/less/logicodev-dark/oscar.less+16−4 searx/static/themes/oscar/less/logicodev/advanced.less → searx/static/themes/oscar/src/less/logicodev/advanced.less+2−2 searx/static/themes/oscar/less/logicodev/checkbox.less → searx/static/themes/oscar/src/less/logicodev/checkbox.less searx/static/themes/oscar/src/less/logicodev/code.less+14 searx/static/themes/oscar/less/logicodev/cursor.less → searx/static/themes/oscar/src/less/logicodev/cursor.less searx/static/themes/oscar/less/logicodev/footer.less → searx/static/themes/oscar/src/less/logicodev/footer.less searx/static/themes/oscar/src/less/logicodev/infobox.less+92 searx/static/themes/oscar/less/logicodev/navbar.less → searx/static/themes/oscar/src/less/logicodev/navbar.less searx/static/themes/oscar/less/logicodev/onoff.less → searx/static/themes/oscar/src/less/logicodev/onoff.less+19−2 searx/static/themes/oscar/less/logicodev/oscar.less → searx/static/themes/oscar/src/less/logicodev/oscar.less searx/static/themes/oscar/src/less/logicodev/preferences.less+31 searx/static/themes/oscar/src/less/logicodev/pygments.less+99 searx/static/themes/oscar/less/logicodev/results.less → searx/static/themes/oscar/src/less/logicodev/results.less+89−9 searx/static/themes/oscar/src/less/logicodev/search.less+98 searx/static/themes/oscar/less/logicodev/variables.less → searx/static/themes/oscar/src/less/logicodev/variables.less+6−3 searx/static/themes/oscar/less/pointhi/advanced.less → searx/static/themes/oscar/src/less/pointhi/advanced.less searx/static/themes/oscar/less/pointhi/checkbox.less → searx/static/themes/oscar/src/less/pointhi/checkbox.less searx/static/themes/oscar/src/less/pointhi/code.less+2 searx/static/themes/oscar/less/pointhi/cursor.less → searx/static/themes/oscar/src/less/pointhi/cursor.less searx/static/themes/oscar/less/pointhi/footer.less → searx/static/themes/oscar/src/less/pointhi/footer.less searx/static/themes/oscar/src/less/pointhi/infobox.less+62 searx/static/themes/oscar/less/pointhi/navbar.less → searx/static/themes/oscar/src/less/pointhi/navbar.less searx/static/themes/oscar/less/pointhi/onoff.less → searx/static/themes/oscar/src/less/pointhi/onoff.less searx/static/themes/oscar/less/pointhi/oscar.less → searx/static/themes/oscar/src/less/pointhi/oscar.less+2 searx/static/themes/oscar/src/less/pointhi/preferences.less+19 searx/static/themes/oscar/src/less/pointhi/pygments.less+99 searx/static/themes/oscar/less/pointhi/results.less → searx/static/themes/oscar/src/less/pointhi/results.less+4 searx/static/themes/oscar/less/pointhi/search.less → searx/static/themes/oscar/src/less/pointhi/search.less+10 searx/static/themes/pix-art/css/style.css−1 searx/static/themes/pix-art/img/favicon.png searx/static/themes/pix-art/img/preference-icon-pixel.png searx/static/themes/pix-art/img/search-icon-pixel.png searx/static/themes/pix-art/img/searx-pixel-small.png searx/static/themes/pix-art/img/searx-pixel.png searx/static/themes/pix-art/js/searx.js−141 searx/static/themes/pix-art/less/definitions.less−119 searx/static/themes/pix-art/less/mixins.less−27 searx/static/themes/pix-art/less/search.less−57 searx/static/themes/pix-art/less/style.less−451 searx/static/themes/simple/.gitignore+1 searx/static/themes/simple/css/searx-rtl.css+167−83 searx/static/themes/simple/css/searx-rtl.min.css+1−1 searx/static/themes/simple/css/searx.css+167−83 searx/static/themes/simple/css/searx.min.css+1−1 searx/static/themes/simple/gruntfile.js+5−5 searx/static/themes/simple/js/searx.head.js+1−1 searx/static/themes/simple/js/searx.head.min.js+2−2 searx/static/themes/simple/js/searx.head.min.js.map+1−1 searx/static/themes/simple/js/searx.js+169−240 searx/static/themes/simple/js/searx.min.js+5−4 searx/static/themes/simple/js/searx.min.js.map+1−1 searx/static/themes/simple/js/searx_head/00_init.js+1−1 searx/static/themes/simple/js/searx_src/searx_mapresult.js−87 searx/static/themes/simple/js/searx_src/searx_results.js+1−1 searx/static/themes/simple/js/searx_src/searx_search.js+5−1 searx/static/themes/simple/less/code.less+5−80 searx/static/themes/simple/less/preferences.less+17 searx/static/themes/simple/less/pygments.less+99 searx/static/themes/simple/less/style.less+36 searx/templates/__common__/about.html+92−53 searx/templates/__common__/opensearch.xml+10−16 searx/templates/__common__/opensearch_response_rss.xml+26−2 searx/templates/courgette/404.html−9 searx/templates/courgette/about.html−5 searx/templates/courgette/base.html−43 searx/templates/courgette/categories.html−9 searx/templates/courgette/color.css−34 searx/templates/courgette/github_ribbon.html−3 searx/templates/courgette/index.html−17 searx/templates/courgette/preferences.html−132 searx/templates/courgette/result_templates/code.html−11 searx/templates/courgette/result_templates/default.html−13 searx/templates/courgette/result_templates/images.html−6 searx/templates/courgette/result_templates/key-value.html−13 searx/templates/courgette/result_templates/map.html−13 searx/templates/courgette/result_templates/torrent.html−13 searx/templates/courgette/result_templates/videos.html−10 searx/templates/courgette/results.html−87 searx/templates/courgette/search.html−7 searx/templates/courgette/stats.html−22 searx/templates/legacy/404.html−9 searx/templates/legacy/about.html−5 searx/templates/legacy/base.html−38 searx/templates/legacy/categories.html−10 searx/templates/legacy/github_ribbon.html−3 searx/templates/legacy/index.html−18 searx/templates/legacy/infobox.html−51 searx/templates/legacy/preferences.html−129 searx/templates/legacy/result_templates/code.html−11 searx/templates/legacy/result_templates/default.html−6 searx/templates/legacy/result_templates/images.html−6 searx/templates/legacy/result_templates/key-value.html−13 searx/templates/legacy/result_templates/map.html−13 searx/templates/legacy/result_templates/torrent.html−13 searx/templates/legacy/result_templates/videos.html−6 searx/templates/legacy/results.html−100 searx/templates/legacy/search.html−8 searx/templates/legacy/stats.html−22 searx/templates/oscar/404.html+1−1 searx/templates/oscar/advanced.html+1−1 searx/templates/oscar/base.html+21−22 searx/templates/oscar/index.html+8−9 searx/templates/oscar/infobox.html+16−3 searx/templates/oscar/languages.html+3−1 searx/templates/oscar/macros.html+87−48 searx/templates/oscar/messages/no_results.html+1−1 searx/templates/oscar/preferences.html+137−76 searx/templates/oscar/result_templates/code.html+2−2 searx/templates/oscar/result_templates/default.html+12−12 searx/templates/oscar/result_templates/files.html+55 searx/templates/oscar/result_templates/images.html+2−2 searx/templates/oscar/result_templates/key-value.html+3−3 searx/templates/oscar/result_templates/map.html+60−56 searx/templates/oscar/result_templates/products.html+23 searx/templates/oscar/result_templates/torrent.html+17−17 searx/templates/oscar/result_templates/videos.html+20−18 searx/templates/oscar/results.html+49−18 searx/templates/oscar/search.html+3−2 searx/templates/oscar/search_full.html+3−2 searx/templates/oscar/time-range.html+3−1 searx/templates/pix-art/404.html−9 searx/templates/pix-art/about.html−4 searx/templates/pix-art/base.html−35 searx/templates/pix-art/index.html−12 searx/templates/pix-art/preferences.html−82 searx/templates/pix-art/result_templates/default.html−7 searx/templates/pix-art/result_templates/images.html−6 searx/templates/pix-art/results.html−32 searx/templates/pix-art/search.html−9 searx/templates/pix-art/stats.html−22 searx/templates/simple/404.html+1−1 searx/templates/simple/base.html+9−8 searx/templates/simple/infobox.html+1−2 searx/templates/simple/macros.html+3−3 searx/templates/simple/messages/no_results.html+1−1 searx/templates/simple/preferences.html+34−3 searx/templates/simple/result_templates/map.html+35−52 searx/templates/simple/results.html+24−9 searx/templates/simple/search.html+2−2 searx/testing.py+5−5 searx/translations/ar/LC_MESSAGES/messages.mo searx/translations/ar/LC_MESSAGES/messages.po+308−224 searx/translations/bg/LC_MESSAGES/messages.mo searx/translations/bg/LC_MESSAGES/messages.po+306−222 searx/translations/bo/LC_MESSAGES/messages.mo searx/translations/bo/LC_MESSAGES/messages.po+325−240 searx/translations/ca/LC_MESSAGES/messages.mo searx/translations/ca/LC_MESSAGES/messages.po+308−224 searx/translations/cs/LC_MESSAGES/messages.mo searx/translations/cs/LC_MESSAGES/messages.po+383−297 searx/translations/cy/LC_MESSAGES/messages.mo searx/translations/cy/LC_MESSAGES/messages.po+306−222 searx/translations/da/LC_MESSAGES/messages.mo searx/translations/da/LC_MESSAGES/messages.po+308−224 searx/translations/de/LC_MESSAGES/messages.mo searx/translations/de/LC_MESSAGES/messages.po+310−224 searx/translations/el_GR/LC_MESSAGES/messages.mo searx/translations/el_GR/LC_MESSAGES/messages.po+306−222 searx/translations/en/LC_MESSAGES/messages.mo searx/translations/eo/LC_MESSAGES/messages.mo searx/translations/eo/LC_MESSAGES/messages.po+310−226 searx/translations/es/LC_MESSAGES/messages.mo searx/translations/es/LC_MESSAGES/messages.po+313−228 searx/translations/et/LC_MESSAGES/messages.mo searx/translations/et/LC_MESSAGES/messages.po+322−237 searx/translations/eu/LC_MESSAGES/messages.mo searx/translations/eu/LC_MESSAGES/messages.po+310−225 searx/translations/fa_IR/LC_MESSAGES/messages.mo searx/translations/fa_IR/LC_MESSAGES/messages.po+312−227 searx/translations/fi/LC_MESSAGES/messages.mo searx/translations/fi/LC_MESSAGES/messages.po+307−223 searx/translations/fil/LC_MESSAGES/messages.mo searx/translations/fil/LC_MESSAGES/messages.po+308−224 searx/translations/fr/LC_MESSAGES/messages.mo searx/translations/fr/LC_MESSAGES/messages.po+310−226 searx/translations/gl/LC_MESSAGES/messages.mo searx/translations/gl/LC_MESSAGES/messages.po+342−257 searx/translations/he/LC_MESSAGES/messages.mo searx/translations/he/LC_MESSAGES/messages.po+311−226 searx/translations/hr/LC_MESSAGES/messages.mo searx/translations/hr/LC_MESSAGES/messages.po+313−228 searx/translations/hu/LC_MESSAGES/messages.mo searx/translations/hu/LC_MESSAGES/messages.po+308−224 searx/translations/ia/LC_MESSAGES/messages.mo searx/translations/ia/LC_MESSAGES/messages.po+308−224 searx/translations/it/LC_MESSAGES/messages.mo searx/translations/it/LC_MESSAGES/messages.po+311−227 searx/translations/ja/LC_MESSAGES/messages.mo searx/translations/ja/LC_MESSAGES/messages.po+308−224 searx/translations/lt/LC_MESSAGES/messages.mo searx/translations/lt/LC_MESSAGES/messages.po+308−224 searx/translations/nl/LC_MESSAGES/messages.mo searx/translations/nl/LC_MESSAGES/messages.po+309−224 searx/translations/nl_BE/LC_MESSAGES/messages.mo searx/translations/nl_BE/LC_MESSAGES/messages.po+309−224 searx/translations/oc/LC_MESSAGES/messages.mo searx/translations/oc/LC_MESSAGES/messages.po+309−225 searx/translations/pl/LC_MESSAGES/messages.mo searx/translations/pt/LC_MESSAGES/messages.mo searx/translations/pt/LC_MESSAGES/messages.po+308−224 searx/translations/pt_BR/LC_MESSAGES/messages.mo searx/translations/pt_BR/LC_MESSAGES/messages.po+309−224 searx/translations/ro/LC_MESSAGES/messages.mo searx/translations/ro/LC_MESSAGES/messages.po+308−224 searx/translations/ru/LC_MESSAGES/messages.mo searx/translations/ru/LC_MESSAGES/messages.po+311−226 searx/translations/sk/LC_MESSAGES/messages.mo searx/translations/sk/LC_MESSAGES/messages.po+308−224 searx/translations/sl/LC_MESSAGES/messages.mo searx/translations/sl/LC_MESSAGES/messages.po+307−223 searx/translations/sr/LC_MESSAGES/messages.mo searx/translations/sr/LC_MESSAGES/messages.po+313−228 searx/translations/sv/LC_MESSAGES/messages.mo searx/translations/sv/LC_MESSAGES/messages.po+311−227 searx/translations/ta/LC_MESSAGES/messages.mo searx/translations/ta/LC_MESSAGES/messages.po+306−222 searx/translations/te/LC_MESSAGES/messages.mo searx/translations/te/LC_MESSAGES/messages.po+306−222 searx/translations/tr/LC_MESSAGES/messages.mo searx/translations/tr/LC_MESSAGES/messages.po+416−331 searx/translations/uk/LC_MESSAGES/messages.mo searx/translations/uk/LC_MESSAGES/messages.po+308−224 searx/translations/vi/LC_MESSAGES/messages.mo searx/translations/vi/LC_MESSAGES/messages.po+308−224 searx/translations/zh_CN/LC_MESSAGES/messages.mo searx/translations/zh_CN/LC_MESSAGES/messages.po+310−225 searx/translations/zh_Hant_TW/LC_MESSAGES/messages.mo searx/translations/zh_TW/LC_MESSAGES/messages.mo searx/translations/zh_TW/LC_MESSAGES/messages.po+309−224 searx/url_utils.py−30 searx/utils.py+366−218 searx/version.py+2−2 searx/webadapter.py+250 searx/webapp.py+469−256 searx/webutils.py+148 searx_extra/__init__.py searx_extra/google_search.py searx_extra/standalone_searx.py+217 searx_extra/update/__init__.py searx_extra/update/update_ahmia_blacklist.py+30 searx_extra/update/update_currencies.py+150 searx_extra/update/update_engine_descriptions.py+202 searx_extra/update/update_external_bangs.py+157 searx_extra/update/update_firefox_version.py+3−8 searx_extra/update/update_languages.py+205 searx_extra/update/update_osm_keys_tags.py+209 searx_extra/update/update_pygments.py+138 searx_extra/update/update_translations.sh searx_extra/update/update_wikidata_units.py+54 setup.py+11−7 tests/__init__.py+2 tests/test_robot.py−23 tests/unit/engines/test_command.py+240 tests/unit/engines/test_xpath.py+121 tests/unit/network/__init__.py tests/unit/network/test_network.py+239 tests/unit/settings/empty_settings.yml tests/unit/settings/syntaxerror_settings.yml+2 tests/unit/settings/user_settings.yml+111 tests/unit/settings/user_settings_keep_only.yml+14 tests/unit/settings/user_settings_remove.yml+10 tests/unit/settings/user_settings_remove2.yml+15 tests/unit/settings/user_settings_simple.yml+9 tests/unit/test_answerers.py+2−2 tests/unit/test_engines_init.py+44 tests/unit/test_external_bangs.py+117 tests/unit/test_plugins.py+73−19 tests/unit/test_preferences.py+25−29 tests/unit/test_query.py+219−35 tests/unit/test_results.py+4−4 tests/unit/test_search.py+45−57 tests/unit/test_settings_loader.py+122 tests/unit/test_standalone_searx.py+111 tests/unit/test_utils.py+145−68 tests/unit/test_webadapter.py+54 tests/unit/test_webapp.py+85−17 tests/unit/test_webutils.py+87 utils/brand.env+9 utils/build_env.py+38 utils/fabfile.py−117 utils/fetch_currencies.py−163 utils/fetch_languages.py−194 utils/filtron.sh+120−28 utils/lib.sh+787−72 utils/lxc-searx.env+47−12 utils/lxc.sh+221−184 utils/makefile.include+25−50 utils/makefile.lxc+32 utils/makefile.python−290 utils/makefile.sphinx−216 utils/morty.sh+156−48 utils/searx.sh+288−102 utils/standalone_searx.py−104 utils/templates/etc/apache2+1 utils/templates/etc/apache2/sites-available/searx.conf:uwsgi−27 utils/templates/etc/filtron/rules.json+115−113 utils/templates/etc/httpd/sites-available/morty.conf+8−8 utils/templates/etc/httpd/sites-available/searx.conf:filtron+8−8 utils/templates/etc/httpd/sites-available/searx.conf:uwsgi+27 utils/templates/etc/nginx/default.apps-available/morty.conf+11 utils/templates/etc/nginx/default.apps-available/searx.conf:filtron+16 utils/templates/etc/searx/use_default_settings.yml+22 utils/templates/etc/uwsgi/apps-archlinux/searx.ini+12−4 utils/templates/etc/uwsgi/apps-archlinux/searx.ini:socket+85 utils/templates/etc/uwsgi/apps-available/searx.ini+12−4 utils/templates/etc/uwsgi/apps-available/searx.ini:socket+84 utils/templates/lib/systemd/system/morty.service+1−1
.config.mkdeleted−13
@@ -1,13 +0,0 @@
1−# -*- coding: utf-8; mode: makefile-gmake -*-
2−# SPDX-License-Identifier: AGPL-3.0-or-later
3−#
4−# This environment is used by Makefile targets. If you not maintain your own
5−# searx brand, you normally not need to change the defaults (except SEARX_URL).
6−# Compare your settings here with file .config.sh used by the toolboxing in
7−# utils.
8−
9−export SEARX_URL:=$(or ${SEARX_URL},https://searx.me)
10−
11−export DOCS_URL:=$(or ${DOCS_URL},https://asciimoo.github.io/searx)
12−export GIT_URL:=$(or ${GIT_URL},https://github.com/asciimoo/searx)
13−
.config.sh+23−20
@@ -11,46 +11,49 @@
1111# adding them to you local brand (git branch)::
1212#
1313# git add .config
14−#
15−# Compare your settings here with file .config.mk used by the Makefile targets.
1614
1715# The public URL of the searx instance: PUBLIC_URL="https://mydomain.xy/searx"
18−# The default is taken from the Makefile environment (SEARX_URL).
19−PUBLIC_URL="${SEARX_URL:-http://$(uname -n)/searx}"
20−PUBLIC_HOST="${PUBLIC_HOST:-$(echo "$PUBLIC_URL" | sed -e 's/[^/]*\/\/\([^@]*@\)\?\([^:/]*\).*/\2/')}"
16+# The default is taken from ./utils/brand.env.
17+
18+PUBLIC_URL="${SEARX_URL}"
19+
20+if [[ ${PUBLIC_URL} == "https://searx.me" ]]; then
21+ # hint: Linux containers do not have DNS entries, lets use IPs
22+ PUBLIC_URL="http://$(primary_ip)/searx"
23+fi
2124
2225# searx.sh
2326# ---------
2427
25−SEARX_INTERNAL_URL="${SEARX_INTERNAL_URL:-127.0.0.1:8888}"
28+# SEARX_INTERNAL_URL="127.0.0.1:8888"
29+# SEARX_SETTINGS_TEMPLATE="${REPO_ROOT}/utils/templates/etc/searx/use_default_settings.yml"
2630
27−# Only change, if you maintain a searx brand in your searx fork. The default is
28−# taken from the Makefile environment (DOCS_URL, GIT_URL).
29−SEARX_DOCS_URL="${DOCS_URL:-https://asciimoo.github.io/searx}"
30−SEARX_GIT_URL="${GIT_URL:-https://github.com/asciimoo/searx.git}"
31−SEARX_GIT_BRANCH="${SEARX_GIT_BRANCH:-master}"
31+# Only change, if you maintain a searx brand in your searx fork (GIT_URL) which
32+# is not hold by branch 'master'. The branch has to be a local branch, in the
33+# repository from which you install (which is most often the case). If you want
34+# to install branch 'foo', don't forget to run 'git branch foo origin/foo' once.
35+# GIT_BRANCH="${GIT_BRANCH:-master}"
3236
3337# filtron.sh
3438# ----------
3539
36−FILTRON_API="${FILTRON_API:-127.0.0.1:4005}"
37−FILTRON_LISTEN="${FILTRON_LISTEN:-127.0.0.1:4004}"
38−FILTRON_TARGET="${FILTRON_TARGET:-127.0.0.1:8888}"
40+# FILTRON_API="127.0.0.1:4005"
41+# FILTRON_LISTEN="127.0.0.1:4004"
42+# FILTRON_TARGET="127.0.0.1:8888"
3943
4044# morty.sh
4145# --------
4246
4347# morty listen address
44−MORTY_LISTEN="${MORTY_LISTEN:-127.0.0.1:3000}"
48+# MORTY_LISTEN="127.0.0.1:3000"
49+# PUBLIC_URL_PATH_MORTY="/morty/"
4550
4651# system services
4752# ---------------
4853
54+# Common $HOME folder of the service accounts
55+# SERVICE_HOME_BASE="/usr/local"
56+
4957# **experimental**: Set SERVICE_USER to run all services by one account, but be
5058# aware that removing discrete components might conflict!
51−#
5259# SERVICE_USER=searx
53−
54−# Common $HOME folder of the service accounts
55−SERVICE_HOME_BASE="${SERVICE_HOME_BASE:-/usr/local}"
56−
.coveragerc+1−10
@@ -1,15 +1,6 @@
11[run]
22branch = True
3−source =
4− searx/engines
5− searx/__init__.py
6− searx/autocomplete.py
7− searx/https_rewrite.py
8− searx/languages.py
9− searx/search.py
10− searx/testing.py
11− searx/utils.py
12− searx/webapp.py
3+source = searx
134
145[report]
156show_missing = True
.dir-locals.el+1−1
@@ -25,7 +25,7 @@
2525;; Alternatively create the virtualenv, source it and install jedi + epc
2626;; (required by `emacs-jedi <https://tkf.github.io/emacs-jedi>`_)::
2727;;
28−;; $ virtualenv --python=python3 "--no-site-packages" ./local/py3
28+;; $ python -m venv ./local/py3
2929;; ...
3030;; $ source ./local/py3/bin/activate
3131;; (py3)$ # now install into the activated 'py3' environment ..
.dockerignore+16−1
@@ -4,6 +4,9 @@
44*/*/*/*~
55*/*/*/*/*~
66
7+#
8+local/
9+
710# Git
811.git
912.gitignore
@@ -36,6 +39,18 @@ robot_report.html
3639test_basic/
3740setup.cfg
3841
42+# node_modules
3943node_modules/
44+*/node_modules/
45+*/*/node_modules/
46+*/*/*/node_modules/
47+*/*/*/*/node_modules/
48+
49+.tx/
4050
41−.tx/
51+#
52+build/
53+dist/
54+local/
55+gh-pages/
56+searx.egg-info/
.github/ISSUE_TEMPLATE/bug-report.mdnew file+39
@@ -0,0 +1,39 @@
1+---
2+name: Bug report
3+about: Report a bug in Searx
4+title: ''
5+labels: bug
6+assignees: ''
7+
8+---
9+<!-- PLEASE FILL THESE FIELDS, IT REALLY HELPS THE MAINTAINERS OF SEARX -->
10+
11+**Version of Searx, commit number if you are using on master branch and stipulate if you forked Searx**
12+<!-- If you are running on master branch using git execute this command
13+in order to fetch the latest commit ID:
14+```
15+git log -1
16+```
17+If you are using searx-docker then look at the bottom of the Searx page
18+and check for the version after "Powered by searx"
19+
20+Please also stipulate if you are using a forked version of Searx and
21+include a link to the fork source code.
22+-->
23+**How did you install Searx?**
24+<!-- Did you install Searx using the official wiki or using searx-docker
25+or manually by executing the searx/webapp.py file? -->
26+**What happened?**
27+<!-- A clear and concise description of what the bug is. -->
28+
29+**How To Reproduce**
30+<!-- How can we reproduce this issue? (as minimally and as precisely as possible) -->
31+
32+**Expected behavior**
33+<!-- A clear and concise description of what you expected to happen. -->
34+
35+**Screenshots & Logs**
36+<!-- If applicable, add screenshots, logs to help explain your problem. -->
37+
38+**Additional context**
39+<!-- Add any other context about the problem here. -->
.github/ISSUE_TEMPLATE/config.ymlnew file+14
@@ -0,0 +1,14 @@
1+blank_issues_enabled: true
2+contact_links:
3+ - name: Installation issue using the official wiki
4+ url: https://github.com/searx/searx/discussions/new?category_id=32001257
5+ about: Ask for help if you are having some issue with installing Searx using the official wiki.
6+ - name: Installation issue using searx-docker
7+ url: https://github.com/searx/searx/discussions/new?category_id=32001259
8+ about: Ask for help if you are having some issue with installing Searx using searx-docker.
9+ - name: Installation issue without using the official wiki nor searx-docker
10+ url: https://github.com/searx/searx/discussions/new?category_id=32001260
11+ about: Ask for help if you are having some issue with installing Searx manually without using the wiki nor searx-docker.
12+ - name: Report a bug on a public Searx instance
13+ url: https://github.com/searx/searx/discussions/new?category_id=32001412
14+ about: Report a bug that you discovered on a public Searx instance.
.github/ISSUE_TEMPLATE/engine-request.mdnew file+31
@@ -0,0 +1,31 @@
1+---
2+name: Engine request
3+about: Request a new engine in Searx
4+title: ''
5+labels: enhancement, engine request
6+assignees: ''
7+
8+---
9+<!-- PLEASE FILL THESE FIELDS, IT REALLY HELPS THE MAINTAINERS OF SEARX -->
10+
11+**Working URL to the engine**
12+<!-- Please check if the engine is responding correctly before submitting it. -->
13+
14+**Why do you want to add this engine?**
15+<!-- What's special about this engine? Is it open source or libre? -->
16+
17+**Features of this engine**
18+<!-- Features of this engine: Doesn't track its users, fast, easy to integrate, ... -->
19+
20+**How can Searx fetch the information from this engine?**
21+<!-- List API URL, example code (using the correct markdown) and more
22+that could be useful for the developers in order to implement this engine.
23+If you don't know what to write, let this part blank.>
24+
25+**Applicable category of this engine**
26+<!-- Where should this new engine fit in Searx? Current categories in Searx:
27+general, files, images, it, map, music, news, science, social media and videos.
28+You can add multiple categories at the same time. -->
29+
30+**Additional context**
31+<!-- Add any other context about this engine here. -->
.github/ISSUE_TEMPLATE/feature-request.mdnew file+21
@@ -0,0 +1,21 @@
1+---
2+name: Feature request
3+about: Request a new feature in Searx
4+title: ''
5+labels: enhancement
6+assignees: ''
7+
8+---
9+<!-- PLEASE FILL THESE FIELDS, IT REALLY HELPS THE MAINTAINERS OF SEARX -->
10+
11+**Is your feature request related to a problem? Please describe.**
12+<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->
13+
14+**Describe the solution you'd like**
15+<!-- A clear and concise description of what you want to happen. -->
16+
17+**Describe alternatives you've considered**
18+<!-- A clear and concise description of any alternative solutions or features you've considered. -->
19+
20+**Additional context**
21+<!-- Add any other context or screenshots about the feature request here. -->
.github/dependabot.ymlnew file+10
@@ -0,0 +1,10 @@
1+# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
2+version: 2
3+updates:
4+ - package-ecosystem: "pip"
5+ directory: "/"
6+ schedule:
7+ interval: "weekly"
8+ day: "friday"
9+ open-pull-requests-limit: 5
10+ target-branch: "master"
.github/workflows/data-update.ymlnew file+66
@@ -0,0 +1,66 @@
1+name: "Update searx.data"
2+on:
3+ schedule:
4+ - cron: "05 06 1 * *"
5+ workflow_dispatch:
6+
7+jobs:
8+ updateData:
9+ name: Update data - ${{ matrix.fetch }}
10+ runs-on: ubuntu-20.04
11+ if: ${{ github.repository_owner == 'searx'}}
12+ strategy:
13+ matrix:
14+ fetch:
15+ - update_ahmia_blacklist.py
16+ - update_currencies.py
17+ - update_external_bangs.py
18+ - update_firefox_version.py
19+ - update_languages.py
20+ - update_wikidata_units.py
21+ steps:
22+ - name: Checkout
23+ uses: actions/checkout@v2
24+
25+ - name: Install Ubuntu packages
26+ run: |
27+ sudo ./utils/searx.sh install packages
28+
29+ - name: Set up Python
30+ uses: actions/setup-python@v2
31+ with:
32+ python-version: '3.10'
33+ architecture: 'x64'
34+
35+ - name: Install Python dependencies
36+ run: |
37+ make V=1 install
38+
39+ - name: Fetch data
40+ env:
41+ FETCH_SCRIPT: ./searx_extra/update/${{ matrix.fetch }}
42+ run: |
43+ V=1 ./manage pyenv.cmd python "$FETCH_SCRIPT"
44+
45+ - name: Create Pull Request
46+ id: cpr
47+ uses: peter-evans/create-pull-request@v3
48+ with:
49+ token: ${{ secrets.DATA_PR_TOKEN }}
50+ commit-message: Update searx.data - ${{ matrix.fetch }}
51+ committer: searx-bot <noreply@github.com>
52+ author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
53+ signoff: false
54+ branch: update_data_${{ matrix.fetch }}
55+ delete-branch: true
56+ draft: false
57+ title: 'Update searx.data - ${{ matrix.fetch }}'
58+ body: |
59+ Update searx.data - ${{ matrix.fetch }}
60+ labels: |
61+ data
62+
63+ - name: Check outputs
64+ run: |
65+ echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
66+ echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
.github/workflows/integration.ymlnew file+151
@@ -0,0 +1,151 @@
1+name: Integration
2+
3+on:
4+ push:
5+ branches: ["master"]
6+ pull_request:
7+ branches: ["master"]
8+
9+jobs:
10+ python:
11+ name: Python ${{ matrix.python-version }}
12+ runs-on: ubuntu-20.04
13+ strategy:
14+ matrix:
15+ os: [ubuntu-20.04]
16+ python-version: [3.7, 3.8, 3.9, "3.10"]
17+ steps:
18+ - name: Checkout
19+ uses: actions/checkout@v2
20+ - name: Install Ubuntu packages
21+ run: |
22+ sudo ./utils/searx.sh install packages
23+ sudo apt install firefox
24+ - name: Set up Python
25+ uses: actions/setup-python@v2
26+ with:
27+ python-version: ${{ matrix.python-version }}
28+ architecture: 'x64'
29+ - name: Cache Python dependencies
30+ id: cache-python
31+ uses: actions/cache@v2
32+ with:
33+ path: ./local
34+ key: python-${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('requirements*.txt', 'setup.py') }}
35+ - name: Install Python dependencies
36+ if: steps.cache-python.outputs.cache-hit != 'true'
37+ run: |
38+ make V=1 install
39+ make V=1 gecko.driver
40+ - name: Run tests
41+ run: make V=1 ci.test
42+ - name: Test coverage
43+ run: make V=1 test.coverage
44+ - name: Store coverage result
45+ uses: actions/upload-artifact@v2
46+ with:
47+ name: coverage-${{ matrix.python-version }}
48+ path: coverage/
49+ retention-days: 60
50+
51+ themes:
52+ name: Themes
53+ runs-on: ubuntu-20.04
54+ steps:
55+ - name: Checkout
56+ uses: actions/checkout@v2
57+ - name: Install Ubuntu packages
58+ run: sudo ./utils/searx.sh install packages
59+ - name: Set up Python
60+ uses: actions/setup-python@v2
61+ with:
62+ python-version: '3.9'
63+ architecture: 'x64'
64+ - name: Cache Python dependencies
65+ id: cache-python
66+ uses: actions/cache@v2
67+ with:
68+ path: ./local
69+ key: python-ubuntu-20.04-3.9-${{ hashFiles('requirements*.txt', 'setup.py') }}
70+ - name: Install node dependencies
71+ run: make V=1 node.env
72+ - name: Build themes
73+ run: make V=1 themes.all
74+
75+ documentation:
76+ name: Documentation
77+ runs-on: ubuntu-20.04
78+ steps:
79+ - name: Checkout
80+ uses: actions/checkout@v2
81+ with:
82+ fetch-depth: '0'
83+ persist-credentials: false
84+ - name: Install Ubuntu packages
85+ run: sudo ./utils/searx.sh install buildhost
86+ - name: Set up Python
87+ uses: actions/setup-python@v2
88+ with:
89+ python-version: '3.10'
90+ architecture: 'x64'
91+ - name: Cache Python dependencies
92+ id: cache-python
93+ uses: actions/cache@v2
94+ with:
95+ path: ./local
96+ key: python-ubuntu-20.04-3.9-${{ hashFiles('requirements*.txt', 'setup.py') }}
97+ - name: Build documentation
98+ run: |
99+ make V=1 docs.clean docs.html
100+ - name: Deploy
101+ if: github.ref == 'refs/heads/master'
102+ uses: JamesIves/github-pages-deploy-action@3.7.1
103+ with:
104+ GITHUB_TOKEN: ${{ github.token }}
105+ BRANCH: gh-pages
106+ FOLDER: dist/docs
107+ CLEAN: true # Automatically remove deleted files from the deploy branch
108+
109+ dockers:
110+ name: Docker
111+ if: github.ref == 'refs/heads/master'
112+ needs:
113+ - python
114+ - themes
115+ - documentation
116+ env:
117+ DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
118+ runs-on: ubuntu-20.04
119+ steps:
120+ - name: Checkout
121+ if: env.DOCKERHUB_USERNAME != null
122+ uses: actions/checkout@v2
123+ with:
124+ # make sure "make docker.push" can get the git history
125+ fetch-depth: '0'
126+ - name: Set up Python
127+ uses: actions/setup-python@v2
128+ with:
129+ python-version: '3.9'
130+ architecture: 'x64'
131+ - name: Cache Python dependencies
132+ id: cache-python
133+ uses: actions/cache@v2
134+ with:
135+ path: ./local
136+ key: python-ubuntu-20.04-3.9-${{ hashFiles('requirements*.txt', 'setup.py') }}
137+ - name: Set up QEMU
138+ if: env.DOCKERHUB_USERNAME != null
139+ uses: docker/setup-qemu-action@v1
140+ - name: Set up Docker Buildx
141+ if: env.DOCKERHUB_USERNAME != null
142+ uses: docker/setup-buildx-action@v1
143+ - name: Login to DockerHub
144+ if: env.DOCKERHUB_USERNAME != null
145+ uses: docker/login-action@v1
146+ with:
147+ username: ${{ secrets.DOCKERHUB_USERNAME }}
148+ password: ${{ secrets.DOCKERHUB_TOKEN }}
149+ - name: Build and push
150+ if: env.DOCKERHUB_USERNAME != null
151+ run: make -e GIT_URL=$(git remote get-url origin) docker.push
.gitignore+4−1
@@ -15,8 +15,9 @@ setup.cfg
1515*.pyc
1616*/*.pyc
1717*~
18+*.swp
1819
19−node_modules/
20+/node_modules
2021
2122.tx/
2223
@@ -25,3 +26,5 @@ dist/
2526local/
2627gh-pages/
2728searx.egg-info/
29+.env
30+geckodriver.log
.pylintrc+2−2
@@ -12,7 +12,7 @@
1212# A comma-separated list of package or module names from where C extensions may
1313# be loaded. Extensions are loading into the active Python interpreter and may
1414# run arbitrary code
15−extension-pkg-whitelist=
15+extension-pkg-whitelist=lxml.etree
1616
1717# Add files or directories to the blacklist. They should be base names, not
1818# paths.
@@ -59,7 +59,7 @@ confidence=
5959# --enable=similarities". If you want to run only the classes checker, but have
6060# no Warning level messages displayed, use"--disable=all --enable=classes
6161# --disable=W"
62−disable=bad-whitespace, duplicate-code
62+disable=bad-whitespace, duplicate-code, consider-using-f-string
6363
6464# Enable the message, report, category or checker with the given id(s). You can
6565# either give multiple identifier separated by comma (,) or put this option
.travis.ymldeleted−56
@@ -1,56 +0,0 @@
1−language: python
2−sudo: false
3−cache:
4− - pip
5− - npm
6− - directories:
7− - $HOME/.cache/pip
8−
9−addons:
10− firefox: "latest"
11−
12−install:
13− - ./manage.sh install_geckodriver ~/drivers
14− - export PATH=~/drivers:$PATH
15− - ./manage.sh npm_packages
16− - ./manage.sh update_dev_packages
17− - pip install codecov
18−script:
19− - ./manage.sh styles
20− - ./manage.sh grunt_build
21− - ./manage.sh tests
22−after_success:
23− - ./manage.sh py_test_coverage
24− - codecov
25−
26−stages:
27− - test
28− - name: docker
29− if: branch = master AND type != pull_request AND env(DOCKER_USERNAME) IS present
30−
31−jobs:
32− include:
33− - python: "2.7"
34− - python: "3.5"
35− - python: "3.6"
36− - stage: docker
37− python: "3.6"
38− git:
39− depth: false
40− services:
41− - docker
42− addons: []
43− before_install: true
44− install: true
45− script:
46− - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
47− - ./manage.sh docker_build push
48− after_success: true
49−
50−notifications:
51− irc:
52− channels:
53− - "irc.freenode.org#searx"
54− template:
55− - "%{repository}/#%{build_number}/%{branch} (%{author}): %{message} %{build_url}"
56− on_success: change
AUTHORS.rst+48−5
@@ -1,4 +1,4 @@
1−Searx was created by Adam Tauber and is maintained by Adam Tauber, Alexandre Flament, Noémi Ványi, @pofilo and Markus Heiser.
1+Searx was created by Adam Tauber and is maintained by Adam Tauber, Noémi Ványi, @pofilo, Gaspard d'Hautefeuille and Émilien Devos.
22
33Major contributing authors:
44
@@ -11,8 +11,10 @@ Major contributing authors:
1111- Marc Abonce Seguin @a01200356
1212- @pofilo
1313- Markus Heiser @return42
14+- Émilien Devos @unixfox
15+- Alexandre Flament
1416
15−People who have submitted patches/translates, reported bugs, consulted features or
17+People who have submitted patches/translations, reported bugs, consulted features or
1618generally made searx better:
1719
1820- Laszlo Hammerl
@@ -65,7 +67,6 @@ generally made searx better:
6567- @firebovine
6668- Lorenzo J. Lucchini @luccoj
6769- @eig8phei
68−- Joachim Cherqui
6970- @maxigas
7071- Jannik Winkel @kiney
7172- @juanitobananas
@@ -96,7 +97,7 @@ generally made searx better:
9697- Alice Ferrazzi @aliceinwire
9798- @LiquidLemon
9899- @dadosch
99−- @Venca24
100+- Václav Zouzalík @Venca24
100101- @ZEROF
101102- Ivan Skytte Jørgensen @isj-privacore
102103- @miicha
@@ -110,7 +111,6 @@ generally made searx better:
110111- Nick Espig @nachtalb
111112- Rachmadani Haryono @rachmadaniHaryono
112113- Frank de Lange @yetangitu
113−- Émilien Devos @unifox
114114- Nicolas Gelot @nfk
115115- @volth
116116- Mathieu Brunot @madmath03
@@ -123,3 +123,46 @@ generally made searx better:
123123- Vipul @finn0
124124- @CaffeinatedTech
125125- Robin Schneider @ypid
126+- @splintah
127+- Lukas van den Berk @lukasvdberk
128+- @piplongrun
129+- Jason Kaltsikis @jjasonkal
130+- Sion Kazama @KazamaSion
131+- @resynth1943
132+- Mostafa Ahangarha @ahangarha
133+- @gordon-quad
134+- Sophie Tauchert @999eagle
135+- @bauruine
136+- Michael Ilsaas `<https://mikeri.net>`_
137+- @renyhp
138+- rachmadani haryono @rachmadaniHaryono
139+- Mohamad Safadieh @msafadieh
140+- @gardouille
141+- @resynth1943
142+- @Eliesemoule
143+- @gardouille
144+- @GazoilKerozen
145+- Lukáš Kucharczyk @KucharczykL
146+- Lynda Lopez @lyndalopez544
147+- M. Efe Çetin @efectn
148+- Nícholas Kegler @nicholasks
149+- @pierrechtux
150+- Scott Wallace @scottwallacesh
151+- @Singustromo
152+- @TheEvilSkeleton
153+- @Wonderfall
154+- @mrwormo
155+- Xiaoyu WEI @xywei
156+- @joshu9h
157+- Daniel Hones
158+- @cyclaero
159+- @thezeroalpha
160+- @Tobi823
161+- @archiecodes
162+- @BBaoVanC
163+- @datagram1
164+- @lucky13820
165+- @jhigginbotham
166+- @xenrox
167+- @OliveiraHermogenes
168+- Paul Alcock @Guilvareux
CHANGELOG.rst+336−3
@@ -1,3 +1,336 @@
1+1.0.0 2021.03.27
2+================
3+
4+Core
5+~~~~
6+
7+- drop support for Python 3.5 ( #2459 )
8+- add support for Python 3.9 ( #2397 #2459 )
9+- update Python dependencies ( #2428 #2459 #2206 ) ⚠️ pyopenssl is not longer required
10+- automatic update of searx.data ( #2555 #2585 #2595 #2592 #2600 )
11+- update searx.data ( #2604 #2605 #2606 #2607 #2415 )
12+- add ability to send engine data to subsequent requests ( #2615 )
13+- add checker ( #2419 #2476 #2481 #2682 #2682 #2657 )
14+- by default allow only HTTPS, not HTTP ( #2641 #2659 )
15+- replace /translations.js with an embedded JSON ( #2660 )
16+- activate raise_for_error by default ( #2557 )
17+- don't dump traceback of SearxEngineResponseException on init ( #2635 )
18+
19+Documentation
20+~~~~~~~~~~~~~
21+
22+- update nginx configuration ( #2618 )
23+- document workaround for using 2 languages simultaneously ( #2479 )
24+- improve admin-docs about result proxy (morty) configuration ( #2509 )
25+- fixed typo ( #2457 )
26+
27+New settings.yml
28+~~~~~~~~~~~~~~~~
29+
30+- `general.contact_url` : add link to contact instance maintainer to footer of each page ( #2391 14c7cc0e118f1d0873b32b34793cdec2c5c9c13e #2412 )
31+- `brand` : move brand options from Makefile to settings.yml ( #2408 #2473 )
32+
33+Themes
34+~~~~~~
35+
36+- oscar: Hide links panel in mobile screens ( #2458 )
37+- oscar: upgrade dependencies ( #2346 #2673 #2662 )
38+- remove legacy, courgette and pix-art themes ( #2344 )
39+- add hyperlink to searx instances list in error message ( #2387 )
40+- preferences: a tooltip is shown when the mouse is over the engine names ( #2661 )
41+- Ignore double-quotes when highlighting query parts ( #2553 )
42+- update autocomplete ( #2593 )
43+
44+New engines
45+~~~~~~~~~~~
46+
47+- ccengine ( #2533 )
48+- mediathekviewweb ( #2541 )
49+- solidtorrents ( #2626 )
50+- solr ( #2652 )
51+- rumble ( #2588 )
52+- wiby.me ( #2452 )
53+
54+Fixed engines
55+~~~~~~~~~~~~~
56+
57+- apk_mirror ( #2556 #2642 )
58+- bing ( #2602 )
59+- duckduckgo ( #2560 #2559 )
60+- library genesis ( #2448 )
61+- ina ( 0ba71c3644c4d20f70528c10eed1385399ec1c82 )
62+- invidious ( #2451 )
63+- json_engine ( #2562 )
64+- google ( #2482 )
65+- google images ( #2482 )
66+- google play apps ( 88657fe9c2a41b9be38ee5146e5870672416db12 )
67+- google play movies ( 50ba2b9e87ef61e96da124f906d3aff4c7870e3f )
68+- google news ( #2483 #2498 )
69+- google scholar ( #2611 )
70+- google video ( #2482 )
71+- hoogle ( 6255b33c9dcf0d28f0a3307af988565f69259ce2 )
72+- naver ( #2542 )
73+- semantic schollar ( f596f5767bed915a5c3bed59ae26283e53f975ca f596f5767bed915a5c3bed59ae26283e53f975ca )
74+- startpage ( #2396 )
75+- seznam ( #2564 28286cf3f2308113bf440fb6e7cf326c6ed07889 )
76+- wikipedia ( #2554 #2565 #2681 #2681 )
77+- yacy ( #2669 )
78+- yahoo news ( #2640 #2655 )
79+
80+Updated engines
81+~~~~~~~~~~~~~~~
82+
83+- duckduckgo ( 5f450fda74e80bf350eb1493f66cfa61deaf5cea )
84+- geektimes ( 45f0e1a859fa12ce2ae0c24dc356922fcad50c8d )
85+- lobste.rs ( 06b754ad67aa6066aed6df77b5ffb74aabebb040 )
86+- soundcloud ( #2671 )
87+- peertube ( #2570 )
88+- recoll ( #2539 )
89+- yggtorrent ( #2573 )
90+
91+Removed engines
92+~~~~~~~~~~~~~~~
93+
94+- acgsou ( #2654 )
95+- google_play_music ( #2558 )
96+- metager ( #2538 )
97+- voat ( #2445 )
98+- yandex ( #2566 )
99+
100+Bug fixes
101+~~~~~~~~~
102+
103+- Fix empty colon in query from selecting Chinese ( #2454 )
104+- Get correct locale with country from browser ( #2531 )
105+
106+Code refactoring / reduce the technical debt
107+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
108+
109+- refactor searx.search.SearchQuery and searx.search.EngineRef ( #2398 )
110+- dynamically set language_support variable ( #2499 )
111+- engines: add about variable ( #2460 )
112+- processors ( #2225 5c6a5407a0b124c3323e73c33b81ec1fbd7d2fce )
113+- remove Fabric file ( #2494 )
114+- use unittest from py3, remove unittest2 from py2 ( #2608 )
115+
116+Github
117+~~~~~~
118+
119+- add notice for the issue templates ( #2447 )
120+- every Sunday, call utils/fetch_*.py scripts and create a PR automatically ( #2500 728e09676400221a064627509a31470d8f6e33bf )
121+- minor change: replace "travis" by "CI" ( #2528 )
122+
123+Build scripts
124+~~~~~~~~~~~~~
125+
126+- update secret key check ( #2411 )
127+- fix makefile targets `books/{name}.*` and `books/user.pdf` ( #2420 #2530 )
128+- upload-pypi-test & linuxdoc has been released on PyPi ( #2456 )
129+- fix makefile target `gh-pages` : flatten history of branch gh.pages ( #2514 )
130+- optimize creation of the virtualenv & pyenvinstall targets ( #2421 )
131+- update pyenv pyenvinstall Make targets ( #2517 )
132+- makefile.python: remove duplicate pyenv-(un)install targets ( #2418 )
133+- [fix] make targets engines.languages and useragents.update ( #2643 )
134+- [fix] utils/serax.sh create_pyenv() - drop duplicate 'pip install .' ( #2621 )
135+
136+Install scripts
137+~~~~~~~~~~~~~~~
138+
139+- drop Ubuntu 16.04 (Xenial Xerus) support ( #2619 )
140+- replace ubu1910 image by ubu2010 image ( #2435 )
141+- LXC switch to Fedora 33 / Fedora 31 reached its EOL #2634 ( #2634 )
142+- add package which to CentOS-7 boilerplate ( #2623 )
143+- use SEARX_SETTINGS_TEMPLATE from .config environment ( #2417 )
144+- determine path to makefile.lxc in a LXC ( #2399 )
145+- remove unused code ( #2401 #2497 )
146+- support git versions <v2.22 ( #2620 )
147+
148+Announcement
149+~~~~~~~~~~~~
150+
151+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.
152+
153+
154+0.18.0 2020.12.14
155+=================
156+
157+Core
158+~~~~
159+
160+- drop Python 2 support ( #2137 #2244 )
161+- separate index and search routes ( #1681 ). ⚠️ add & remove your searx instance(s) from your browser.
162+- add external_bang ( #2027 #2043 #2059 )
163+- add external plugins supports ( #2074 )
164+- add plugin converting strings into hash digests ( #1246 )
165+- new category: Onions ( #565 )
166+- allow searx query parts anywhere in the query ( commit aa3c18dda9329fff875328f6ba97483c417b149a 2aef38c3b9d1fe93e9d665a49b10151d63d92392 )
167+- preferences: use base_url for prefix of sharing 'currenly saved preferences' (#1249 )
168+- upgrade to request 2.24.0, pyopenssl is optional ( #2199 )
169+- force admins to set secret_key if debug mode is disabled ( #2256 )
170+- standalone searx update ( #1591 )
171+- architecture clean up ( #2140 #2185 #2195 #2196 #2198 #2189 #2208 #2239 #2241 #2246 #2248 )
172+- record detail about engine error ( #2332 #2375 #2350 ). Add a new API endpoint: ``/stats/errors``.
173+- display if an engine does not support HTTPS requests ( #2373 )
174+
175+New settings.yml
176+~~~~~~~~~~~~~~~~
177+
178+- ``use_default_settings``: user settings can relied on the default settings ( #2291 #2362 #2349 )
179+- ``ui.results_on_new_tab: False`` - for opening result links in a new tab ( #2167 )
180+- ``ui.advanced_search`` - add preference for displaying advanced settings ( #2327 )
181+- ``server.method: "POST"`` - Make default query submission method configurable ( #2130 )
182+- ``server.default_http_headers`` - add default http headers ( #2295 )
183+- ``engines.*.proxies`` - Using proxy only for specific engines ( #1827 #2319 ), see https://searx.github.io/searx/dev/engine_overview.html#settings-yml
184+- ``enabled_plugins`` - Enabled plugins ( a05c660e3036ad8d02072fc6731af54c2ed6151c )
185+- ``preferences.lock`` - Let admins lock user preferences ( #2270 )
186+
187+Oscar theme
188+~~~~~~~~~~~
189+
190+- update infobox ( #2131 )
191+
192+ - Make infoboxes shorter by default.
193+ - Hide the main image by default as well and set a maximum height even when expanded.
194+ - Add a toggle at the bottom of the infobox to expand it or to shrink it again.
195+ - Fix pointhi style
196+- query suggestion does not keep the language tag of the original query ( #1314 )
197+- fix the clear button ( #2306 )
198+
199+Simple theme
200+~~~~~~~~~~~~
201+
202+- Fix autocomplete ( #2205 )
203+
204+New engines
205+~~~~~~~~~~~
206+
207+- ahmia, not_evil ( #565 )
208+- codeberg ( #2104 )
209+- command line engines: git grep, find, etc. ( #2128 #2250 )
210+- elasticsearch ( #2292 )
211+- metager ( #2139 )
212+- naver ( #1912 )
213+- opensemanticsearch ( #2271 )
214+- peertube ( #2109 )
215+- recoll (#2325)
216+- sepiasearch ( #2227 )
217+
218+Updated engines
219+~~~~~~~~~~~~~~~
220+
221+- digg ( #2285 )
222+- dbpedia ( #2352 )
223+- duckduckgo_definitions ( #2224 #2356 )
224+- duden ( #2359 )
225+- invidious ( #2116 )
226+- libgen ( #2360 )
227+- photon ( #2336 )
228+- soundclound ( #2365 )
229+- wikipedia ( #2178 #2363 #2354 )
230+- wikidata ( #2151 #2224 #2353 ) - faster response time
231+- yaCy ( #2255 ) - support HTTP digest authentication.
232+- youtube_noapi ( #2364 )
233+
234+Fixed engines
235+~~~~~~~~~~~~~
236+
237+- 1x ( #2361 )
238+- answer 'random sha256' ( #2121 )
239+- bing image ( #1496 )
240+- duckduckgo ( #2254 )
241+- genius ( #2371 )
242+- google ( #2236 )
243+- google image ( #2115 )
244+- lobste.rs ( #2253 )
245+- piratebay ( #2133 )
246+- startpage ( #2385 )
247+- torrentz ( #2101 )
248+
249+Removed engines
250+~~~~~~~~~~~~~~~
251+
252+- filecrop ( #2352 )
253+- searchcode_doc ( #2372 )
254+- seedpeer ( #2366 )
255+- twitter ( #2372 )
256+- yggtorrent ( #2099 #2375 )
257+
258+Install scripts & documentation
259+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
260+
261+- install script & documentation ( #2384 #2380 #2362 #2287 #2283 #2277 #2223 #2211 #2118 #2117 #2063 )
262+
263+Docker image
264+~~~~~~~~~~~~
265+
266+- use Alpine 3.12 ( #1983 )
267+- uwsgi serves the static files directly. ( #1865 )
268+- fix k8s support ( #2099 )
269+- make docker produces clean tag version ( #2182 )
270+
271+Bug fixes
272+~~~~~~~~~
273+
274+- searx.utils.HTMLTextExtractor: invalid HTML don't raise an Exception ( #2190 )
275+- Fix static URL ( commit da8b227044f45127f705f6ea94a72d368eea73bb )
276+- Fix autocomplete ( #2127 )
277+- Fix opensearch.xml ( #2132 #2247 )
278+- Fix documentation build ( #2237 )
279+- Some fixes in the fetch languages script ( #2212 )
280+
281+Special thanks to `NLNet <https://nlnet.nl>`__ for sponsoring multiple features of this release.
282+
283+
284+0.17.0 2020.07.09
285+=================
286+
287+ - New engines
288+
289+ - eTools
290+ - Wikibooks
291+ - Wikinews
292+ - Wikiquote
293+ - Wikisource
294+ - Wiktionary
295+ - Wikiversity
296+ - Wikivoyage
297+ - Rubygems
298+ - Engine fixes (google, google images, startpage, gigablast, yacy)
299+ - Private engines introduced - more details: https://searx.github.io/searx/blog/private-engines.html
300+ - Greatly improved documentation - check it at https://searx.github.io/searx
301+ - Added autofocus to all search inputs
302+ - CSP friendly oscar theme
303+ - Added option to hide engine errors with `display_error_messages` engine option (true/false values, default is true)
304+ - Tons of accessibility fixes - see https://github.com/searx/searx/issues/350 for details
305+ - More flexible branding options: configurable vcs/issue tracker links
306+ - Added "disable all" & "allow all" options to preferences engine select
307+ - Autocomplete keyboard navigation fixes
308+ - Configurable category order
309+ - Wrap long lines in infoboxes
310+ - Added RSS subscribtion link
311+ - Added routing directions to OSM results
312+ - Added author and length attributes to youtube videos
313+ - Fixed image stretch with mobile viewport in oscar theme
314+ - Added translatable JS strings
315+ - Better HTML annotations - engine names and endpoints are available as classes
316+ - RTL text fixes in oscar theme
317+ - Handle weights in accept-language HTTP headers
318+ - Added answerer results to rss/csv output
319+ - Added new autocomplete backends to settings.yml
320+ - Updated opensearch.xml
321+ - Fixed custom locale setting from settings.yml
322+ - Translation updates
323+ - Removed engines: faroo
324+
325+Special thanks to `NLNet <https://nlnet.nl>`__ for sponsoring multiple features of this release.
326+Special thanks to https://www.accessibility.nl/english for making accessibilty audit.
327+
328+News
329+~~~~
330+
331+- @HLFH joined the maintainer team
332+- Dropped Python2 support
333+
13340.16.0 2020.01.30
2335=================
3336
@@ -92,8 +425,8 @@ News
92425
93426- Bug fixes
94427
95− - https://github.com/asciimoo/searx/issues/1088
96− - https://github.com/asciimoo/searx/issues/1089
428+ - https://github.com/searx/searx/issues/1088
429+ - https://github.com/searx/searx/issues/1089
97430
98431- Dependency updates
99432
@@ -262,7 +595,7 @@ News
262595News
263596~~~~
264597
265−New documentation page is available: https://asciimoo.github.io/searx
598+New documentation page is available: https://searx.github.io/searx
266599
267600
2686010.8.0 2015.09.08
CONTRIBUTING.mdnew file+49
@@ -0,0 +1,49 @@
1+# How to contribute
2+
3+## Resources in the documentation
4+
5+* [Development quickstart](https://searx.github.io/searx/dev/contribution_guide.html)
6+* [Contribution guide](https://searx.github.io/searx/dev/contribution_guide.html)
7+
8+## Submitting PRs
9+
10+Please follow the provided PR template when writing a description for your changes.
11+
12+Do not take criticism personally. When you get feedback, it is about your work,
13+not your character, personality, etc. Keep in mind we all want to make the project better.
14+
15+When something is not clear, please ask questions to clear things up.
16+
17+If you would like to introduce a big architectural changes or do a refactoring
18+either in the codebase or the development tools, please open an issue with a proposal
19+first. This way we can think together about the problem and probably come up
20+with a better solution.
21+
22+## Coding conventions and guidelines
23+
24+### Commit messages
25+
26+* Always write descriptive commit messages ("fix bug" is not acceptable).
27+* Use the present tense ("Add feature" not "Added feature").
28+* Use the imperative mood ("Move cursor to..." not "Moves cursor to...").
29+* Limit the first line to 72 characters or less.
30+* Include the number of the issue you are fixing.
31+
32+### Coding guidelines
33+
34+As a Python project, we must follow [PEP 8](https://www.python.org/dev/peps/pep-0008/) and [PEP 20](https://www.python.org/dev/peps/pep-0020/) guidelines.
35+
36+Furthermore, follow the Clean code conventions. The most important
37+in this project are the following rules:
38+
39+* Simpler is better. [KISS principle](https://en.wikipedia.org/wiki/KISS_principle)
40+* Be consistent.
41+* Every function must do one thing.
42+* Use descriptive names for functions and variables.
43+* Always look for the root cause.
44+* Keep configurable data high level.
45+* Avoid negative conditionals.
46+* Prefer fewer arguments.
47+* Do not add obvious comment to code.
48+* Do not comment out code, just delete lines.
49+
Dockerfile+26−18
@@ -1,28 +1,22 @@
1−FROM alpine:3.10
1+FROM alpine:3.15
22ENTRYPOINT ["/sbin/tini","--","/usr/local/searx/dockerfiles/docker-entrypoint.sh"]
33EXPOSE 8080
44VOLUME /etc/searx
55VOLUME /var/log/uwsgi
66
7−ARG VERSION_GITCOMMIT=unknown
8−ARG SEARX_GIT_VERSION=unknown
9−
107ARG SEARX_GID=977
118ARG SEARX_UID=977
129
1310RUN addgroup -g ${SEARX_GID} searx && \
1411 adduser -u ${SEARX_UID} -D -h /usr/local/searx -s /bin/sh -G searx searx
1512
16−ARG TIMESTAMP_SETTINGS=0
17−ARG TIMESTAMP_UWSGI=0
18−ARG LABEL_VCS_REF=
19−ARG LABEL_VCS_URL=
20−
2113ENV INSTANCE_NAME=searx \
2214 AUTOCOMPLETE= \
2315 BASE_URL= \
2416 MORTY_KEY= \
25− MORTY_URL=
17+ MORTY_URL= \
18+ SEARX_SETTINGS_PATH=/etc/searx/settings.yml \
19+ UWSGI_SETTINGS_PATH=/etc/searx/uwsgi.ini
2620
2721WORKDIR /usr/local/searx
2822
@@ -44,29 +38,43 @@ RUN apk upgrade --no-cache \
4438 ca-certificates \
4539 su-exec \
4640 python3 \
41+ py3-pip \
4742 libxml2 \
4843 libxslt \
4944 openssl \
5045 tini \
5146 uwsgi \
5247 uwsgi-python3 \
53− && pip3 install --upgrade pip \
48+ brotli \
49+ && pip3 install --upgrade pip wheel setuptools \
5450 && pip3 install --no-cache -r requirements.txt \
55− && apk del build-dependencies
51+ && apk del build-dependencies \
52+ && rm -rf /root/.cache
5653
57−COPY --chown=searx:searx . .
54+COPY searx ./searx
55+COPY dockerfiles ./dockerfiles
5856
59−RUN su searx -c "/usr/bin/python3 -m compileall -q searx"; \
57+ARG TIMESTAMP_SETTINGS=0
58+ARG TIMESTAMP_UWSGI=0
59+ARG VERSION_GITCOMMIT=unknown
60+
61+RUN /usr/bin/python3 -m compileall -q searx; \
6062 touch -c --date=@${TIMESTAMP_SETTINGS} searx/settings.yml; \
6163 touch -c --date=@${TIMESTAMP_UWSGI} dockerfiles/uwsgi.ini; \
6264 if [ ! -z $VERSION_GITCOMMIT ]; then\
6365 echo "VERSION_STRING = VERSION_STRING + \"-$VERSION_GITCOMMIT\"" >> /usr/local/searx/searx/version.py; \
64− fi
66+ fi; \
67+ find /usr/local/searx/searx/static -a \( -name '*.html' -o -name '*.css' -o -name '*.js' \
68+ -o -name '*.svg' -o -name '*.ttf' -o -name '*.eot' \) \
69+ -type f -exec gzip -9 -k {} \+ -exec brotli --best {} \+
6570
66−
67−# Keep this argument at the end since it change each time
71+# Keep these arguments at the end to prevent redundant layer rebuilds
6872ARG LABEL_DATE=
69−LABEL maintainer="searx <https://github.com/asciimoo/searx>" \
73+ARG GIT_URL=unknown
74+ARG SEARX_GIT_VERSION=unknown
75+ARG LABEL_VCS_REF=
76+ARG LABEL_VCS_URL=
77+LABEL maintainer="searx <${GIT_URL}>" \
7078 description="A privacy-respecting, hackable metasearch engine." \
7179 version="${SEARX_GIT_VERSION}" \
7280 org.label-schema.schema-version="1.0" \
Makefile+77−96
@@ -1,126 +1,107 @@
11# -*- coding: utf-8; mode: makefile-gmake -*-
2+# SPDX-License-Identifier: AGPL-3.0-or-later
23
3−include ./.config.mk
4−
5−PYOBJECTS = searx
6−DOC = docs
7−PY_SETUP_EXTRAS ?= \[test\]
8−
9−PYDIST=./dist/py
10−PYBUILD=./build/py
4+.DEFAULT_GOAL=help
5+export MTOOLS=./manage
116
127include utils/makefile.include
13−include utils/makefile.python
14−include utils/makefile.sphinx
158
169all: clean install
1710
1811PHONY += help
12+
1913help:
20− @echo ' test - run developer tests'
21− @echo ' docs - build documentation'
22− @echo ' docs-live - autobuild HTML documentation while editing'
23− @echo ' run - run developer instance'
24− @echo ' install - developer install (./local)'
25− @echo ' uninstall - uninstall (./local)'
26− @echo ' gh-pages - build docs & deploy on gh-pages branch'
27− @echo ' clean - drop builds and environments'
28− @echo ' project - re-build generic files of the searx project'
29− @echo ''
30− @echo 'environment'
31− @echo ' SEARX_URL = $(SEARX_URL)'
32− @echo ' GIT_URL = $(GIT_URL)'
33− @echo ' DOCS_URL = $(DOCS_URL)'
34− @echo ''
35− @$(MAKE) -s -f utils/makefile.include make-help
36− @echo ''
37− @$(MAKE) -s -f utils/makefile.python python-help
38−
39−PHONY += install
40−install: pyenvinstall
41−
42−PHONY += uninstall
43−uninstall: pyenvuninstall
14+ @./manage --help
15+ @echo '----'
16+ @echo 'run - run developer instance'
17+ @echo 'install - developer install of searx into virtualenv'
18+ @echo 'uninstall - uninstall developer installation'
19+ @echo 'clean - clean up working tree'
20+ @echo 'search.checker - check search engines'
21+ @echo 'test - run shell & CI tests'
22+ @echo 'test.sh - test shell scripts'
23+ @echo 'ci.test - run CI tests'
4424
45−PHONY += clean
46−clean: pyclean
47− $(call cmd,common_clean)
4825
4926PHONY += run
50−run: pyenvinstall
27+run: install
5128 $(Q) ( \
52− sed -i -e "s/debug : False/debug : True/g" ./searx/settings.yml ; \
5329 sleep 2 ; \
5430 xdg-open http://127.0.0.1:8888/ ; \
55− sleep 3 ; \
56− sed -i -e "s/debug : True/debug : False/g" ./searx/settings.yml ; \
5731 ) &
58− $(PY_ENV)/bin/python ./searx/webapp.py
59−
60−# docs
61−# ----
62−
63−PHONY += docs
64−
65−docs: pyenvinstall sphinx-doc prebuild-includes
66− $(call cmd,sphinx,html,docs,docs)
32+ SEARX_DEBUG=1 ./manage pyenv.cmd python ./searx/webapp.py
6733
68−PHONY += docs-live
69−docs-live: pyenvinstall sphinx-live prebuild-includes
70− $(call cmd,sphinx_autobuild,html,docs,docs)
34+PHONY += install uninstall
35+install uninstall:
36+ $(Q)./manage pyenv.$@
7137
72−prebuild-includes:
73− @mkdir -p $(DOCS_BUILD)/includes
74− @./utils/searx.sh doc | cat > $(DOCS_BUILD)/includes/searx.rst
75− @./utils/filtron.sh doc | cat > $(DOCS_BUILD)/includes/filtron.rst
76− @./utils/morty.sh doc | cat > $(DOCS_BUILD)/includes/morty.rst
77−
78−
79−$(GH_PAGES)::
80− @echo "doc available at --> $(DOCS_URL)"
81−
82−# update project files
83−# --------------------
84−
85−PHONY += project engines-languages
38+PHONY += clean
39+clean: py.clean docs.clean node.clean test.clean
40+ $(Q)./manage build_msg CLEAN "common files"
41+ $(Q)find . -name '*.orig' -exec rm -f {} +
42+ $(Q)find . -name '*.rej' -exec rm -f {} +
43+ $(Q)find . -name '*~' -exec rm -f {} +
44+ $(Q)find . -name '*.bak' -exec rm -f {} +
45+
46+PHONY += search.checker search.checker.%
47+search.checker: install
48+ $(Q)./manage pyenv.cmd searx-checker -v
49+
50+search.checker.%: install
51+ $(Q)./manage pyenv.cmd searx-checker -v "$(subst _, ,$(patsubst search.checker.%,%,$@))"
52+
53+PHONY += ci.test test test.sh
54+ci.test: test.pep8 test.pylint test.unit test.robot
55+test: ci.test
56+test.sh:
57+ $(Q)shellcheck -x -s bash \
58+ utils/brand.env \
59+ ./manage \
60+ utils/lib.sh \
61+ utils/filtron.sh \
62+ utils/searx.sh \
63+ utils/morty.sh \
64+ utils/lxc.sh \
65+ utils/lxc-searx.env \
66+ .config.sh
67+ $(Q)./manage build_msg TEST "$@ OK"
8668
87−project: searx/data/engines_languages.json
8869
89−searx/data/engines_languages.json: pyenvinstall
90− $(PY_ENV_ACT); python utils/fetch_languages.py
91− mv engines_languages.json searx/data/engines_languages.json
92− mv languages.py searx/languages.py
70+# wrap ./manage script
9371
94−# test
95−# ----
72+MANAGE += buildenv
73+MANAGE += babel.compile
74+MANAGE += data.all data.languages data.useragents
75+MANAGE += docs.html docs.live docs.gh-pages docs.prebuild docs.clean
76+MANAGE += docker.build docker.push
77+MANAGE += gecko.driver
78+MANAGE += node.env node.clean
79+MANAGE += py.build py.clean
80+MANAGE += pyenv pyenv.install pyenv.uninstall
81+MANAGE += pypi.upload pypi.upload.test
82+MANAGE += test.pylint test.pep8 test.unit test.coverage test.robot test.clean
83+MANAGE += themes.all themes.oscar themes.simple themes.bootstrap
9684
97−PHONY += test test.sh test.pylint test.pep8 test.unit test.robot
85+PHONY += $(MANAGE)
9886
99−test: test.pylint test.pep8 test.unit test.robot
87+$(MANAGE):
88+ $(Q)$(MTOOLS) $@
10089
101−# TODO: balance linting with pylint
90+# deprecated
10291
103−test.pylint: pyenvinstall
104− $(call cmd,pylint,searx/preferences.py)
105− $(call cmd,pylint,searx/testing.py)
92+PHONY += docs docs-clean docs-live docker themes
10693
107−test.sh:
108− shellcheck -x utils/lib.sh
109− shellcheck -x utils/filtron.sh
110− shellcheck -x utils/searx.sh
111− shellcheck -x utils/morty.sh
112− shellcheck -x utils/lxc.sh
113− shellcheck -x utils/lxc-searx.env
114− shellcheck -x .config.sh
94+docs: docs.html
95+ $(Q)./manage build_msg WARN $@ is deprecated use docs.html
11596
116−test.pep8: pyenvinstall
117− $(PY_ENV_ACT); ./manage.sh pep8_check
97+docs-clean: docs.clean
98+ $(Q)./manage build_msg WARN $@ is deprecated use docs.clean
11899
119−test.unit: pyenvinstall
120− $(PY_ENV_ACT); ./manage.sh unit_tests
100+docs-live: docs.live
101+ $(Q)./manage build_msg WARN $@ is deprecated use docs.live
121102
122−test.robot: pyenvinstall
123− $(PY_ENV_ACT); ./manage.sh install_geckodriver
124− $(PY_ENV_ACT); ./manage.sh robot_tests
103+docker: docker.build
104+ $(Q)./manage build_msg WARN $@ is deprecated use docker.build
125105
126−.PHONY: $(PHONY)
106+themes: themes.all
107+ $(Q)./manage build_msg WARN $@ is deprecated use themes.all
PULL_REQUEST_TEMPLATE.mdnew file+25
@@ -0,0 +1,25 @@
1+## What does this PR do?
2+
3+<!-- MANDATORY -->
4+
5+<!-- explain the changes in your PR, algorithms, design, architecture -->
6+
7+## Why is this change important?
8+
9+<!-- MANDATORY -->
10+
11+<!-- explain the motivation behind your PR -->
12+
13+## How to test this PR locally?
14+
15+<!-- commands to run the tests or instructions to test the changes-->
16+
17+## Author's checklist
18+
19+<!-- additional notes for reviewiers -->
20+
21+## Related issues
22+
23+<!--
24+Closes #234
25+-->
README.rst+53−43
@@ -1,63 +1,73 @@
1−searx
2−=====
1+.. SPDX-License-Identifier: AGPL-3.0-or-later
2+
3+.. figure:: https://raw.githubusercontent.com/searx/searx/master/searx/static/themes/oscar/img/logo_searx_a.png
4+ :target: https://searx.github.io/searx/
5+ :alt: searX
6+ :width: 100%
7+ :align: center
8+
9+-------
10+
11+|searx install|
12+|searx homepage|
13+|searx wiki|
14+|AGPL License|
15+|Issues|
16+|commits|
17+|OpenCollective searx backers|
18+|OpenCollective searx sponsors|
319
4−A privacy-respecting, hackable `metasearch
5−engine <https://en.wikipedia.org/wiki/Metasearch_engine>`__.
20+Privacy-respecting, hackable `metasearch engine`_ / *pronunciation* **sɜːks**.
621
7−Pronunciation: səːks
22+.. _metasearch engine: https://en.wikipedia.org/wiki/Metasearch_engine
823
9−List of `running
10−instances <https://searx.space/>`__.
24+.. |searx install| image:: https://img.shields.io/badge/-install-blue
25+ :target: https://searx.github.io/searx/admin/installation.html
1126
12−See the `documentation <https://asciimoo.github.io/searx>`__ and the `wiki <https://github.com/asciimoo/searx/wiki>`__ for more information.
27+.. |searx homepage| image:: https://img.shields.io/badge/-homepage-blue
28+ :target: https://searx.github.io/searx
1329
14−|OpenCollective searx backers|
15−|OpenCollective searx sponsors|
30+.. |searx wiki| image:: https://img.shields.io/badge/-wiki-blue
31+ :target: https://github.com/searx/searx/wiki
1632
17−Installation
18−~~~~~~~~~~~~
33+.. |AGPL License| image:: https://img.shields.io/badge/license-AGPL-blue.svg
34+ :target: https://github.com/searx/searx/blob/master/LICENSE
1935
20−With Docker
21−-----------
22−Go to the `searx-docker <https://github.com/searx/searx-docker>`__ project.
36+.. |Issues| image:: https://img.shields.io/github/issues/searx/searx?color=yellow&label=issues
37+ :target: https://github.com/searx/searx/issues
2338
24−Without Docker
25−--------------
26−For all of the details, follow this `step by step installation <https://asciimoo.github.io/searx/admin/installation.html>`__.
39+.. |PR| image:: https://img.shields.io/github/issues-pr-raw/searx/searx?color=yellow&label=PR
40+ :target: https://github.com/searx/searx/pulls
2741
28−Note: the documentation needs to be updated.
42+.. |commits| image:: https://img.shields.io/github/commit-activity/y/searx/searx?color=yellow&label=commits
43+ :target: https://github.com/searx/searx/commits/master
2944
30−If you are in a hurry
31−---------------------
32−- clone the source:
33− ``git clone https://github.com/asciimoo/searx.git && cd searx``
34−- install dependencies: ``./manage.sh update_packages``
35−- edit your
36− `settings.yml <https://github.com/asciimoo/searx/blob/master/searx/settings.yml>`__
37− (set your ``secret_key``!)
38−- run ``python searx/webapp.py`` to start the application
45+.. |OpenCollective searx backers| image:: https://opencollective.com/searx/backers/badge.svg
46+ :target: https://opencollective.com/searx#backer
3947
48+.. |OpenCollective searx sponsors| image:: https://opencollective.com/searx/sponsors/badge.svg
49+ :target: https://opencollective.com/searx#sponsor
4050
41−Bugs
42−~~~~
4351
44−Bugs or suggestions? Visit the `issue
45−tracker <https://github.com/asciimoo/searx/issues>`__.
52+If you are looking for running instances, ready to use, then visit searx.space_.
4653
47−`License <https://github.com/asciimoo/searx/blob/master/LICENSE>`__
48−~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
54+Otherwise jump to the user_, admin_ and developer_ handbooks you will find on
55+our homepage_.
4956
50−More about searx
51−~~~~~~~~~~~~~~~~
57+.. _searx.space: https://searx.space
58+.. _user: https://searx.github.io/searx/user
59+.. _admin: https://searx.github.io/searx/admin
60+.. _developer: https://searx.github.io/searx/dev
61+.. _homepage: https://searx.github.io/searx
5262
53−- `openhub <https://www.openhub.net/p/searx/>`__
54−- `twitter <https://twitter.com/Searx_engine>`__
55−- IRC: #searx @ freenode
63+contact:
64+ openhub_ // twitter_ // IRC: #searx @ Libera (irc.libera.chat)
5665
66+.. _openhub: https://www.openhub.net/p/searx
67+.. _twitter: https://twitter.com/Searx_engine
5768
58−.. |OpenCollective searx backers| image:: https://opencollective.com/searx/backers/badge.svg
59− :target: https://opencollective.com/searx#backer
69+-------
6070
71+|gluten free|
6172
62−.. |OpenCollective searx sponsors| image:: https://opencollective.com/searx/sponsors/badge.svg
63− :target: https://opencollective.com/searx#sponsor
73+.. |gluten free| image:: https://forthebadge.com/images/featured/featured-gluten-free.svg
dockerfiles/docker-entrypoint.sh+33−20
@@ -1,15 +1,40 @@
11#!/bin/sh
22
3−export SEARX_VERSION=$(su searx -c 'python3 -c "import six; import searx.version; six.print_(searx.version.VERSION_STRING)"')
4−printf 'searx version %s\n\n' "${SEARX_VERSION}"
5−
6−export UWSGI_SETTINGS_PATH=/etc/searx/uwsgi.ini
7−export SEARX_SETTINGS_PATH=/etc/searx/settings.yml
3+help() {
4+ printf "Command line:\n\n"
5+ printf " -h Display this help\n"
6+ printf " -d Dry run to update the configuration files.\n"
7+ printf " -f Always update on the configuration files (existing files are renamed with the .old suffix)\n"
8+ printf " Without this option, the new configuration files are copied with the .new suffix\n"
9+ printf "\nEnvironment variables:\n\n"
10+ printf " INSTANCE_NAME settings.yml : general.instance_name\n"
11+ printf " AUTOCOMPLETE settings.yml : search.autocomplete\n"
12+ printf " BASE_URL settings.yml : server.base_url\n"
13+ printf " MORTY_URL settings.yml : result_proxy.url\n"
14+ printf " MORTY_KEY settings.yml : result_proxy.key\n"
15+ printf " BIND_ADDRESS uwsgi bind to the specified TCP socket using HTTP protocol. Default value: \"${DEFAULT_BIND_ADDRESS}\"\n"
16+ printf "\nVolume:\n\n"
17+ printf " /etc/searx the docker entry point copies settings.yml and uwsgi.ini in this directory (see the -f command line option)\n"
18+ echo
19+ exit 0
20+}
821
22+export DEFAULT_BIND_ADDRESS="0.0.0.0:8080"
923if [ -z "${BIND_ADDRESS}" ]; then
10− export BIND_ADDRESS=":8080"
24+ export BIND_ADDRESS="${DEFAULT_BIND_ADDRESS}"
1125fi
1226
27+# Parse special command line
28+# see docs/admin/installation-docker.rst
29+# display the help message without the version
30+if [ "$1" = "help" ]; then
31+ help
32+fi
33+
34+# Version
35+export SEARX_VERSION=$(su searx -c 'python3 -c "import six; import searx.version; six.print_(searx.version.VERSION_STRING)"' 2>/dev/null)
36+printf 'searx version %s\n\n' "${SEARX_VERSION}"
37+
1338# Parse command line
1439FORCE_CONF_UPDATE=0
1540DRY_RUN=0
@@ -23,19 +48,7 @@ do
2348 DRY_RUN=1
2449 ;;
2550 h)
26− printf "Command line:\n\n"
27− printf " -h Display this help\n"
28− printf " -d Dry run to update the configuration files.\n"
29− printf " -f Always update on the configuration files (existing files are renamed with the .old suffix)\n"
30− printf " Without this option, new configuration files are copied with the .new suffix\n"
31− printf "\nEnvironment variables:\n\n"
32− printf " INSTANCE_NAME settings.yml : general.instance_name\n"
33− printf " AUTOCOMPLETE settings.yml : search.autocomplete\n"
34− printf " BASE_URL settings.yml : server.base_url\n"
35− printf " MORTY_URL settings.yml : result_proxy.url\n"
36− printf " MORTY_KEY settings.yml : result_proxy.key\n"
37− printf " BIND_ADDRESS where uwsgi will accept HTTP request (format : host:port)\n"
38− exit 0
51+ help
3952 esac
4053done
4154
@@ -50,7 +63,7 @@ patch_searx_settings() {
5063 CONF="$1"
5164
5265 # Make sure that there is trailing slash at the end of BASE_URL
53− # see http://www.gnu.org/savannah-checkouts/gnu/bash/manual/bash.html#Shell-Parameter-Expansion
66+ # see https://www.gnu.org/savannah-checkouts/gnu/bash/manual/bash.html#Shell-Parameter-Expansion
5467 export BASE_URL="${BASE_URL%/}/"
5568
5669 # update settings.yml
dockerfiles/uwsgi.ini+10
@@ -35,3 +35,13 @@ logto = /var/log/uwsgi/uwsgi.log
3535# No keep alive
3636# See https://github.com/searx/searx-docker/issues/24
3737add-header = Connection: close
38+
39+# uwsgi serves the static files
40+# expires set to one day as Flask does
41+static-map = /static=/usr/local/searx/searx/static
42+static-expires = /* 864000
43+static-gzip-all = True
44+offload-threads = %k
45+
46+# Cache
47+cache2 = name=searxcache,items=2000,blocks=2000,blocksize=4096,bitmap=1
docs/admin/arch_public.dot+4−4
@@ -4,11 +4,11 @@ digraph G {
44 edge [fontname="Sans"];
55
66 browser [label="Browser", shape=Mdiamond];
7− rp [label="Reverse Proxy", href="https://asciimoo.github.io/searx/utils/filtron.sh.html#public-reverse-proxy"];
8− filtron [label="Filtron", href="https://asciimoo.github.io/searx/utils/filtron.sh.html"];
9− morty [label="Morty", href="https://asciimoo.github.io/searx/utils/morty.sh.html"];
7+ rp [label="Reverse Proxy", href="https://searx.github.io/searx/utils/filtron.sh.html#public-reverse-proxy"];
8+ filtron [label="Filtron", href="https://searx.github.io/searx/utils/filtron.sh.html"];
9+ morty [label="Morty", href="https://searx.github.io/searx/utils/morty.sh.html"];
1010 static [label="Static files", href="url to configure static files"];
11− uwsgi [label="uwsgi", href="https://asciimoo.github.io/searx/utils/searx.sh.html"]
11+ uwsgi [label="uwsgi", href="https://searx.github.io/searx/utils/searx.sh.html"]
1212 searx1 [label="Searx #1"];
1313 searx2 [label="Searx #2"];
1414 searx3 [label="Searx #3"];
docs/admin/architecture.rst+8−6
@@ -4,12 +4,14 @@
44Architecture
55============
66
7−.. sidebar:: Tooling box
8−
9− - :ref:`searx & uwsgi <searx.sh>`
10− - :ref:`filtron <filtron.sh>`
11− - :ref:`reverse proxy`
12− - :ref:`morty <morty.sh>`
7+.. sidebar:: Further reading
8+
9+ - Reverse Proxy: :ref:`Apache <apache searx site>` & :ref:`nginx <nginx searx
10+ site>`
11+ - Filtron: :ref:`searx filtron`
12+ - Morty: :ref:`searx morty`
13+ - uWSGI: :ref:`searx uwsgi`
14+ - Searx: :ref:`installation basic`
1315
1416Herein you will find some hints and suggestions about typical architectures of
1517searx infrastructures.
docs/admin/buildhosts.rst+24−9
@@ -4,9 +4,6 @@
44Buildhosts
55==========
66
7−To get best results from build, its recommend to install additional packages
8−on build hosts.
9−
107.. sidebar:: This article needs some work
118
129 If you have any contribution send us your :pull:`PR <../pulls>`, see
@@ -17,6 +14,23 @@ on build hosts.
1714 :local:
1815 :backlinks: entry
1916
17+To get best results from build, its recommend to install additional packages
18+on build hosts (see :ref:`searx.sh`).::
19+
20+ sudo -H ./utils/searx.sh install buildhost
21+
22+This will install packages needed by searx:
23+
24+.. kernel-include:: $DOCS_BUILD/includes/searx.rst
25+ :start-after: START distro-packages
26+ :end-before: END distro-packages
27+
28+and packages needed to build docuemtation and run tests:
29+
30+.. kernel-include:: $DOCS_BUILD/includes/searx.rst
31+ :start-after: START build-packages
32+ :end-before: END build-packages
33+
2034.. _docs build:
2135
2236Build docs
@@ -35,9 +49,9 @@ Build docs
3549 - dvisvgm_
3650
3751Most of the sphinx requirements are installed from :origin:`setup.py` and the
38−docs can be build from scratch with ``make docs``. For better math and image
39−processing additional packages are needed. The XeTeX_ needed not only for PDF
40−creation, its also needed for :ref:`math` when HTML output is build.
52+docs can be build from scratch with ``make docs.html``. For better math and
53+image processing additional packages are needed. The XeTeX_ needed not only for
54+PDF creation, its also needed for :ref:`math` when HTML output is build.
4155
4256To be able to do :ref:`sphinx:math-support` without CDNs, the math are rendered
4357as images (``sphinx.ext.imgmath`` extension).
@@ -50,10 +64,10 @@ to ``imgmath``:
5064 :start-after: # sphinx.ext.imgmath setup
5165 :end-before: # sphinx.ext.imgmath setup END
5266
53−If your docs build (``make docs``) shows warnings like this::
67+If your docs build (``make docs.html``) shows warnings like this::
5468
5569 WARNING: dot(1) not found, for better output quality install \
56− graphviz from http://www.graphviz.org
70+ graphviz from https://www.graphviz.org
5771 ..
5872 WARNING: LaTeX command 'latex' cannot be run (needed for math \
5973 display), check the imgmath_latex setting
@@ -104,7 +118,8 @@ For PDF output you also need:
104118
105119 $ sudo dnf install \
106120 texlive-collection-fontsrecommended texlive-collection-latex \
107− dejavu-sans-fonts dejavu-serif-fonts dejavu-sans-mono-fonts
121+ dejavu-sans-fonts dejavu-serif-fonts dejavu-sans-mono-fonts \
122+ ImageMagick
108123
109124.. _sh lint:
110125
docs/admin/engines.rst+29−12
@@ -1,14 +1,28 @@
1−.. _engines generic:
2−
31=======
42Engines
53=======
64
5+Special Engine Settings
6+=======================
7+
78.. sidebar:: Further reading ..
89
910 - :ref:`settings engine`
10− - :ref:`engine settings`
11− - :ref:`engine file`
11+ - :ref:`engine settings` & :ref:`engine file`
12+
13+.. toctree::
14+ :maxdepth: 1
15+
16+ engines/recoll.rst
17+
18+
19+.. _engines generic:
20+
21+General Engine Settings
22+=======================
23+
24+Explanation of the :ref:`general engine configuration` shown in the table
25+:ref:`configured engines`.
1226
1327============= =========== ==================== ============
1428:ref:`engine settings` :ref:`engine file`
@@ -19,20 +33,20 @@ Engine .. Paging support **P**
1933------------------------- -------------------- ------------
2034Shortcut **S** Language support **L**
2135Timeout **TO** Time range support **TR**
22−Disabled **D** Offline **O**
36+Disabled **D** Engine type **ET**
2337------------- ----------- -------------------- ------------
2438Safe search **SS**
2539------------- ----------- ---------------------------------
2640Weigth **W**
2741------------- ----------- ---------------------------------
2842Disabled **D**
43+------------- ----------- ---------------------------------
44+Show errors **DE**
2945============= =========== =================================
3046
31−Configuration defaults (at built time):
32−
3347.. _configured engines:
3448
35−.. jinja:: webapp
49+.. jinja:: searx
3650
3751 .. flat-table:: Engines configured at built time (defaults)
3852 :header-rows: 1
@@ -48,9 +62,10 @@ Configuration defaults (at built time):
4862 - SS
4963 - D
5064 - TR
51− - O
52− - W
53− - D
65+ - ET
66+ - W
67+ - D
68+ - DE
5469
5570 {% for name, mod in engines.items() %}
5671
@@ -64,8 +79,10 @@ Configuration defaults (at built time):
6479 - {{(mod.safesearch and "y") or ""}}
6580 - {{(mod.disabled and "y") or ""}}
6681 - {{(mod.time_range_support and "y") or ""}}
67− - {{(mod.offline and "y") or ""}}
82+ - {{mod.engine_type or ""}}
6883 - {{mod.weight or 1 }}
6984 - {{(mod.disabled and "y") or ""}}
85+ - {{(mod.display_error_messages and "y") or ""}}
7086
7187 {% endfor %}
88+
docs/admin/engines/recoll.rstnew file+50
@@ -0,0 +1,50 @@
1+.. _engine recoll:
2+
3+======
4+Recoll
5+======
6+
7+.. sidebar:: info
8+
9+ - `Recoll <https://www.lesbonscomptes.com/recoll/>`_
10+ - `recoll-webui <https://framagit.org/medoc92/recollwebui.git>`_
11+
12+Recoll_ is a desktop full-text search tool based on Xapian. By itself Recoll_
13+does not offer web or API access, this can be achieved using recoll-webui_
14+
15+
16+
17+Configuration
18+=============
19+
20+You must configure the following settings:
21+
22+``base_url``:
23+ Location where recoll-webui can be reached.
24+
25+``mount_prefix``:
26+ Location where the file hierarchy is mounted on your *local* filesystem.
27+
28+``dl_prefix``:
29+ Location where the file hierarchy as indexed by recoll can be reached.
30+
31+``search_dir``:
32+ Part of the indexed file hierarchy to be search, if empty the full domain is
33+ searched.
34+
35+
36+Example
37+=======
38+
39+Scenario:
40+
41+#. Recoll indexes a local filesystem mounted in ``/export/documents/reference``,
42+#. the Recoll search inteface can be reached at https://recoll.example.org/ and
43+#. the contents of this filesystem can be reached though https://download.example.org/reference
44+
45+.. code:: yaml
46+
47+ base_url: https://recoll.example.org/
48+ mount_prefix: /export/documents
49+ dl_prefix: https://download.example.org
50+ search_dir: ''
docs/admin/filtron.rst+103−96
@@ -37,6 +37,7 @@ installed by ``go get`` package management (see `filtron README`_). If you use
3737filtron as middleware, a more isolated setup is recommended. To simplify such
3838an installation and the maintenance of, use our script :ref:`filtron.sh`.
3939
40+.. _Sample configuration of filtron:
4041
4142Sample configuration of filtron
4243===============================
@@ -56,100 +57,91 @@ of:
5657
5758.. code:: json
5859
59− [
60− { "name": "search request",
61− "filters": [
62− "Param:q",
63− "Path=^(/|/search)$"
64− ],
65− "interval": "<time-interval-in-sec (int)>",
66− "limit": "<max-request-number-in-interval (int)>",
67− "subrules": [
68− {
69− "name": "roboagent limit",
70− "interval": "<time-interval-in-sec (int)>",
71− "limit": "<max-request-number-in-interval (int)>",
72− "filters": [
73− "Header:User-Agent=(curl|cURL|Wget|python-requests|Scrapy|FeedFetcher|Go-http-client)"
74− ],
75− "actions": [
76− { "name": "log"},
77− { "name": "block",
78− "params": {
79− "message": "Rate limit exceeded"
80− }
81− }
82− ]
83− },
84− {
85− "name": "botlimit",
86− "limit": 0,
87− "stop": true,
88− "filters": [
89− "Header:User-Agent=(Googlebot|bingbot|Baiduspider|yacybot|YandexMobileBot|YandexBot|Yahoo! Slurp|MJ12bot|AhrefsBot|archive.org_bot|msnbot|MJ12bot|SeznamBot|linkdexbot|Netvibes|SMTBot|zgrab|James BOT)"
90− ],
91− "actions": [
92− { "name": "log"},
93− { "name": "block",
94− "params": {
95− "message": "Rate limit exceeded"
96− }
97− }
98− ]
99− },
100− {
101− "name": "IP limit",
102− "interval": "<time-interval-in-sec (int)>",
103− "limit": "<max-request-number-in-interval (int)>",
104− "stop": true,
105− "aggregations": [
106− "Header:X-Forwarded-For"
107− ],
108− "actions": [
109− { "name": "log"},
110− { "name": "block",
111− "params": {
112− "message": "Rate limit exceeded"
113− }
114− }
115− ]
116− },
117− {
118− "name": "rss/json limit",
119− "interval": "<time-interval-in-sec (int)>",
120− "limit": "<max-request-number-in-interval (int)>",
121− "stop": true,
122− "filters": [
123− "Param:format=(csv|json|rss)"
124− ],
125− "actions": [
126− { "name": "log"},
127− { "name": "block",
128− "params": {
129− "message": "Rate limit exceeded"
130− }
131− }
132− ]
133− },
134− {
135− "name": "useragent limit",
136− "interval": "<time-interval-in-sec (int)>",
137− "limit": "<max-request-number-in-interval (int)>",
138− "aggregations": [
139− "Header:User-Agent"
140− ],
141− "actions": [
142− { "name": "log"},
143− { "name": "block",
144− "params": {
145− "message": "Rate limit exceeded"
146− }
147− }
148− ]
149− }
150− ]
151− }
152− ]
60+ [
61+ {
62+ "name": "search request",
63+ "filters": [
64+ "Param:q",
65+ "Path=^(/|/search)$"
66+ ],
67+ "interval": "<time-interval-in-sec (int)>",
68+ "limit": "<max-request-number-in-interval (int)>",
69+ "subrules": [
70+ {
71+ "name": "missing Accept-Language",
72+ "filters": ["!Header:Accept-Language"],
73+ "limit": "<max-request-number-in-interval (int)>",
74+ "stop": true,
75+ "actions": [
76+ {"name":"log"},
77+ {"name": "block",
78+ "params": {"message": "Rate limit exceeded"}}
79+ ]
80+ },
81+ {
82+ "name": "suspiciously Connection=close header",
83+ "filters": ["Header:Connection=close"],
84+ "limit": "<max-request-number-in-interval (int)>",
85+ "stop": true,
86+ "actions": [
87+ {"name":"log"},
88+ {"name": "block",
89+ "params": {"message": "Rate limit exceeded"}}
90+ ]
91+ },
92+ {
93+ "name": "IP limit",
94+ "interval": "<time-interval-in-sec (int)>",
95+ "limit": "<max-request-number-in-interval (int)>",
96+ "stop": true,
97+ "aggregations": [
98+ "Header:X-Forwarded-For"
99+ ],
100+ "actions": [
101+ { "name": "log"},
102+ { "name": "block",
103+ "params": {
104+ "message": "Rate limit exceeded"
105+ }
106+ }
107+ ]
108+ },
109+ {
110+ "name": "rss/json limit",
111+ "filters": [
112+ "Param:format=(csv|json|rss)"
113+ ],
114+ "interval": "<time-interval-in-sec (int)>",
115+ "limit": "<max-request-number-in-interval (int)>",
116+ "stop": true,
117+ "actions": [
118+ { "name": "log"},
119+ { "name": "block",
120+ "params": {
121+ "message": "Rate limit exceeded"
122+ }
123+ }
124+ ]
125+ },
126+ {
127+ "name": "useragent limit",
128+ "interval": "<time-interval-in-sec (int)>",
129+ "limit": "<max-request-number-in-interval (int)>",
130+ "aggregations": [
131+ "Header:User-Agent"
132+ ],
133+ "actions": [
134+ { "name": "log"},
135+ { "name": "block",
136+ "params": {
137+ "message": "Rate limit exceeded"
138+ }
139+ }
140+ ]
141+ }
142+ ]
143+ }
144+ ]
153145
154146
155147.. _filtron route request:
@@ -157,6 +149,12 @@ of:
157149Route request through filtron
158150=============================
159151
152+.. sidebar:: further reading
153+
154+ - :ref:`filtron.sh overview`
155+ - :ref:`installation nginx`
156+ - :ref:`installation apache`
157+
160158Filtron can be started using the following command:
161159
162160.. code:: sh
@@ -170,15 +168,24 @@ Use it along with ``nginx`` with the following example configuration.
170168
171169.. code:: nginx
172170
173− location / {
171+ # https://example.org/searx
172+
173+ location /searx {
174174 proxy_pass http://127.0.0.1:4004/;
175175
176− proxy_set_header Host $http_host;
176+ proxy_set_header Host $host;
177+ proxy_set_header Connection $http_connection;
177178 proxy_set_header X-Real-IP $remote_addr;
178179 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
179180 proxy_set_header X-Scheme $scheme;
181+ proxy_set_header X-Script-Name /searx;
180182 }
181183
184+ location /searx/static {
185+ /usr/local/searx/searx-src/searx/static;
186+ }
187+
188+
182189Requests are coming from port 4004 going through filtron and then forwarded to
183190port 8888 where a searx is being run. For a complete setup see: :ref:`nginx
184191searx site`.
docs/admin/installation-apache.rst+462−42
@@ -4,19 +4,98 @@
44Install with apache
55===================
66
7−.. sidebar:: public to the internet?
8−
9− If your searx instance is public, stop here and first install :ref:`filtron
10− reverse proxy <filtron.sh>` and :ref:`result proxy morty <morty.sh>`, see
11− :ref:`installation scripts`.
7+.. _Apache: https://httpd.apache.org/
8+.. _Apache Debian:
9+ https://cwiki.apache.org/confluence/display/HTTPD/DistrosDefaultLayout#DistrosDefaultLayout-Debian,Ubuntu(Apachehttpd2.x):
10+.. _README.Debian:
11+ https://salsa.debian.org/apache-team/apache2/raw/master/debian/apache2.README.Debian
12+.. _Apache Arch Linux:
13+ https://wiki.archlinux.org/index.php/Apache_HTTP_Server
14+.. _Apache Fedora:
15+ https://docs.fedoraproject.org/en-US/quick-docs/getting-started-with-apache-http-server/index.html
16+.. _Apache directives:
17+ https://httpd.apache.org/docs/trunk/mod/directives.html
18+.. _Getting Started:
19+ https://httpd.apache.org/docs/current/en/getting-started.html
20+.. _Terms Used to Describe Directives:
21+ https://httpd.apache.org/docs/current/en/mod/directive-dict.html
22+.. _Configuration Files:
23+ https://httpd.apache.org/docs/current/en/configuring.html
24+.. _ProxyPreserveHost: https://httpd.apache.org/docs/trunk/mod/mod_proxy.html#proxypreservehost
25+.. _LoadModule:
26+ https://httpd.apache.org/docs/2.4/mod/mod_so.html#loadmodule
27+.. _DocumentRoot:
28+ https://httpd.apache.org/docs/trunk/mod/core.html#documentroot
29+.. _Location:
30+ https://httpd.apache.org/docs/trunk/mod/core.html#location
31+.. _uWSGI Apache support:
32+ https://uwsgi-docs.readthedocs.io/en/latest/Apache.html
33+.. _mod_proxy_uwsgi:
34+ https://uwsgi-docs.readthedocs.io/en/latest/Apache.html#mod-proxy-uwsgi
35+
36+.. sidebar:: further read
37+
38+ - `Apache Arch Linux`_
39+ - `Apache Debian`_ and `README.Debian`_
40+ - `Apache Fedora`_
41+ - `Apache directives`_
1242
1343.. contents:: Contents
1444 :depth: 2
1545 :local:
1646 :backlinks: entry
1747
18−Add wsgi mod
19−============
48+----
49+
50+**Install** :ref:`apache searx site` using :ref:`filtron.sh <filtron.sh overview>`
51+
52+.. code:: bash
53+
54+ $ sudo -H ./utils/filtron.sh apache install
55+
56+**Install** :ref:`apache searx site` using :ref:`morty.sh <morty.sh overview>`
57+
58+.. code:: bash
59+
60+ $ sudo -H ./utils/morty.sh apache install
61+
62+----
63+
64+The apache HTTP server
65+======================
66+
67+If Apache_ is not installed, install it now. If apache_ is new to you, the
68+`Getting Started`_, `Configuration Files`_ and `Terms Used to Describe
69+Directives`_ documentation gives first orientation. There is also a list of
70+`Apache directives`_ *to keep in the pocket*.
71+
72+.. tabs::
73+
74+ .. group-tab:: Ubuntu / debian
75+
76+ .. code:: sh
77+
78+ sudo -H apt-get install apache2
79+
80+ .. group-tab:: Arch Linux
81+
82+ .. code:: sh
83+
84+ sudo -H pacman -S apache
85+ sudo -H systemctl enable httpd
86+ sudo -H systemctl start http
87+
88+ .. group-tab:: Fedora / RHEL
89+
90+ .. code:: sh
91+
92+ sudo -H dnf install httpd
93+ sudo -H systemctl enable httpd
94+ sudo -H systemctl start httpd
95+
96+Now at http://localhost you should see any kind of *Welcome* or *Test* page.
97+How this default intro site is configured, depends on the linux distribution
98+(compare `Apache directives`_).
2099
21100.. tabs::
22101
@@ -24,62 +103,363 @@ Add wsgi mod
24103
25104 .. code:: sh
26105
27− sudo -H apt-get install libapache2-mod-uwsgi
28− sudo -H a2enmod uwsgi
106+ less /etc/apache2/sites-enabled/000-default.conf
107+
108+ In this file, there is a line setting the `DocumentRoot`_ directive:
109+
110+ .. code:: apache
111+
112+ DocumentRoot /var/www/html
113+
114+ And the *welcome* page is the HTML file at ``/var/www/html/index.html``.
115+
116+ .. group-tab:: Arch Linux
117+
118+ .. code:: sh
119+
120+ less /etc/httpd/conf/httpd.conf
29121
30−Add this configuration in the file ``/etc/apache2/apache2.conf``. To limit
31−acces to your intranet replace ``Allow from all`` directive and replace
32−``192.168.0.0/16`` with your subnet IP/class.
122+ In this file, there is a line setting the `DocumentRoot`_ directive:
33123
34−.. _inranet apache site:
124+ .. code:: apache
35125
36−Note that if your instance of searx is not at the root, you should change
37−``<Location />`` by the location of your instance, like ``<Location /searx>``:
126+ DocumentRoot "/srv/http"
127+ <Directory "/srv/http">
128+ Options Indexes FollowSymLinks
129+ AllowOverride None
130+ Require all granted
131+ </Directory>
38132
39−.. code:: apache
133+ The *welcome* page of Arch Linux is a page showing directory located at
134+ ``DocumentRoot``. This is *directory* page is generated by the Module
135+ `mod_autoindex <https://httpd.apache.org/docs/2.4/mod/mod_autoindex.html>`_:
40136
41− # CustomLog /dev/null combined
137+ .. code:: apache
42138
43− <IfModule mod_uwsgi.c>
139+ LoadModule autoindex_module modules/mod_autoindex.so
140+ ...
141+ Include conf/extra/httpd-autoindex.conf
44142
45− <Location />
143+ .. group-tab:: Fedora / RHEL
46144
47− Options FollowSymLinks Indexes
48− SetHandler uwsgi-handler
49− uWSGISocket /run/uwsgi/app/searx/socket
145+ .. code:: sh
50146
51− Order deny,allow
52− Deny from all
53− # Allow from fd00::/8 192.168.0.0/16 fe80::/10 127.0.0.0/8 ::1
54− Allow from all
147+ less /etc/httpd/conf/httpd.conf
55148
56− </Location>
149+ In this file, there is a line setting the ``DocumentRoot`` directive:
57150
58− </IfModule>
151+ .. code:: apache
59152
60−Enable apache mod_uwsgi and restart apache:
153+ DocumentRoot "/var/www/html"
154+ ...
155+ <Directory "/var/www">
156+ AllowOverride None
157+ # Allow open access:
158+ Require all granted
159+ </Directory>
160+
161+ On fresh installations, the ``/var/www`` is empty and the *default
162+ welcome page* is shown, the configuration is located at::
163+
164+ less /etc/httpd/conf.d/welcome.conf
165+
166+.. _apache searx site:
167+
168+Apache Reverse Proxy
169+====================
170+
171+.. sidebar:: public to the internet?
172+
173+ If your searx instance is public, stop here and first install :ref:`filtron
174+ reverse proxy <filtron.sh>` and :ref:`result proxy morty <morty.sh>`, see
175+ :ref:`installation scripts`. If already done, follow setup: *searx via
176+ filtron plus morty*.
177+
178+To setup a Apache revers proxy you have to enable the *headers* and *proxy*
179+modules and create a `Location`_ configuration for the searx site. In most
180+distributions you have to un-comment the lines in the main configuration file,
181+except in :ref:`The Debian Layout`.
61182
62183.. tabs::
63184
64185 .. group-tab:: Ubuntu / debian
65186
187+ In the Apache setup, enable headers and proxy modules:
188+
66189 .. code:: sh
67190
68− a2enmod uwsgi
69− sudo -H systemctl restart apache2
191+ sudo -H a2enmod headers
192+ sudo -H a2enmod proxy
193+ sudo -H a2enmod proxy_http
70194
71−disable logs
72−============
195+ In :ref:`The Debian Layout` you create a ``searx.conf`` with the
196+ ``<Location /searx >`` directive and save this file in the *sites
197+ available* folder at ``/etc/apache2/sites-available``. To enable the
198+ ``searx.conf`` use :man:`a2ensite`:
199+
200+ .. code:: sh
73201
74−For better privacy you can disable Apache logs. Go back to
75−``/etc/apache2/apache2.conf`` :ref:`[example] <inranet apache site>` and above
76−``<Location />`` activate directive:
202+ sudo -H a2ensite searx.conf
77203
78−.. code:: apache
204+ .. group-tab:: Arch Linux
79205
80− CustomLog /dev/null combined
206+ In the ``/etc/httpd/conf/httpd.conf`` file, activate headers and proxy
207+ modules (LoadModule_):
81208
82−Restart apache:
209+ .. code:: apache
210+
211+ FIXME needs test
212+
213+ LoadModule headers_module modules/mod_headers.so
214+ LoadModule proxy_module modules/mod_proxy.so
215+ LoadModule proxy_http_module modules/mod_proxy_http.so
216+
217+ .. group-tab:: Fedora / RHEL
218+
219+ In the ``/etc/httpd/conf/httpd.conf`` file, activate headers and proxy
220+ modules (LoadModule_):
221+
222+ .. code:: apache
223+
224+ FIXME needs test
225+
226+ LoadModule headers_module modules/mod_headers.so
227+ LoadModule proxy_module modules/mod_proxy.so
228+ LoadModule proxy_http_module modules/mod_proxy_http.so
229+
230+With ProxyPreserveHost_ the incoming Host HTTP request header is passed to the
231+proxied host.
232+
233+.. _apache searx via filtron plus morty:
234+
235+.. tabs::
236+
237+ .. group-tab:: searx via filtron plus morty
238+
239+ Use this setup, if your instance is public to the internet, compare
240+ figure: :ref:`architecture <arch public>` and :ref:`installation scripts`.
241+
242+ 1. Configure a reverse proxy for :ref:`filtron <filtron.sh>`, listening on
243+ *localhost 4004* (:ref:`filtron route request`):
244+
245+ .. code:: apache
246+
247+ <Location /searx >
248+
249+ # SetEnvIf Request_URI "/searx" dontlog
250+ # CustomLog /dev/null combined env=dontlog
251+
252+ Require all granted
253+
254+ Order deny,allow
255+ Deny from all
256+ #Allow from fd00::/8 192.168.0.0/16 fe80::/10 127.0.0.0/8 ::1
257+ Allow from all
258+
259+ ProxyPreserveHost On
260+ ProxyPass http://127.0.0.1:4004
261+ RequestHeader set X-Script-Name /searx
262+
263+ </Location>
264+
265+ 2. Configure reverse proxy for :ref:`morty <searx morty>`, listening on
266+ *localhost 3000*
267+
268+ .. code:: apache
269+
270+ ProxyPreserveHost On
271+
272+ <Location /morty >
273+
274+ # SetEnvIf Request_URI "/morty" dontlog
275+ # CustomLog /dev/null combined env=dontlog
276+
277+ Require all granted
278+
279+ Order deny,allow
280+ Deny from all
281+ #Allow from fd00::/8 192.168.0.0/16 fe80::/10 127.0.0.0/8 ::1
282+ Allow from all
283+
284+ ProxyPass http://127.0.0.1:3000
285+ RequestHeader set X-Script-Name /morty
286+
287+ </Location>
288+
289+ For a fully result proxification add :ref:`morty's <searx morty>` **public
290+ URL** to your :origin:`searx/settings.yml`:
291+
292+ .. code:: yaml
293+
294+ result_proxy:
295+ # replace example.org with your server's public name
296+ url : https://example.org/morty
297+ key : !!binary "insert_your_morty_proxy_key_here"
298+
299+ server:
300+ image_proxy : True
301+
302+uWSGI support
303+=============
304+
305+Be warned, with this setup, your instance isn't :ref:`protected <searx
306+filtron>`, nevertheless it is good enough for intranet usage. In modern Linux
307+distributions, the `mod_proxy_uwsgi`_ is compiled into the *normal* apache
308+package and you need to install only the :ref:`uWSGI <searx uwsgi>` package:
309+
310+.. tabs::
311+
312+ .. group-tab:: Ubuntu / debian
313+
314+ .. code:: sh
315+
316+ sudo -H apt-get install uwsgi
317+
318+ # Ubuntu =< 18.04
319+ sudo -H apt-get install libapache2-mod-proxy-uwsgi
320+
321+ .. group-tab:: Arch Linux
322+
323+ .. code:: sh
324+
325+ sudo -H pacman -S uwsgi
326+
327+ .. group-tab:: Fedora / RHEL
328+
329+ .. code:: sh
330+
331+ sudo -H dnf install uwsgi
332+
333+The next example shows a configuration using the `uWSGI Apache support`_ via
334+unix sockets and `mod_proxy_uwsgi`_.
335+
336+For socket communication, you have to activate ``socket =
337+/run/uwsgi/app/searx/socket`` and comment out the ``http = 127.0.0.1:8888``
338+configuration in your :ref:`uwsgi ini file <uwsgi configuration>`. If not
339+already exists, create a folder for the unix sockets, which can be used by the
340+searx account (see :ref:`create searx user`):
341+
342+.. code:: bash
343+
344+ sudo -H mkdir -p /run/uwsgi/app/searx/
345+ sudo -H chown -R searx:searx /run/uwsgi/app/searx/
346+
347+If the server is public; to limit access to your intranet replace ``Allow from
348+all`` directive and replace ``192.168.0.0/16`` with your subnet IP/class.
349+
350+.. tabs::
351+
352+ .. group-tab:: Ubuntu / debian
353+
354+ .. code:: apache
355+
356+ LoadModule headers_module /usr/lib/apache2/mod_headers.so
357+ LoadModule proxy_module /usr/lib/apache2/modules/mod_proxy.so
358+ LoadModule proxy_uwsgi_module /usr/lib/apache2/modules/mod_proxy_uwsgi.so
359+
360+ # SetEnvIf Request_URI /searx dontlog
361+ # CustomLog /dev/null combined env=dontlog
362+
363+ <Location /searx>
364+
365+ Require all granted
366+ Order deny,allow
367+ Deny from all
368+ # Allow from fd00::/8 192.168.0.0/16 fe80::/10 127.0.0.0/8 ::1
369+ Allow from all
370+
371+ ProxyPreserveHost On
372+ ProxyPass unix:/run/uwsgi/app/searx/socket|uwsgi://uwsgi-uds-searx/
373+
374+ </Location>
375+
376+ .. group-tab:: Arch Linux
377+
378+ .. code:: apache
379+
380+ FIXME needs test
381+
382+ LoadModule proxy_module modules/mod_proxy.so
383+ LoadModule proxy_uwsgi_module modules/mod_proxy_uwsgi.so
384+
385+ # SetEnvIf Request_URI /searx dontlog
386+ # CustomLog /dev/null combined env=dontlog
387+
388+ <Location /searx>
389+
390+ Require all granted
391+ Order deny,allow
392+ Deny from all
393+ # Allow from fd00::/8 192.168.0.0/16 fe80::/10 127.0.0.0/8 ::1
394+ Allow from all
395+
396+ ProxyPreserveHost On
397+ ProxyPass unix:/run/uwsgi/app/searx/socket|uwsgi://uwsgi-uds-searx/
398+
399+ </Location>
400+
401+ .. group-tab:: Fedora / RHEL
402+
403+ .. code:: apache
404+
405+ FIXME needs test
406+
407+ LoadModule proxy_module modules/mod_proxy.so
408+ LoadModule proxy_uwsgi_module modules/mod_proxy_uwsgi.so
409+ <IfModule proxy_uwsgi_module>
410+
411+ # SetEnvIf Request_URI /searx dontlog
412+ # CustomLog /dev/null combined env=dontlog
413+
414+ <Location /searx>
415+
416+ Require all granted
417+ Order deny,allow
418+ Deny from all
419+ # Allow from fd00::/8 192.168.0.0/16 fe80::/10 127.0.0.0/8 ::1
420+ Allow from all
421+
422+ ProxyPreserveHost On
423+ ProxyPass unix:/run/uwsgi/app/searx/socket|uwsgi://uwsgi-uds-searx/
424+
425+ </Location>
426+
427+ </IfModule>
428+
429+ .. group-tab:: old mod_wsgi
430+
431+ We show this only for historical reasons, DON'T USE `mod_uwsgi
432+ <https://uwsgi-docs.readthedocs.io/en/latest/Apache.html#mod-uwsgi>`_.
433+ ANYMORE!
434+
435+ .. code:: apache
436+
437+ <IfModule mod_uwsgi.c>
438+
439+ # SetEnvIf Request_URI "/searx" dontlog
440+ # CustomLog /dev/null combined env=dontlog
441+
442+ <Location /searx >
443+
444+ Require all granted
445+
446+ Options FollowSymLinks Indexes
447+ SetHandler uwsgi-handler
448+ uWSGISocket /run/uwsgi/app/searx/socket
449+
450+ Order deny,allow
451+ Deny from all
452+ # Allow from fd00::/8 192.168.0.0/16 fe80::/10 127.0.0.0/8 ::1
453+ Allow from all
454+
455+ </Location>
456+
457+ </IfModule>
458+
459+.. _restart apache:
460+
461+Restart service
462+===============
83463
84464.. tabs::
85465
@@ -88,8 +468,48 @@ Restart apache:
88468 .. code:: sh
89469
90470 sudo -H systemctl restart apache2
471+ sudo -H service uwsgi restart searx
472+
473+ .. group-tab:: Arch Linux
474+
475+ .. code:: sh
476+
477+ sudo -H systemctl restart httpd
478+ sudo -H systemctl restart uwsgi@searx
479+
480+ .. group-tab:: Fedora / RHEL
481+
482+ .. code:: sh
483+
484+ sudo -H systemctl restart httpd
485+ sudo -H touch /etc/uwsgi.d/searx.ini
486+
487+
488+disable logs
489+============
490+
491+For better privacy you can disable Apache logs. In the examples above activate
492+one of the lines and `restart apache`_::
493+
494+
495+ # SetEnvIf Request_URI "/searx" dontlog
496+ # CustomLog /dev/null combined env=dontlog
497+
498+The ``CustomLog`` directive disable logs for the whole (virtual) server, use it
499+when the URL of the service does not have a path component (``/searx``) / is
500+located at root (``/``).
501+
502+.. _The Debian Layout:
503+
504+The Debian Layout
505+=================
91506
92−.. warning::
507+Be aware that the Debian layout is quite different from the standard Apache
508+configuration. For details look at the README.Debian_
509+(``/usr/share/doc/apache2/README.Debian.gz``). Some commands you should know on
510+Debian:
93511
94− You can only disable logs for the whole (virtual) server not for a specific
95− path.
512+* :man:`apache2ctl`: Apache HTTP server control interface
513+* :man:`a2enmod`, :man:`a2dismod`: switch on/off modules
514+* :man:`a2enconf`, :man:`a2disconf`: switch on/off configurations
515+* :man:`a2ensite`, :man:`a2dissite`: switch on/off sites
docs/admin/installation-docker.rst+39−7
@@ -9,20 +9,52 @@ Docker installation
99 :local:
1010 :backlinks: entry
1111
12−Make sure you have installed Docker. For instance, you can deploy searx like this:
12+----
13+
14+Docker image searx/searx
15+========================
16+
17+
18+The docker image is `searx/searx <https://hub.docker.com/r/searx/searx>`_ (based on `github.com/searx/searx <https://github.com/searx/searx>`_).
19+
20+Make sure you have `installed Docker <https://docs.docker.com/get-docker/>`_. For instance, you can deploy a local instance:
1321
1422.. code:: sh
1523
16− docker pull wonderfall/searx
17− docker run -d --name searx -p $PORT:8888 wonderfall/searx
24+ export PORT=80
25+ docker pull searx/searx
26+ docker run --rm -d -v ${PWD}/searx:/etc/searx -p $PORT:8080 -e BASE_URL=http://localhost:$PORT/ searx/searx
1827
1928Go to ``http://localhost:$PORT``.
2029
21−See https://hub.docker.com/r/wonderfall/searx/ for more informations. It's also
22−possible to build searx from the embedded Dockerfile.
30+Inside ``${PWD}/searx``, you will find ``settings.yml`` and ``uwsgi.ini``.
31+You can modify these files according to your needs and restart the Docker image.
32+
33+
34+Command line
35+------------
36+
2337
2438.. code:: sh
2539
26− git clone https://github.com/asciimoo/searx.git
40+ docker run --rm -it searx/searx -h
41+
42+.. program-output:: ../dockerfiles/docker-entrypoint.sh help
43+
44+
45+Build the image
46+---------------
47+
48+It's also possible to build searx from the embedded Dockerfile.
49+
50+.. code:: sh
51+
52+ git clone https://github.com/searx/searx.git
2753 cd searx
28− docker build -t whatever/searx .
54+ make docker.build
55+
56+
57+Public instance
58+===============
59+
60+If you intend to create a public instance using Docker, see https://github.com/searx/searx-docker
docs/admin/installation-nginx.rst+105−56
@@ -9,7 +9,7 @@ Install with nginx
99.. _nginx server configuration:
1010 https://docs.nginx.com/nginx/admin-guide/web-server/web-server/#setting-up-virtual-servers
1111.. _nginx beginners guide:
12− http://nginx.org/en/docs/beginners_guide.html
12+ https://nginx.org/en/docs/beginners_guide.html
1313.. _Getting Started wiki:
1414 https://www.nginx.com/resources/wiki/start/
1515.. _uWSGI support from nginx:
@@ -19,19 +19,42 @@ Install with nginx
1919.. _SCRIPT_NAME:
2020 https://werkzeug.palletsprojects.com/en/1.0.x/wsgi/#werkzeug.wsgi.get_script_name
2121
22+.. sidebar:: further reading
23+
24+ - nginx_
25+ - `nginx beginners guide`_
26+ - `nginx server configuration`_
27+ - `Getting Started wiki`_
28+ - `uWSGI support from nginx`_
29+
2230.. contents:: Contents
2331 :depth: 2
2432 :local:
2533 :backlinks: entry
2634
35+----
36+
37+**Install** :ref:`nginx searx site` using :ref:`filtron.sh <filtron.sh overview>`
38+
39+.. code:: bash
40+
41+ $ sudo -H ./utils/filtron.sh nginx install
42+
43+**Install** :ref:`nginx searx site` using :ref:`morty.sh <morty.sh overview>`
44+
45+.. code:: bash
46+
47+ $ sudo -H ./utils/morty.sh nginx install
48+
49+----
50+
2751
2852The nginx HTTP server
2953=====================
3054
31−If nginx_ is not installed (uwsgi will not work with the package nginx-light)
55+If nginx_ is not installed (uwsgi will not work with the package nginx-light),
3256install it now.
3357
34−
3558.. tabs::
3659
3760 .. group-tab:: Ubuntu / debian
@@ -58,7 +81,8 @@ install it now.
5881
5982Now at http://localhost you should see a *Welcome to nginx!* page, on Fedora you
6083see a *Fedora Webserver - Test Page*. The test page comes from the default
61−`nginx server configuration`_:
84+`nginx server configuration`_. How this default intro site is configured,
85+depends on the linux distribution:
6286
6387.. tabs::
6488
@@ -111,7 +135,8 @@ A nginx searx site
111135
112136 If your searx instance is public, stop here and first install :ref:`filtron
113137 reverse proxy <filtron.sh>` and :ref:`result proxy morty <morty.sh>`, see
114− :ref:`installation scripts`.
138+ :ref:`installation scripts`. If already done, follow setup: *searx via
139+ filtron plus morty*.
115140
116141Now you have to create a configuration for the searx site. If nginx_ is new to
117142you, the `nginx beginners guide`_ is a good starting point and the `Getting
@@ -138,50 +163,67 @@ Started wiki`_ is always a good resource *to keep in the pocket*.
138163 Create configuration at ``/etc/nginx/conf.d/searx`` and place a
139164 symlink to sites-enabled:
140165
166+.. _nginx searx via filtron plus morty:
167+
141168.. tabs::
142169
143170 .. group-tab:: searx via filtron plus morty
144171
145172 Use this setup, if your instance is public to the internet, compare
146− figure: :ref:`architecture <arch public>`. Configure a reverse proxy for
147− :ref:`filtron <filtron.sh>`, listening on *localhost 4004* (:ref:`filtron
148− route request`):
173+ figure: :ref:`architecture <arch public>` and :ref:`installation scripts`.
174+
175+ 1. Configure a reverse proxy for :ref:`filtron <filtron.sh>`, listening on
176+ *localhost 4004* (:ref:`filtron route request`):
149177
150178 .. code:: nginx
151179
152− location / {
153− proxy_pass http://127.0.0.1:4004/;
180+ # https://example.org/searx
154181
155− proxy_set_header Host $http_host;
156− proxy_set_header X-Real-IP $remote_addr;
157− proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
158− proxy_set_header X-Scheme $scheme;
159− }
182+ location /searx {
183+ proxy_pass http://127.0.0.1:4004/;
184+
185+ proxy_set_header Host $host;
186+ proxy_set_header Connection $http_connection;
187+ proxy_set_header X-Real-IP $remote_addr;
188+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
189+ proxy_set_header X-Scheme $scheme;
190+ proxy_set_header X-Script-Name /searx;
191+ }
160192
193+ location /searx/static/ {
194+ alias /usr/local/searx/searx-src/searx/static/;
195+ }
161196
162− Configure reverse proxy for :ref:`morty <searx morty>`, listening on
163− *localhost 3000*:
197+
198+ 2. Configure reverse proxy for :ref:`morty <searx morty>`, listening on
199+ *localhost 3000*:
164200
165201 .. code:: nginx
166202
167− location /morty {
203+ # https://example.org/morty
204+
205+ location /morty {
168206 proxy_pass http://127.0.0.1:3000/;
169207
170− proxy_set_header Host $http_host;
208+ proxy_set_header Host $host;
209+ proxy_set_header Connection $http_connection;
171210 proxy_set_header X-Real-IP $remote_addr;
172211 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
173212 proxy_set_header X-Scheme $scheme;
174213 }
175214
176− Note that reverse proxy advised to be used in case of single-user or
177− low-traffic instances. For a fully result proxification add :ref:`morty's
178− <searx morty>` **public URL** to your :origin:`searx/settings.yml`:
215+ For a fully result proxification add :ref:`morty's <searx morty>` **public
216+ URL** to your :origin:`searx/settings.yml`:
179217
180218 .. code:: yaml
181219
182220 result_proxy:
183221 # replace example.org with your server's public name
184− url : https://example.org/
222+ url : https://example.org/morty
223+ key : !!binary "insert_your_morty_proxy_key_here"
224+
225+ server:
226+ image_proxy : True
185227
186228
187229 .. group-tab:: proxy or uWSGI
@@ -195,15 +237,17 @@ Started wiki`_ is always a good resource *to keep in the pocket*.
195237
196238 .. code:: nginx
197239
198− location / {
199− proxy_pass http://127.0.0.1:8888;
240+ # https://hostname.local/
200241
201− proxy_set_header Host $host;
202− proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
203− proxy_set_header X-Scheme $scheme;
204− proxy_set_header X-Script-Name /searx;
205− proxy_buffering off;
206− }
242+ location / {
243+ proxy_pass http://127.0.0.1:8888;
244+
245+ proxy_set_header Host $host;
246+ proxy_set_header Connection $http_connection;
247+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
248+ proxy_set_header X-Scheme $scheme;
249+ proxy_buffering off;
250+ }
207251
208252 Alternatively you can use the `uWSGI support from nginx`_ via unix
209253 sockets. For socket communication, you have to activate ``socket =
@@ -221,8 +265,8 @@ Started wiki`_ is always a good resource *to keep in the pocket*.
221265 .. code:: nginx
222266
223267 server {
224− # replace example.org with your server's public name
225− server_name example.org;
268+ # replace hostname.local with your server's name
269+ server_name hostname.local;
226270
227271 listen 80;
228272 listen [::]:80;
@@ -232,7 +276,7 @@ Started wiki`_ is always a good resource *to keep in the pocket*.
232276 uwsgi_pass unix:/run/uwsgi/app/searx/socket;
233277 }
234278
235− root /usr/local/searx/searx-src/searx;
279+ root /usr/local/searx/searx-src/searx;
236280 location /static { }
237281 }
238282
@@ -241,10 +285,10 @@ Started wiki`_ is always a good resource *to keep in the pocket*.
241285
242286 .. code:: bash
243287
244− mkdir -p /run/uwsgi/app/searx/
245− sudo -H chown -R searx:searx /run/uwsgi/app/searx/
288+ mkdir -p /run/uwsgi/app/searx/
289+ sudo -H chown -R searx:searx /run/uwsgi/app/searx/
246290
247− .. group-tab:: subdirectory URL
291+ .. group-tab:: \.\. at subdir URL
248292
249293 Be warned, with these setups, your instance isn't :ref:`protected <searx
250294 filtron>`. The examples are just here to demonstrate how to export the
@@ -252,19 +296,22 @@ Started wiki`_ is always a good resource *to keep in the pocket*.
252296
253297 .. code:: nginx
254298
255− location /searx {
256− proxy_pass http://127.0.0.1:8888;
299+ # https://hostname.local/searx
300+
301+ location /searx {
302+ proxy_pass http://127.0.0.1:8888;
257303
258− proxy_set_header Host $host;
259− proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
260− proxy_set_header X-Scheme $scheme;
261− proxy_set_header X-Script-Name /searx;
262− proxy_buffering off;
263− }
304+ proxy_set_header Host $host;
305+ proxy_set_header Connection $http_connection;
306+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
307+ proxy_set_header X-Scheme $scheme;
308+ proxy_set_header X-Script-Name /searx;
309+ proxy_buffering off;
310+ }
264311
265− location /searx/static {
266− alias /usr/local/searx/searx-src/searx/static;
267− }
312+ location /searx/static/ {
313+ alias /usr/local/searx/searx-src/searx/static/;
314+ }
268315
269316 The ``X-Script-Name /searx`` is needed by the searx implementation to
270317 calculate relative URLs correct. The next example shows a uWSGI
@@ -273,15 +320,17 @@ Started wiki`_ is always a good resource *to keep in the pocket*.
273320
274321 .. code:: nginx
275322
276− location /searx/static {
277− alias /usr/local/searx/searx-src/searx;
278− }
323+ # https://hostname.local/searx
279324
280− location /searx {
281− uwsgi_param SCRIPT_NAME /searx;
282− include uwsgi_params;
283− uwsgi_pass unix:/run/uwsgi/app/searx/socket;
284− }
325+ location /searx {
326+ uwsgi_param SCRIPT_NAME /searx;
327+ include uwsgi_params;
328+ uwsgi_pass unix:/run/uwsgi/app/searx/socket;
329+ }
330+
331+ location /searx/static/ {
332+ alias /usr/local/searx/searx-src/searx/;
333+ }
285334
286335 For searx to work correctly the ``base_url`` must be set in the
287336 :origin:`searx/settings.yml`.
docs/admin/installation-searx.rst+43−13
@@ -17,7 +17,7 @@ universe repository.
1717Install packages
1818================
1919
20−.. include:: ../../build/docs/includes/searx.rst
20+.. kernel-include:: $DOCS_BUILD/includes/searx.rst
2121 :start-after: START distro-packages
2222 :end-before: END distro-packages
2323
@@ -25,10 +25,12 @@ Install packages
2525
2626 This installs also the packages needed by :ref:`searx uwsgi`
2727
28+.. _create searx user:
29+
2830Create user
2931===========
3032
31−.. include:: ../../build/docs/includes/searx.rst
33+.. kernel-include:: $DOCS_BUILD/includes/searx.rst
3234 :start-after: START create user
3335 :end-before: END create user
3436
@@ -39,40 +41,68 @@ install searx & dependencies
3941
4042Start a interactive shell from new created user and clone searx:
4143
42−.. include:: ../../build/docs/includes/searx.rst
44+.. kernel-include:: $DOCS_BUILD/includes/searx.rst
4345 :start-after: START clone searx
4446 :end-before: END clone searx
4547
4648In the same shell create *virtualenv*:
4749
48−.. include:: ../../build/docs/includes/searx.rst
50+.. kernel-include:: $DOCS_BUILD/includes/searx.rst
4951 :start-after: START create virtualenv
5052 :end-before: END create virtualenv
5153
5254To install searx's dependencies, exit the searx *bash* session you opened above
53−and restart a new. Before install, first check if your *virualenv* was sourced
55+and restart a new. Before install, first check if your *virtualenv* was sourced
5456from the login (*~/.profile*):
5557
56−.. include:: ../../build/docs/includes/searx.rst
58+.. kernel-include:: $DOCS_BUILD/includes/searx.rst
5759 :start-after: START manage.sh update_packages
5860 :end-before: END manage.sh update_packages
5961
6062.. tip::
6163
62− Open a second terminal for the configuration tasks and left the ``(searx)$``
64+ Open a second terminal for the configuration tasks and leave the ``(searx)$``
6365 terminal open for the tasks below.
6466
67+
68+.. _use_default_settings.yml:
69+
6570Configuration
66−==============
71+=============
72+
73+.. sidebar:: ``use_default_settings: True``
74+
75+ - :ref:`settings global`
76+ - :ref:`settings location`
77+ - :ref:`settings use_default_settings`
78+ - :origin:`/etc/searx/settings.yml <utils/templates/etc/searx/use_default_settings.yml>`
79+
80+To create a initial ``/etc/searx/settings.yml`` you can start with a copy of the
81+file :origin:`utils/templates/etc/searx/use_default_settings.yml`. This setup
82+:ref:`use default settings <settings use_default_settings>` from
83+:origin:`searx/settings.yml` and is recommended since :pull:`2291` is merged.
6784
68−Create a copy of the :origin:`searx/settings.yml` configuration file in system's
69−*/etc* folder. Configure like shown below -- replace ``searx@\$(uname -n)`` with
70−a name of your choice -- *and/or* edit ``/etc/searx/settings.yml`` if necessary.
85+For a *minimal setup*, configure like shown below – replace ``searx@$(uname
86+-n)`` with a name of your choice, set ``ultrasecretkey`` -- *and/or* edit
87+``/etc/searx/settings.yml`` to your needs.
7188
72−.. include:: ../../build/docs/includes/searx.rst
89+.. kernel-include:: $DOCS_BUILD/includes/searx.rst
7390 :start-after: START searx config
7491 :end-before: END searx config
7592
93+.. tabs::
94+
95+ .. group-tab:: Use default settings
96+
97+ .. literalinclude:: ../../utils/templates/etc/searx/use_default_settings.yml
98+ :language: yaml
99+
100+ .. group-tab:: searx/settings.yml
101+
102+ .. literalinclude:: ../../searx/settings.yml
103+ :language: yaml
104+
105+
76106Check
77107=====
78108
@@ -80,7 +110,7 @@ To check your searx setup, optional enable debugging and start the *webapp*.
80110Searx looks at the exported environment ``$SEARX_SETTINGS_PATH`` for a
81111configuration file.
82112
83−.. include:: ../../build/docs/includes/searx.rst
113+.. kernel-include:: $DOCS_BUILD/includes/searx.rst
84114 :start-after: START check searx installation
85115 :end-before: END check searx installation
86116
docs/admin/installation-uwsgi.rst+13−12
@@ -4,7 +4,7 @@
44uwsgi
55=====
66
7−.. sidebar:: further read
7+.. sidebar:: further reading
88
99 - `systemd.unit`_
1010 - `uWSGI Emperor`_
@@ -104,21 +104,23 @@ restart the uwsgi application.
104104
105105 .. group-tab:: Ubuntu / debian
106106
107− .. literalinclude:: ../../build/docs/includes/searx.rst
107+ .. kernel-include:: $DOCS_BUILD/includes/searx.rst
108108 :start-after: START searx uwsgi-description ubuntu-20.04
109109 :end-before: END searx uwsgi-description ubuntu-20.04
110110
111+ .. hotfix: a bug group-tab need this comment
111112
112113 .. group-tab:: Arch Linux
113114
114− .. literalinclude:: ../../build/docs/includes/searx.rst
115+ .. kernel-include:: $DOCS_BUILD/includes/searx.rst
115116 :start-after: START searx uwsgi-description arch
116117 :end-before: END searx uwsgi-description arch
117118
119+ .. hotfix: a bug group-tab need this comment
118120
119121 .. group-tab:: Fedora / RHEL
120122
121− .. literalinclude:: ../../build/docs/includes/searx.rst
123+ .. kernel-include:: $DOCS_BUILD/includes/searx.rst
122124 :start-after: START searx uwsgi-description fedora
123125 :end-before: END searx uwsgi-description fedora
124126
@@ -127,23 +129,22 @@ restart the uwsgi application.
127129
128130 .. group-tab:: Ubuntu / debian
129131
130− .. literalinclude:: ../../build/docs/includes/searx.rst
131− :language: ini
132+ .. kernel-include:: $DOCS_BUILD/includes/searx.rst
132133 :start-after: START searx uwsgi-appini ubuntu-20.04
133134 :end-before: END searx uwsgi-appini ubuntu-20.04
134135
136+ .. hotfix: a bug group-tab need this comment
137+
135138 .. group-tab:: Arch Linux
136139
137− .. literalinclude:: ../../build/docs/includes/searx.rst
138− :language: ini
140+ .. kernel-include:: $DOCS_BUILD/includes/searx.rst
139141 :start-after: START searx uwsgi-appini arch
140142 :end-before: END searx uwsgi-appini arch
141143
144+ .. hotfix: a bug group-tab need this comment
145+
142146 .. group-tab:: Fedora / RHEL
143147
144− .. literalinclude:: ../../build/docs/includes/searx.rst
145− :language: ini
148+ .. kernel-include:: $DOCS_BUILD/includes/searx.rst
146149 :start-after: START searx uwsgi-appini fedora
147150 :end-before: END searx uwsgi-appini fedora
148−
149−
docs/admin/installation.rst+30−11
@@ -25,26 +25,31 @@ box <toolboxing>` as described below.
2525Installation scripts
2626====================
2727
28+.. sidebar:: Update OS first!
29+
30+ To avoid unwanted side effects, update your OS before installing searx.
31+
2832The following will install a setup as shown in :ref:`architecture`. First you
2933need to get a clone. The clone is only needed for the installation procedure
3034and some maintenance tasks (alternatively you can create your own fork).
3135
36+For the installation procedure, use a *sudoer* login to run the scripts. If you
37+install from ``root``, take into account that the scripts are creating a
38+``searx``, a ``filtron`` and a ``morty`` user. In the installation procedure
39+these new created users do need read access to the clone of searx, which is not
40+the case if you clone into a folder below ``/root``.
41+
3242.. code:: bash
3343
34− $ cd ~/Download
35− $ git clone https://github.com/asciimoo/searx searx
44+ $ cd ~/Downloads
45+ $ git clone https://github.com/searx/searx searx
3646 $ cd searx
3747
38−.. hint::
39−
40− The *tooling box* is not yet merged into `asciimoo/searx master
41− <https://github.com/asciimoo/searx>`_. As long as PR is not merged, you need
42− to merge the PR into your local clone (see below). The discussion takes
43− place in :pull:`1803`. To merge the :pull:`1803` in your local branch use:
44−
45− .. code:: bash
48+.. sidebar:: further read
4649
47− $ git pull origin refs/pull/1803/head
50+ - :ref:`toolboxing`
51+ - :ref:`update searx`
52+ - :ref:`inspect searx`
4853
4954**Install** :ref:`searx service <searx.sh>`
5055
@@ -65,3 +70,17 @@ This installs searx as described in :ref:`installation basic`.
6570.. code:: bash
6671
6772 $ sudo -H ./utils/morty.sh install all
73+
74+If all services are running fine, you can add it to your HTTP server:
75+
76+- :ref:`installation apache`
77+- :ref:`installation nginx`
78+
79+.. _git stash: https://git-scm.com/docs/git-stash
80+
81+.. tip::
82+
83+ About script's installation options have a look at chapter :ref:`toolboxing
84+ setup`. How to brand your instance see chapter :ref:`settings global`. To
85+ *stash* your instance's setup, `git stash`_ your clone's :origin:`Makefile`
86+ and :origin:`.config.sh` file .
docs/admin/morty.rst+15−4
@@ -5,6 +5,10 @@
55How to setup result proxy
66=========================
77
8+.. sidebar:: further reading
9+
10+ - :ref:`morty.sh`
11+
812.. _morty: https://github.com/asciimoo/morty
913.. _morty's README: https://github.com/asciimoo/morty
1014
@@ -12,15 +16,22 @@ By default searx can only act as an image proxy for result images, but it is
1216possible to proxify all the result URLs with an external service, morty_.
1317
1418To use this feature, morty has to be installed and activated in searx's
15−``settings.yml``.
16−
17−Add the following snippet to your ``settings.yml`` and restart searx:
19+``settings.yml``. Add the following snippet to your ``settings.yml`` and
20+restart searx:
1821
1922.. code:: yaml
2023
2124 result_proxy:
2225 url : http://127.0.0.1:3000/
23− key : your_morty_proxy_key
26+ key : !!binary "insert_your_morty_proxy_key_here"
27+
28+Note that the example above (``http://127.0.0.1:3000``) is only for single-user
29+instances without a HTTP proxy. If your morty service is public, the url is the
30+address of the reverse proxy (e.g ``https://example.org/morty``).
31+
32+For more information about *result proxy* have a look at *"searx via filtron
33+plus morty"* in the :ref:`nginx <nginx searx via filtron plus morty>` and
34+:ref:`apache <apache searx via filtron plus morty>` sections.
2435
2536``url``
2637 Is the address of the running morty service.
docs/admin/plugins.rst+1−1
@@ -14,7 +14,7 @@ Configuration defaults (at built time):
1414
1515.. _configured plugins:
1616
17−.. jinja:: webapp
17+.. jinja:: searx
1818
1919 .. flat-table:: Plugins configured at built time (defaults)
2020 :header-rows: 1
docs/admin/settings.rst+276−69
@@ -9,6 +9,7 @@ file.
99
1010.. sidebar:: Further reading ..
1111
12+ - :ref:`use_default_settings.yml`
1213 - :ref:`search API`
1314
1415.. contents:: Contents
@@ -16,104 +17,205 @@ file.
1617 :local:
1718 :backlinks: entry
1819
20+.. _settings location:
21+
22+settings.yml location
23+=====================
24+
25+First, searx will try to load settings.yml from these locations:
26+
27+1. the full path specified in the ``SEARX_SETTINGS_PATH`` environment variable.
28+2. ``/etc/searx/settings.yml``
29+
30+If these files don't exist (or are empty or can't be read), searx uses the
31+:origin:`searx/settings.yml` file.
32+
33+
1934.. _settings global:
2035
2136Global Settings
2237===============
2338
39+``general:``
40+------------
41+
2442.. code:: yaml
2543
26− server:
27− port : 8888
28− secret_key : "ultrasecretkey" # change this!
29− debug : False # debug mode, only for development
30− request_timeout : 2.0 # seconds
31− base_url : False # set custom base_url (or False)
32− themes_path : "" # custom ui themes path
33− default_theme : oscar # ui theme
34− useragent_suffix : "" # suffix of searx_useragent, could contain
35− # informations like admins email address
36− image_proxy : False # proxying image results through searx
37− default_locale : "" # default interface locale
44+ general:
45+ debug : False # Debug mode, only for development
46+ instance_name : "searx" # displayed name
47+ git_url: https://github.com/searx/searx
48+ git_branch: master
49+ issue_url: https://github.com/searx/searx/issues
50+ docs_url: https://searx.github.io/searx
51+ public_instances: https://searx.space
52+ contact_url: False # mailto:contact@example.com
53+ wiki_url: https://github.com/searx/searx/wiki
54+ twitter_url: https://twitter.com/Searx_engine
3855
39− # uncomment below section if you want to use a proxy
56+``debug`` :
57+ Allow a more detailed log if you run searx directly. Display *detailed* error
58+ messages in the browser too, so this must be deactivated in production.
4059
41− #outgoing_proxies :
42− # http : http://127.0.0.1:8080
43− # https: http://127.0.0.1:8080
60+``contact_url``:
61+ Contact ``mailto:`` address or WEB form.
4462
45− # uncomment below section only if you have more than one network interface
46− # which can be the source of outgoing search requests
63+``git_url`` and ``git_branch``:
64+ Changes this, to point to your searx fork (branch).
4765
48− #source_ips:
49− # - 1.1.1.1
50− # - 1.1.1.2
66+``docs_url``
67+ If you host your own documentation, change this URL.
5168
52− locales:
53− en : English
54− de : Deutsch
55− he : Hebrew
56− hu : Magyar
57− fr : Français
58− es : Español
59− it : Italiano
60− nl : Nederlands
61− ja : 日本語 (Japanese)
62− tr : Türkçe
63− ru : Russian
64− ro : Romanian
69+``wiki_url``:
70+ Link to your wiki (or ``False``)
6571
72+``twitter_url``:
73+ Link to your tweets (or ``False``)
6674
67−``port`` :
68− Port number of the searx web application if you run it directly using ``python
69− searx/webapp.py``. Doesn't apply to searx running on Apache or Nginx.
7075
71−``secret_key`` :
72− Used for cryptography purpose.
76+``server:``
77+-----------
7378
74−``debug`` :
75− Allow a more detailed log if you run searx directly. Display *detailed* error
76− messages in the browser too, so this must be deactivated in production.
79+.. code:: yaml
7780
78−``request_timeout`` :
79− Global timeout of the requests made to others engines in seconds. A bigger
80− timeout will allow to wait for answers from slow engines, but in consequence
81− will slow searx reactivity (the result page may take the time specified in the
82− timeout to load)
81+ server:
82+ port : 8888
83+ bind_address : "127.0.0.1" # address to listen on
84+ secret_key : "ultrasecretkey" # change this!
85+ base_url : False # set custom base_url (or False)
86+ image_proxy : False # proxying image results through searx
87+ default_locale : "" # default interface locale
88+ default_theme : oscar # ui theme
89+ default_http_headers:
90+ X-Content-Type-Options : nosniff
91+ X-XSS-Protection : 1; mode=block
92+ X-Download-Options : noopen
93+ X-Robots-Tag : noindex, nofollow
94+ Referrer-Policy : no-referrer
95+
96+``port`` & ``bind_address``:
97+ Port number and *bind address* of the searx web application if you run it
98+ directly using ``python searx/webapp.py``. Doesn't apply to searx running on
99+ Apache or Nginx.
100+
101+``secret_key`` :
102+ Used for cryptography purpose.
83103
84104``base_url`` :
85105 The base URL where searx is deployed. Used to create correct inbound links.
86106
87−``themes_path`` :
88− Path to where the themes are located. If you didn't develop anything, leave it
89− blank.
90−
91−``default_theme`` :
92− Name of the theme you want to use by default on you searx instance.
93−
94−``useragent_suffix`` :
95− Suffix to the user-agent searx uses to send requests to others engines. If an
96− engine wish to block you, a contact info here may be useful to avoid that.
97−
98107``image_proxy`` :
99108 Allow your instance of searx of being able to proxy images. Uses memory space.
100109
101110``default_locale`` :
102− Aearx interface language. If blank, the locale is detected by using the
111+ Searx interface language. If blank, the locale is detected by using the
103112 browser language. If it doesn't work, or you are deploying a language
104113 specific instance of searx, a locale can be defined using an ISO language
105114 code, like ``fr``, ``en``, ``de``.
106115
107−.. _requests proxies: http://docs.python-requests.org/en/latest/user/advanced/#proxies
108−.. _PR SOCKS support: https://github.com/kennethreitz/requests/pull/478
116+``default_theme`` :
117+ Name of the theme you want to use by default on your searx instance.
109118
110−``outgoing_proxies`` :
111− Define a proxy you wish to use, see `requests proxies`_. SOCKS proxies are
112− not supported / see `PR SOCKS support`.
119+.. _HTTP headers: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers
120+
121+``default_http_headers``:
122+ Set additional HTTP headers, see `#755 <https://github.com/searx/searx/issues/715>`__
123+
124+``outgoing:``
125+-------------
126+
127+.. code:: yaml
128+
129+ outgoing: # communication with search engines
130+ request_timeout : 2.0 # default timeout in seconds, can be override by engine
131+ # max_request_timeout: 10.0 # the maximum timeout in seconds
132+ useragent_suffix : "" # informations like an email address to the administrator
133+ pool_connections : 100 # Maximum number of allowable connections, or None for no limits. The default is 100.
134+ pool_maxsize : 10 # Number of allowable keep-alive connections, or None to always allow. The default is 10.
135+ enable_http2: True # See https://www.python-httpx.org/http2/
136+ # uncomment below section if you want to use a proxy
137+ # proxies:
138+ # all://:
139+ # - http://proxy1:8080
140+ # - http://proxy2:8080
141+ # uncomment below section only if you have more than one network interface
142+ # which can be the source of outgoing search requests
143+ # source_ips:
144+ # - 1.1.1.1
145+ # - 1.1.1.2
146+ # - fe80::/126
147+
148+
149+``request_timeout`` :
150+ Global timeout of the requests made to others engines in seconds. A bigger
151+ timeout will allow to wait for answers from slow engines, but in consequence
152+ will slow searx reactivity (the result page may take the time specified in the
153+ timeout to load). Can be override by :ref:`settings engine`
154+
155+``useragent_suffix`` :
156+ Suffix to the user-agent searx uses to send requests to others engines. If an
157+ engine wish to block you, a contact info here may be useful to avoid that.
158+
159+``keepalive_expiry``:
160+ Number of seconds to keep a connection in the pool. By default 5.0 seconds.
161+
162+.. _httpx proxies: https://www.python-httpx.org/advanced/#http-proxying
163+
164+``proxies`` :
165+ Define one or more proxies you wish to use, see `httpx proxies`_.
166+ If there are more than one proxy for one protocol (http, https),
167+ requests to the engines are distributed in a round-robin fashion.
113168
114169``source_ips`` :
115− If you use multiple nework interfaces, define from which IP the requests must
116− be made.
170+ If you use multiple network interfaces, define from which IP the requests must
171+ be made. Example:
172+
173+ * ``0.0.0.0`` any local IPv4 address.
174+ * ``::`` any local IPv6 address.
175+ * ``192.168.0.1``
176+ * ``[ 192.168.0.1, 192.168.0.2 ]`` these two specific IP addresses
177+ * ``fe80::60a2:1691:e5a2:ee1f``
178+ * ``fe80::60a2:1691:e5a2:ee1f/126`` all IP addresses in this network.
179+ * ``[ 192.168.0.1, fe80::/126 ]``
180+
181+``retries`` :
182+ Number of retry in case of an HTTP error.
183+ On each retry, searx uses an different proxy and source ip.
184+
185+``retry_on_http_error`` :
186+ Retry request on some HTTP status code.
187+
188+ Example:
189+
190+ * ``true`` : on HTTP status code between 400 and 599.
191+ * ``403`` : on HTTP status code 403.
192+ * ``[403, 429]``: on HTTP status code 403 and 429.
193+
194+``enable_http2`` :
195+ Enable by default. Set to ``False`` to disable HTTP/2.
196+
197+``max_redirects`` :
198+ 30 by default. Maximum redirect before it is an error.
199+
200+
201+``locales:``
202+------------
203+
204+.. code:: yaml
205+
206+ locales:
207+ en : English
208+ de : Deutsch
209+ he : Hebrew
210+ hu : Magyar
211+ fr : Français
212+ es : Español
213+ it : Italiano
214+ nl : Nederlands
215+ ja : 日本語 (Japanese)
216+ tr : Türkçe
217+ ru : Russian
218+ ro : Romanian
117219
118220``locales`` :
119221 Locales codes and their names. Available translations of searx interface.
@@ -139,9 +241,25 @@ Engine settings
139241 api_key : 'apikey'
140242 disabled : True
141243 language : en_US
244+ #enable_http: False
245+ #enable_http2: False
246+ #retries: 1
247+ #retry_on_http_error: True # or 403 or [404, 429]
248+ #max_connections: 100
249+ #max_keepalive_connections: 10
250+ #keepalive_expiry: 5.0
251+ #proxies:
252+ # http:
253+ # - http://proxy1:8080
254+ # - http://proxy2:8080
255+ # https:
256+ # - http://proxy1:8080
257+ # - http://proxy2:8080
258+ # - socks5://user:password@proxy3:1080
259+ # - socks5h://user:password@proxy4:1080
142260
143261``name`` :
144− Name that will be used accross searx to define this engine. In settings, on
262+ Name that will be used across searx to define this engine. In settings, on
145263 the result page...
146264
147265``engine`` :
@@ -152,7 +270,7 @@ Engine settings
152270 Code used to execute bang requests (in this case using ``!bi`` or ``?bi``)
153271
154272``base_url`` : optional
155− Part of the URL that should be stable accross every request. Can be useful to
273+ Part of the URL that should be stable across every request. Can be useful to
156274 use multiple sites using only one engine, or updating the site URL without
157275 touching at the code.
158276
@@ -170,7 +288,7 @@ Engine settings
170288 is described in the file.
171289
172290``disabled`` : optional
173− To disable by default the engine, but not deleting it. It will allow the user
291+ To disable by default the engine, but not deleting it. It will allow the user
174292 to manually activate it in the settings.
175293
176294``language`` : optional
@@ -181,7 +299,96 @@ Engine settings
181299``weigth`` : default ``1``
182300 Weighting of the results of this engine.
183301
302+``display_error_messages`` : default ``True``
303+ When an engine returns an error, the message is displayed on the user interface.
304+
305+``network``: optional
306+ Use the network configuration from another engine.
307+ In addition, there are two default networks:
308+ * ``ipv4`` set ``local_addresses`` to ``0.0.0.0`` (use only IPv4 local addresses)
309+ * ``ipv6`` set ``local_addresses`` to ``::`` (use only IPv6 local addresses)
310+
184311.. note::
185312
186313 A few more options are possible, but they are pretty specific to some
187314 engines, and so won't be described here.
315+
316+
317+.. _settings use_default_settings:
318+
319+use_default_settings
320+====================
321+
322+.. sidebar:: ``use_default_settings: True``
323+
324+ - :ref:`settings location`
325+ - :ref:`use_default_settings.yml`
326+ - :origin:`/etc/searx/settings.yml <utils/templates/etc/searx/use_default_settings.yml>`
327+
328+The user defined ``settings.yml`` is loaded from the :ref:`settings location`
329+and can relied on the default configuration :origin:`searx/settings.yml` using:
330+
331+ ``use_default_settings: True``
332+
333+``server:``
334+ In the following example, the actual settings are the default settings defined
335+ in :origin:`searx/settings.yml` with the exception of the ``secret_key`` and
336+ the ``bind_address``:
337+
338+ .. code-block:: yaml
339+
340+ use_default_settings: True
341+ server:
342+ secret_key: "uvys6bRhKHUdFF5CqbJonSDSRN8H0sCBziNSrDGNVdpz7IeZhveVart3yvghoKHA"
343+ bind_address: "0.0.0.0"
344+
345+``engines:``
346+ With ``use_default_settings: True``, each settings can be override in a
347+ similar way, the ``engines`` section is merged according to the engine
348+ ``name``. In this example, searx will load all the engine and the arch linux
349+ wiki engine has a :ref:`token<private engines>`:
350+
351+ .. code-block:: yaml
352+
353+ use_default_settings: True
354+ server:
355+ secret_key: "uvys6bRhKHUdFF5CqbJonSDSRN8H0sCBziNSrDGNVdpz7IeZhveVart3yvghoKHA"
356+ engines:
357+ - name: arch linux wiki
358+ tokens: ['$ecretValue']
359+
360+``engines:`` / ``remove:``
361+ It is possible to remove some engines from the default settings. The following
362+ example is similar to the above one, but searx doesn't load the the google
363+ engine:
364+
365+ .. code-block:: yaml
366+
367+ use_default_settings:
368+ engines:
369+ remove:
370+ - google
371+ server:
372+ secret_key: "uvys6bRhKHUdFF5CqbJonSDSRN8H0sCBziNSrDGNVdpz7IeZhveVart3yvghoKHA"
373+ engines:
374+ - name: arch linux wiki
375+ tokens: ['$ecretValue']
376+
377+``engines:`` / ``keep_only:``
378+ As an alternative, it is possible to specify the engines to keep. In the
379+ following example, searx has only two engines:
380+
381+ .. code-block:: yaml
382+
383+ use_default_settings:
384+ engines:
385+ keep_only:
386+ - google
387+ - duckduckgo
388+ server:
389+ secret_key: "uvys6bRhKHUdFF5CqbJonSDSRN8H0sCBziNSrDGNVdpz7IeZhveVart3yvghoKHA"
390+ engines:
391+ - name: google
392+ tokens: ['$ecretValue']
393+ - name: duckduckgo
394+ tokens: ['$ecretValue']
docs/admin/update-searx.rst+46−10
@@ -4,20 +4,56 @@
44How to update
55=============
66
7+How to update depends on the :ref:`installation` method. If you have used the
8+:ref:`installation scripts`, use ``update`` command from the scripts.
9+
10+**Update** :ref:`searx service <searx.sh>`
11+
12+.. code:: sh
13+
14+ sudo -H ./utils/searx.sh update searx
15+
16+**Update** :ref:`filtron reverse proxy <filtron.sh>`
17+
718.. code:: sh
819
9− sudo -H -u searx -i
10− (searx)$ git stash
11− (searx)$ git pull origin master
12− (searx)$ git stash apply
13− (searx)$ ./manage.sh update_packages
20+ sudo -H ./utils/filtron.sh update filtron
21+
22+**Update** :ref:`result proxy <morty.sh>`
23+
24+.. code:: bash
25+
26+ sudo -H ./utils/morty.sh update morty
27+
28+.. _inspect searx:
29+
30+======================
31+How to inspect & debug
32+======================
33+
34+.. sidebar:: further read
35+
36+ - :ref:`toolboxing`
37+ - :ref:`Makefile`
38+
39+How to debug depends on the :ref:`installation` method. If you have used the
40+:ref:`installation scripts`, use ``inspect`` command from the scripts.
41+
42+**Inspect** :ref:`searx service <searx.sh>`
43+
44+.. code:: sh
45+
46+ sudo -H ./utils/searx.sh inspect service
47+
48+**Inspect** :ref:`filtron reverse proxy <filtron.sh>`
49+
50+.. code:: sh
1451
15−Restart uwsgi:
52+ sudo -H ./utils/filtron.sh inspect service
1653
17−.. tabs::
54+**Inspect** :ref:`result proxy <morty.sh>`
1855
19− .. group-tab:: Ubuntu / debian
56+.. code:: bash
2057
21− .. code:: sh
58+ sudo -H ./utils/morty.sh inspect service
2259
23− sudo -H systemctl restart uwsgi
docs/blog/command-line-engines.rstnew file+65
@@ -0,0 +1,65 @@
1+========================================
2+Running shell commands to fetch results
3+========================================
4+
5+Previously, with searx you could search over the Internet on other people's
6+computers. Now it is possible to fetch results from your local machine without
7+connecting to any networks from the same graphical user interface.
8+
9+
10+Command line engines
11+====================
12+
13+In :pull:`2128` a new type of engine has been introduced called ``command``.
14+This engine lets administrators add engines which run arbitrary shell commands
15+and show its output on the web UI of searx.
16+
17+When creating and enabling a ``command`` engine on a public searx instance,
18+you must be careful to avoid leaking private data. The easiest solution
19+is to add tokens to the engine. Thus, only those who have the appropriate token
20+can retrieve results from the it.
21+
22+The engine base is flexible. Only your imagination can limit the power of this engine. (And
23+maybe security concerns.) The following options are available:
24+
25+* ``command``: A comma separated list of the elements of the command. A special token {{QUERY}} tells searx where to put the search terms of the user. Example: ``['ls', '-l', '-h', '{{QUERY}}']``
26+* ``delimiter``: A dict containing a delimiter char and the "titles" of each element in keys.
27+* ``parse_regex``: A dict containing the regular expressions for each result key.
28+* ``query_type``: The expected type of user search terms. Possible values: ``path`` and ``enum``. ``path`` checks if the uesr provided path is inside the working directory. If not the query is not executed. ``enum`` is a list of allowed search terms. If the user submits something which is not included in the list, the query returns an error.
29+* ``query_enum``: A list containing allowed search terms if ``query_type`` is set to ``enum``.
30+* ``working_dir``: The directory where the command has to be executed. Default: ``.``
31+* ``result_separator``: The character that separates results. Default: ``\n``
32+
33+
34+The example engine below can be used to find files with a specific name in the configured
35+working directory.
36+
37+.. code:: yaml
38+
39+ - name: find
40+ engine: command
41+ command: ['find', '.', '-name', '{{QUERY}}']
42+ query_type: path
43+ shortcut: fnd
44+ delimiter:
45+ chars: ' '
46+ keys: ['line']
47+
48+
49+Next steps
50+==========
51+
52+In the next milestone, support for local search engines and indexers (e.g. Elasticsearch)
53+are going to be added. This way, you will be able to query your own databases/indexers.
54+
55+Acknowledgement
56+===============
57+
58+This development was sponsored by `Search and Discovery Fund`_ of `NLnet Foundation`_ .
59+
60+.. _Search and Discovery Fund: https://nlnet.nl/discovery
61+.. _NLnet Foundation: https://nlnet.nl/
62+
63+
64+| Happy hacking.
65+| kvch // 2020.09.28 21:26
docs/blog/index.rst+7−2
@@ -3,10 +3,15 @@ Blog
33====
44
55.. toctree::
6− :maxdepth: 2
7− :caption: Contents
6+ :titlesonly:
7+ :reversed:
88
99 python3
1010 admin
1111 intro-offline
1212 private-engines
13+ lxcdev-202006
14+ command-line-engines
15+ search-indexer-engines
16+ sql-engines
17+ search-database-engines
docs/blog/lxcdev-202006.rstnew file+413
@@ -0,0 +1,413 @@
1+.. _blog-lxcdev-202006:
2+
3+=======================================
4+Developing in Linux containers [202006]
5+=======================================
6+
7+.. _LXC: https://linuxcontainers.org/lxc/introduction/
8+
9+.. sidebar:: Audience
10+
11+ This blog post is written for experienced admins and developers / readers
12+ should have a serious meaning about: *distributed*, *merge* and *linux
13+ container*.
14+
15+.. contents:: Contents
16+ :depth: 2
17+ :local:
18+ :backlinks: entry
19+
20+In PR :PR:`1803` we added a lot of scripts to Searx's boilerplate. In this blog
21+post I will show you, how you can make use of them in *distributed and
22+heterogeneous development cycles* (TL;DR; jump to the :ref:`blog-lxcdev-202006
23+abstract`).
24+
25+Motivation
26+==========
27+
28+Normally in our development cycle, we edit the sources and run some test and/or
29+builds by using ``make`` before we commit. This cycle is simple and perfect but
30+might fail in some aspects we should not overlook.
31+
32+ The environment in which we run all our development processes matters!
33+
34+The :ref:`makefile` and the :ref:`make install` encapsulate a lot for us, but they
35+do not have access to all prerequisites. For example, there may have
36+dependencies on packages that are installed on the developer's desktop, but
37+usually are not preinstalled on a server or client system. Another examples
38+are; settings have been made to the software on the developer's host that would
39+never be set on a *production* system.
40+
41+*Linux Containers* (LXC_) are isolate environments and not to mix up on
42+developer's all the prerequisites of all the projects he contribute to, is
43+always a good choice.
44+
45+The scripts from PR :PR:`1803` can divide in those to install and maintain
46+software:
47+
48+- :ref:`searx.sh`
49+- :ref:`filtron.sh`
50+- :ref:`morty.sh`
51+
52+and the script :ref:`lxc.sh`, with we can scale our installation, maintenance or
53+even development tasks over a stack of containers, what we call: *Searx's lxc
54+suite*.
55+
56+Gentlemen, start your engines!
57+==============================
58+
59+.. _LXD: https://linuxcontainers.org/lxd/introduction/
60+.. _archlinux: https://www.archlinux.org/
61+
62+Before you can start with containers, you need to install and initiate LXD_
63+once:
64+
65+.. tabs::
66+
67+ .. group-tab:: desktop
68+
69+ .. code:: sh
70+
71+ $ snap install lxd
72+ $ lxd init --auto
73+
74+And you need to clone from origin or if you have your own fork, clone from your
75+fork:
76+
77+.. tabs::
78+
79+ .. group-tab:: desktop
80+
81+ .. code:: sh
82+
83+ $ cd ~/Downloads
84+ $ git clone https://github.com/searx/searx.git
85+ $ cd searx
86+
87+The :ref:`lxc-searx.env` consists of several images, see ``export
88+LXC_SUITE=(...`` near by :origin:`utils/lxc-searx.env#L19`. For this blog post
89+we exercise on a archlinux_ image. The container of this image is named
90+``searx-archlinux``. Lets build the container, but be sure that this container
91+does not already exists, so first lets remove possible old one:
92+
93+.. tabs::
94+
95+ .. group-tab:: desktop
96+
97+ .. code:: sh
98+
99+ $ sudo -H ./utils/lxc.sh remove searx-archlinux
100+ $ sudo -H ./utils/lxc.sh build searx-archlinux
101+
102+.. sidebar:: The ``searx-archlinux`` container
103+
104+ is the base of all our exercises here.
105+
106+In this container we install all services :ref:`including searx, morty & filtron
107+<lxc.sh install suite>` in once:
108+
109+.. tabs::
110+
111+ .. group-tab:: desktop
112+
113+ .. code:: sh
114+
115+ $ sudo -H ./utils/lxc.sh install suite searx-archlinux
116+
117+To proxy HTTP from filtron and morty in the container to the outside of the
118+container, install nginx into the container. Once for the bot blocker filtron:
119+
120+.. tabs::
121+
122+ .. group-tab:: desktop
123+
124+ .. code:: sh
125+
126+ $ sudo -H ./utils/lxc.sh cmd searx-archlinux \
127+ ./utils/filtron.sh nginx install
128+ ...
129+ INFO: got 429 from http://10.174.184.156/searx
130+
131+and once for the content sanitizer (content proxy morty):
132+
133+.. tabs::
134+
135+ .. group-tab:: desktop
136+
137+ .. code:: sh
138+
139+ $ sudo -H ./utils/lxc.sh cmd searx-archlinux \
140+ ./utils/morty.sh nginx install
141+ ...
142+ INFO: got 200 from http://10.174.184.156/morty/
143+
144+.. sidebar:: Fully functional searx suite
145+
146+ From here on you have a fully functional searx suite running with bot blocker
147+ (filtron) and Web content sanitizer (content proxy morty) needed for a
148+ *privacy protecting* search engine.
149+
150+On your system, the IP of your ``searx-archlinux`` container differs from
151+http://10.174.184.156/searx, just open the URL reported in your installation
152+protocol in your WEB browser from the desktop to test the instance from outside
153+of the container.
154+
155+In such a searx suite admins can maintain and access the debug log of the
156+different services quite easy.
157+
158+.. _working in containers:
159+
160+In containers, work as usual
161+============================
162+
163+Usually you open a root-bash using ``sudo -H bash``. In case of LXC containers
164+open the root-bash in the container using ``./utils/lxc.sh cmd
165+searx-archlinux``:
166+
167+.. tabs::
168+
169+ .. group-tab:: desktop
170+
171+ .. code:: sh
172+
173+ $ sudo -H ./utils/lxc.sh cmd searx-archlinux bash
174+ INFO: [searx-archlinux] bash
175+ [root@searx-archlinux searx]# pwd
176+ /share/searx
177+
178+The prompt ``[root@searx-archlinux ...]`` signals, that you are the root user in
179+the searx-container. To debug the running searx instance use:
180+
181+.. tabs::
182+
183+ .. group-tab:: root@searx-archlinux
184+
185+ .. code:: sh
186+
187+ $ ./utils/searx.sh inspect service
188+ ...
189+ use [CTRL-C] to stop monitoring the log
190+ ...
191+
192+Back in the browser on your desktop open the service http://10.174.184.156/searx
193+and run your application tests while the debug log is shown in the terminal from
194+above. You can stop monitoring using ``CTRL-C``, this also disables the *"debug
195+option"* in searx's settings file and restarts the searx uwsgi application. To
196+debug services from filtron and morty analogous use:
197+
198+.. tabs::
199+
200+ .. group-tab:: root@searx-archlinux
201+
202+ .. code:: sh
203+
204+ $ ./utils/filtron.sh inspect service
205+ $ ./utils/morty.sh inspect service
206+
207+Another point we have to notice is that each service (:ref:`searx <searx.sh>`,
208+:ref:`filtron <filtron.sh>` and :ref:`morty <morty.sh>`) runs under dedicated
209+system user account with the same name (compare :ref:`create searx user`). To
210+get a shell from theses accounts, simply call one of the scripts:
211+
212+.. tabs::
213+
214+ .. group-tab:: root@searx-archlinux
215+
216+ .. code:: sh
217+
218+ $ ./utils/searx.sh shell
219+ $ ./utils/filtron.sh shell
220+ $ ./utils/morty.sh shell
221+
222+To get in touch, open a shell from the service user (searx@searx-archlinux):
223+
224+.. tabs::
225+
226+ .. group-tab:: desktop
227+
228+ .. code:: sh
229+
230+ $ sudo -H ./utils/lxc.sh cmd searx-archlinux \
231+ ./utils/searx.sh shell
232+ // exit with [CTRL-D]
233+ (searx-pyenv) [searx@searx-archlinux ~]$ ...
234+
235+The prompt ``[searx@searx-archlinux]`` signals that you are logged in as system
236+user ``searx`` in the ``searx-archlinux`` container and the python *virtualenv*
237+``(searx-pyenv)`` environment is activated.
238+
239+.. tabs::
240+
241+ .. group-tab:: searx@searx-archlinux
242+
243+ .. code:: sh
244+
245+ (searx-pyenv) [searx@searx-archlinux ~]$ pwd
246+ /usr/local/searx
247+
248+
249+
250+Wrap production into developer suite
251+====================================
252+
253+In this section we will see how to change the *"Fully functional searx suite"*
254+from a LXC container (which is quite ready for production) into a developer
255+suite. For this, we have to keep an eye on the :ref:`installation basic`:
256+
257+- searx setup in: ``/etc/searx/settings.yml``
258+- searx user's home: ``/usr/local/searx``
259+- virtualenv in: ``/usr/local/searx/searx-pyenv``
260+- searx software in: ``/usr/local/searx/searx-src``
261+
262+The searx software is a clone of the ``git_url`` (see :ref:`settings global`) and
263+the working tree is checked out from the ``git_branch``. With the use of the
264+:ref:`searx.sh` the searx service was installed as :ref:`uWSGI application
265+<searx uwsgi>`. To maintain this service, we can use ``systemctl`` (compare
266+:ref:`service architectures on distributions <uwsgi configuration>`).
267+
268+.. tabs::
269+
270+ .. group-tab:: desktop
271+
272+ .. code:: sh
273+
274+ $ sudo -H ./utils/lxc.sh cmd searx-archlinux \
275+ systemctl stop uwsgi@searx
276+
277+With the command above, we stopped the searx uWSGI-App in the archlinux
278+container.
279+
280+The uWSGI-App for the archlinux dsitros is configured in
281+:origin:`utils/templates/etc/uwsgi/apps-archlinux/searx.ini`, from where at
282+least you should attend the settings of ``uid``, ``chdir``, ``env`` and
283+``http``::
284+
285+ env = SEARX_SETTINGS_PATH=/etc/searx/settings.yml
286+ http = 127.0.0.1:8888
287+
288+ chdir = /usr/local/searx/searx-src/searx
289+ virtualenv = /usr/local/searx/searx-pyenv
290+ pythonpath = /usr/local/searx/searx-src
291+
292+If you have read the :ref:`"Good to know section" <lxc.sh>` you remember, that
293+each container shares the root folder of the repository and the command
294+``utils/lxc.sh cmd`` handles relative path names **transparent**. To wrap the
295+searx installation into a developer one, we simple have to create a smylink to
296+the **transparent** reposetory from the desktop. Now lets replace the
297+repository at ``searx-src`` in the container with the working tree from outside
298+of the container:
299+
300+.. tabs::
301+
302+ .. group-tab:: container becomes a developer suite
303+
304+ .. code:: sh
305+
306+ $ sudo -H ./utils/lxc.sh cmd searx-archlinux \
307+ mv /usr/local/searx/searx-src /usr/local/searx/searx-src.old
308+
309+ $ sudo -H ./utils/lxc.sh cmd searx-archlinux \
310+ ln -s /share/searx/ /usr/local/searx/searx-src
311+
312+Now we can develop as usual in the working tree of our desktop system. Every
313+time the software was changed, you have to restart the searx service (in the
314+conatiner):
315+
316+.. tabs::
317+
318+ .. group-tab:: desktop
319+
320+ .. code:: sh
321+
322+ $ sudo -H ./utils/lxc.sh cmd searx-archlinux \
323+ systemctl restart uwsgi@searx
324+
325+
326+Remember: :ref:`working in containers` .. here are just some examples from my
327+daily usage:
328+
329+.. tabs::
330+
331+ .. group-tab:: desktop
332+
333+ To *inspect* the searx instance (already described above):
334+
335+ .. code:: sh
336+
337+ $ sudo -H ./utils/lxc.sh cmd searx-archlinux \
338+ ./utils/searx.sh inspect service
339+
340+ Run :ref:`makefile`, e.g. to test inside the container:
341+
342+ .. code:: sh
343+
344+ $ sudo -H ./utils/lxc.sh cmd searx-archlinux \
345+ make test
346+
347+ To install all prerequisites needed for a :ref:`buildhosts`:
348+
349+ .. code:: sh
350+
351+ $ sudo -H ./utils/lxc.sh cmd searx-archlinux \
352+ ./utils/searx.sh install buildhost
353+
354+ To build the docs on a buildhost :ref:`buildhosts`:
355+
356+ .. code:: sh
357+
358+ $ sudo -H ./utils/lxc.sh cmd searx-archlinux \
359+ make docs.html
360+
361+.. _blog-lxcdev-202006 abstract:
362+
363+Abstract
364+========
365+
366+We build up a fully functional searx suite in a archlinux container:
367+
368+.. code:: sh
369+
370+ $ sudo -H ./utils/lxc.sh install suite searx-archlinux
371+
372+To access HTTP from the desktop we installed nginx for the services inside the
373+conatiner:
374+
375+.. tabs::
376+
377+ .. group-tab:: [root@searx-archlinux]
378+
379+ .. code:: sh
380+
381+ $ ./utils/filtron.sh nginx install
382+ $ ./utils/morty.sh nginx install
383+
384+To wrap the suite into a developer one, we created a symbolic link to the
385+repository which is shared **transparent** from the desktop's file system into
386+the container :
387+
388+.. tabs::
389+
390+ .. group-tab:: [root@searx-archlinux]
391+
392+ .. code:: sh
393+
394+ $ mv /usr/local/searx/searx-src /usr/local/searx/searx-src.old
395+ $ ln -s /share/searx/ /usr/local/searx/searx-src
396+ $ systemctl restart uwsgi@searx
397+
398+To get remarks from the suite of the archlinux container we can use:
399+
400+.. tabs::
401+
402+ .. group-tab:: desktop
403+
404+ .. code:: sh
405+
406+ $ sudo -H ./utils/lxc.sh show suite searx-archlinux
407+ ...
408+ [searx-archlinux] INFO: (eth0) filtron: http://10.174.184.156:4004/ http://10.174.184.156/searx
409+ [searx-archlinux] INFO: (eth0) morty: http://10.174.184.156:3000/
410+ [searx-archlinux] INFO: (eth0) docs.live: http://10.174.184.156:8080/
411+ [searx-archlinux] INFO: (eth0) IPv6: http://[fd42:573b:e0b3:e97e:216:3eff:fea5:9b65]
412+ ...
413+
docs/blog/private-engines.rst+3−1
@@ -7,13 +7,15 @@ enabled engines on their instances. It might be because they do not want to
77expose some private information through an offline engine. Or they
88would rather share engines only with their trusted friends or colleagues.
99
10+.. _private engines:
11+
1012Private engines
1113===============
1214
1315To solve this issue private engines were introduced in :pull:`1823`.
1416A new option was added to engines named `tokens`. It expects a list
1517of strings. If the user making a request presents one of the tokens
16−of an engine, he/she is able to access information about the engine
18+of an engine, they can access information about the engine
1719and make search requests.
1820
1921Example configuration to restrict access to the Arch Linux Wiki engine:
docs/blog/python3.rst+1−1
@@ -54,7 +54,7 @@ If you found bugs
5454Please open an issue on `GitHub`_. Make sure that you mention your Python
5555version in your issue, so we can investigate it properly.
5656
57−.. _GitHub: https://github.com/asciimoo/searx/issues
57+.. _GitHub: https://github.com/searx/searx/issues
5858
5959Acknowledgment
6060==============
docs/blog/search-database-engines.rstnew file+95
@@ -0,0 +1,95 @@
1+===============================
2+Query more of your NoSQL stores
3+===============================
4+
5+From now on, searx lets you to query your NoSQL data stores:
6+
7+* `Redis`_
8+* `MongoDB`_
9+
10+The reference configuration of the engines are included ``settings.yml`` just commented out,
11+as you have to set various options and install dependencies before using them.
12+
13+By default, the engines use ``key-value`` template for displaying results.
14+If you are not satisfied with the original result layout,
15+you can use your owm template by placing the template under
16+``searx/templates/{theme_name}/result_templates/{template_name}`` and setting
17+``result_template`` attribute to ``{template_name}``.
18+
19+Futhermore, if you do not want to expose these engines on a public instance, you can
20+still add them and limit the access by setting ``tokens`` as described in the `blog post about
21+private engines`_.
22+
23+Configuring searx to use the stores
24+===================================
25+
26+NoSQL data stores are used for storing arbitrary data without first defining their
27+structure.
28+
29+Redis
30+-----
31+
32+Reqired package: ``redis``
33+
34+Redis is a key value based data store usually stored in memory.
35+
36+Select a database to search in and set its index in the option ``db``. You can
37+either look for exact matches or use partial keywords to find what you are looking for
38+by configuring ``exact_match_only``.
39+
40+In this example you can search for exact matches in your first database:
41+
42+.. code:: yaml
43+
44+ - name : mystore
45+ engine : redis_server
46+ exact_match_only : True
47+ host : 127.0.0.1
48+ port : 6379
49+ password : secret-password
50+ db : 0
51+ shortcut : rds
52+ enable_http : True
53+
54+
55+MongoDB
56+-------
57+
58+Required package: ``pymongo``
59+
60+MongoDB is a document based database program that handles JSON like data.
61+
62+In order to query MongoDB, you have to select a ``database`` and a ``collection``. Furthermore,
63+you have to select a ``key`` that is going to be searched. MongoDB also supports the option ``exact_match_only``, so configure it
64+as you wish.
65+
66+Above is an example configuration for using a MongoDB collection:
67+
68+.. code:: yaml
69+
70+ - name : mymongo
71+ engine : mongodb
72+ shortcut : md
73+ host : '127.0.0.1'
74+ port : 27017
75+ database : personal
76+ collection : income
77+ key : month
78+ enable_http: True
79+
80+
81+Acknowledgement
82+===============
83+
84+This development was sponsored by `Search and Discovery Fund`_ of `NLnet Foundation`_ .
85+
86+.. _Redis: https://redis.io/
87+.. _MongoDB: https://mongodb.com/
88+.. _blog post about private engines: private-engines.html#private-engines
89+.. _Search and Discovery Fund: https://nlnet.nl/discovery
90+.. _NLnet Foundation: https://nlnet.nl/
91+
92+
93+| Happy hacking.
94+| kvch // 2021.07.13 23:16
95+
docs/blog/search-indexer-engines.rstnew file+114
@@ -0,0 +1,114 @@
1+===============================
2+Query your local search engines
3+===============================
4+
5+From now on, searx lets you to query your locally running search engines. The following
6+ones are supported now:
7+
8+* `Elasticsearch`_
9+* `Meilisearch`_
10+* `Solr`_
11+
12+All of the engines above are added to ``settings.yml`` just commented out, as you have to
13+``base_url`` for all them.
14+
15+Please note that if you are not using HTTPS to access these engines, you have to enable
16+HTTP requests by setting ``enable_http`` to ``True``.
17+
18+Futhermore, if you do not want to expose these engines on a public instance, you can
19+still add them and limit the access by setting ``tokens`` as described in the `blog post about
20+private engines`_.
21+
22+Configuring searx for search engines
23+====================================
24+
25+Each search engine is powerful, capable of full-text search.
26+
27+Elasticsearch
28+-------------
29+
30+Elasticsearch supports numerous ways to query the data it is storing. At the moment
31+the engine supports the most popular search methods: ``match``, ``simple_query_string``, ``term`` and ``terms``.
32+
33+If none of the methods fit your use case, you can select ``custom`` query type and provide the JSON payload
34+searx has to submit to Elasticsearch in ``custom_query_json``.
35+
36+The following is an example configuration for an Elasticsearch instance with authentication
37+configured to read from ``my-index`` index.
38+
39+.. code:: yaml
40+
41+ - name : elasticsearch
42+ shortcut : es
43+ engine : elasticsearch
44+ base_url : http://localhost:9200
45+ username : elastic
46+ password : changeme
47+ index : my-index
48+ query_type : match
49+ enable_http : True
50+
51+
52+Meilisearch
53+-----------
54+
55+This search engine is aimed at individuals and small companies. It is designed for
56+small-scale (less than 10 million documents) data collections. E.g. it is great for storing
57+web pages you have visited and searching in the contents later.
58+
59+The engine supports faceted search, so you can search in a subset of documents of the collection.
60+Futhermore, you can search in Meilisearch instances that require authentication by setting ``auth_token``.
61+
62+Here is a simple example to query a Meilisearch instance:
63+
64+.. code:: yaml
65+
66+ - name : meilisearch
67+ engine : meilisearch
68+ shortcut: mes
69+ base_url : http://localhost:7700
70+ index : my-index
71+ enable_http: True
72+
73+
74+Solr
75+----
76+
77+Solr is a popular search engine based on Lucene, just like Elasticsearch.
78+But instead of searching in indices, you can search in collections.
79+
80+This is an example configuration for searching in the collection ``my-collection`` and get
81+the results in ascending order.
82+
83+.. code:: yaml
84+
85+ - name : solr
86+ engine : solr
87+ shortcut : slr
88+ base_url : http://localhost:8983
89+ collection : my-collection
90+ sort : asc
91+ enable_http : True
92+
93+
94+Next steps
95+==========
96+
97+The next step is to add support for various SQL databases.
98+
99+Acknowledgement
100+===============
101+
102+This development was sponsored by `Search and Discovery Fund`_ of `NLnet Foundation`_ .
103+
104+.. _blog post about private engines: private-engines.html#private-engines
105+.. _Elasticsearch: https://www.elastic.co/elasticsearch/
106+.. _Meilisearch: https://www.meilisearch.com/
107+.. _Solr: https://solr.apache.org/
108+.. _Search and Discovery Fund: https://nlnet.nl/discovery
109+.. _NLnet Foundation: https://nlnet.nl/
110+
111+
112+| Happy hacking.
113+| kvch // 2021.04.07 23:16
114+
docs/blog/sql-engines.rstnew file+117
@@ -0,0 +1,117 @@
1+=================
2+Query SQL servers
3+=================
4+
5+Now you can query SQL servers using searx. The following ones are supported:
6+
7+* `PostgreSQL`_
8+* `MySQL`_
9+* `SQLite`_
10+
11+All of the engines above are added to ``settings.yml`` just commented out, as you have to
12+set the required attributes for the engines, e.g. ``database``. By default, the engines use
13+``key-value`` template for displaying results. If you are not satisfied with the original result layout,
14+you can use your owm template by placing the template under
15+``searx/templates/{theme_name}/result_templates/{template_name}`` and setting
16+``result_template`` attribute to ``{template_name}``.
17+
18+As mentioned in previous blog posts, if you do not wish to expose these engines on a
19+public instance, you can still add them and limit the access by setting ``tokens``
20+as described in the `blog post about private engines`_.
21+
22+Configure the engines
23+=====================
24+
25+The configuration of the new database engines are similar. You must put a valid
26+SELECT SQL query in ``query_str``. At the moment you can only bind at most
27+one parameter in your query. By setting the attribute ``limit`` you can
28+define how many results you want from the SQL server. Basically, it
29+is the same as the LIMIT keyword in SQL.
30+
31+Please, do not include LIMIT or OFFSET in your SQL query as the engines
32+rely on these keywords during paging. If you want to configure the number of returned results
33+use the option ``limit``.
34+
35+PostgreSQL
36+----------
37+
38+PostgreSQL is a powerful and robust open source database.
39+
40+Before configuring the PostgreSQL engine, you must install the dependency ``psychopg2``.
41+
42+You can find an example configuration below:
43+
44+.. code:: yaml
45+
46+ - name : postgresql
47+ engine : postgresql
48+ database : my_database
49+ username : searx
50+ password : password
51+ query_str : 'SELECT * from my_table WHERE my_column = %(query)s'
52+ shortcut : psql
53+
54+
55+MySQL
56+-----
57+
58+MySQL is said to be the most popular open source database.
59+
60+Before enabling MySQL engine, you must install the package ``mysql-connector-python``.
61+
62+The authentication plugin is configurable by setting ``auth_plugin`` in the attributes.
63+By default it is set to ``caching_sha2_password``.
64+
65+This is an example configuration for quering a MySQL server:
66+
67+.. code:: yaml
68+
69+ - name : mysql
70+ engine : mysql_server
71+ database : my_database
72+ username : searx
73+ password : password
74+ limit : 5
75+ query_str : 'SELECT * from my_table WHERE my_column=%(query)s'
76+ shortcut : mysql
77+
78+
79+SQLite
80+------
81+
82+SQLite is a small, fast and reliable SQL database engine. It does not require
83+any extra dependency.
84+
85+You can read from your database ``my_database`` using this example configuration:
86+
87+.. code:: yaml
88+
89+ - name : sqlite
90+ engine : sqlite
91+ shortcut: sq
92+ database : my_database
93+ query_str : 'SELECT * FROM my_table WHERE my_column=:query'
94+
95+
96+Next steps
97+==========
98+
99+The next step is to add support for more data stores, e.g. Redis and MongoDB.
100+
101+Acknowledgement
102+===============
103+
104+This development was sponsored by `Search and Discovery Fund`_ of `NLnet Foundation`_ .
105+
106+.. _PostgreSQL: https://www.postgresql.org/
107+.. _MySQL: https://www.mysql.com/
108+.. _SQLite: https://www.sqlite.org/index.html
109+.. _blog post about private engines: private-engines.html#private-engines
110+.. _Search and Discovery Fund: https://nlnet.nl/discovery
111+.. _NLnet Foundation: https://nlnet.nl/
112+
113+
114+| Happy hacking.
115+| kvch // 2021.05.23 23:16
116+
117+
docs/build-templates/filtron.rstnew file+52
@@ -0,0 +1,52 @@
1+.. START create user
2+
3+.. tabs::
4+
5+ .. group-tab:: bash
6+
7+ .. code-block:: sh
8+
9+ $ sudo -H useradd --shell /bin/bash --system \\
10+ --home-dir \"$SERVICE_HOME\" \\
11+ --comment \"Privacy-respecting metasearch engine\" $SERVICE_USER
12+
13+ $ sudo -H mkdir \"$SERVICE_HOME\"
14+ $ sudo -H chown -R \"$SERVICE_GROUP:$SERVICE_GROUP\" \"$SERVICE_HOME\"
15+
16+.. END create user
17+
18+.. START install go
19+
20+.. tabs::
21+
22+ .. group-tab:: bash
23+
24+ .. code-block:: bash
25+
26+ $ cat > \"$GO_ENV\" <<EOF
27+ export GOPATH=${SERVICE_HOME}/go-apps
28+ export PATH=\$PATH:${SERVICE_HOME}/local/go/bin:\$GOPATH/bin
29+ EOF
30+ $ sudo -i -u \"${SERVICE_USER}\"
31+ (${SERVICE_USER}) $ echo 'source $GO_ENV' >> ~/.profile
32+ (${SERVICE_USER}) $ mkdir ${SERVICE_HOME}/local
33+ (${SERVICE_USER}) $ wget --progress=bar -O \"${GO_TAR}\" \\
34+ \"${GO_PKG_URL}\"
35+ (${SERVICE_USER}) $ tar -C ${SERVICE_HOME}/local -xzf \"${GO_TAR}\"
36+ (${SERVICE_USER}) $ which go
37+ ${SERVICE_HOME}/local/go/bin/go
38+
39+.. END install go
40+
41+.. START install filtron
42+
43+.. tabs::
44+
45+ .. group-tab:: bash
46+
47+ .. code-block:: bash
48+
49+ $ sudo -i -u \"${SERVICE_USER}\"
50+ (${SERVICE_USER}) $ go get -v -u github.com/asciimoo/filtron
51+
52+.. END install filtron
docs/build-templates/morty.rstnew file+52
@@ -0,0 +1,52 @@
1+.. START create user
2+
3+.. tabs::
4+
5+ .. group-tab:: bash
6+
7+ .. code-block:: sh
8+
9+ $ sudo -H useradd --shell /bin/bash --system \\
10+ --home-dir \"$SERVICE_HOME\" \\
11+ --comment \"Privacy-respecting metasearch engine\" $SERVICE_USER
12+
13+ $ sudo -H mkdir \"$SERVICE_HOME\"
14+ $ sudo -H chown -R \"$SERVICE_GROUP:$SERVICE_GROUP\" \"$SERVICE_HOME\"
15+
16+.. END create user
17+
18+.. START install go
19+
20+.. tabs::
21+
22+ .. group-tab:: bash
23+
24+ .. code-block:: bash
25+
26+ $ cat > \"$GO_ENV\" <<EOF
27+ export GOPATH=${SERVICE_HOME}/go-apps
28+ export PATH=\$PATH:${SERVICE_HOME}/local/go/bin:\$GOPATH/bin
29+ EOF
30+ $ sudo -i -u \"${SERVICE_USER}\"
31+ (${SERVICE_USER}) $ echo 'source $GO_ENV' >> ~/.profile
32+ (${SERVICE_USER}) $ mkdir ${SERVICE_HOME}/local
33+ (${SERVICE_USER}) $ wget --progress=bar -O \"${GO_TAR}\" \\
34+ \"${GO_PKG_URL}\"
35+ (${SERVICE_USER}) $ tar -C ${SERVICE_HOME}/local -xzf \"${GO_TAR}\"
36+ (${SERVICE_USER}) $ which go
37+ ${SERVICE_HOME}/local/go/bin/go
38+
39+.. END install go
40+
41+.. START install morty
42+
43+.. tabs::
44+
45+ .. group-tab:: bash
46+
47+ .. code-block:: bash
48+
49+ $ sudo -i -u \"${SERVICE_USER}\"
50+ (${SERVICE_USER}) $ go get -v -u github.com/asciimoo/morty
51+
52+.. END install morty
docs/build-templates/searx.rst+68−17
@@ -28,6 +28,32 @@ ${fedora}
2828
2929.. END distro-packages
3030
31+.. START build-packages
32+
33+.. tabs::
34+
35+ .. group-tab:: Ubuntu / debian
36+
37+ .. code-block:: sh
38+
39+ $ sudo -H apt-get install -y \\
40+${debian_build}
41+
42+ .. group-tab:: Arch Linux
43+
44+ .. code-block:: sh
45+
46+ $ sudo -H pacman -S --noconfirm \\
47+${arch_build}
48+
49+ .. group-tab:: Fedora / RHEL
50+
51+ .. code-block:: sh
52+
53+ $ sudo -H dnf install -y \\
54+${fedora_build}
55+
56+.. END build-packages
3157
3258.. START create user
3359
@@ -38,11 +64,11 @@ ${fedora}
3864 .. code-block:: sh
3965
4066 $ sudo -H useradd --shell /bin/bash --system \\
41− --home-dir "$SERVICE_HOME" \\
42− --comment "Privacy-respecting metasearch engine" $SERVICE_USER
67+ --home-dir \"$SERVICE_HOME\" \\
68+ --comment 'Privacy-respecting metasearch engine' $SERVICE_USER
4369
44− $ sudo -H mkdir "$SERVICE_HOME"
45− $ sudo -H chown -R "$SERVICE_GROUP:$SERVICE_GROUP" "$SERVICE_HOME"
70+ $ sudo -H mkdir \"$SERVICE_HOME\"
71+ $ sudo -H chown -R \"$SERVICE_GROUP:$SERVICE_GROUP\" \"$SERVICE_HOME\"
4672
4773.. END create user
4874
@@ -55,7 +81,7 @@ ${fedora}
5581 .. code-block:: sh
5682
5783 $ sudo -H -u ${SERVICE_USER} -i
58− (${SERVICE_USER})$ git clone "https://github.com/asciimoo/searx.git" "$SEARX_SRC"
84+ (${SERVICE_USER})$ git clone \"https://github.com/searx/searx.git\" \"$SEARX_SRC\"
5985
6086.. END clone searx
6187
@@ -67,8 +93,8 @@ ${fedora}
6793
6894 .. code-block:: sh
6995
70− (${SERVICE_USER})$ python3 -m venv "${SEARX_PYENV}"
71− (${SERVICE_USER})$ echo ". ${SEARX_PYENV}/bin/activate" >> "$SERVICE_HOME/.profile"
96+ (${SERVICE_USER})$ python3 -m venv \"${SEARX_PYENV}\"
97+ (${SERVICE_USER})$ echo \". ${SEARX_PYENV}/bin/activate\" >> \"$SERVICE_HOME/.profile\"
7298
7399.. END create virtualenv
74100
@@ -86,8 +112,16 @@ ${fedora}
86112 $SEARX_PYENV/bin/python
87113 Python 3.8.1
88114
89− (${SERVICE_USER})$ cd "$SEARX_SRC"
90− (${SERVICE_USER})$ ./manage.sh update_packages
115+ # update pip's boilerplate ..
116+ pip install -U pip
117+ pip install -U setuptools
118+ pip install -U wheel
119+ pip install -U pyyaml
120+
121+ # jump to searx's working tree and install searx into virtualenv
122+ (${SERVICE_USER})$ cd \"$SEARX_SRC\"
123+ (${SERVICE_USER})$ pip install -e .
124+
91125
92126.. END manage.sh update_packages
93127
@@ -95,13 +129,30 @@ ${fedora}
95129
96130.. tabs::
97131
98− .. group-tab:: bash
132+ .. group-tab:: Use default settings
133+
134+ .. code-block:: sh
135+
136+ $ sudo -H mkdir -p \"$(dirname ${SEARX_SETTINGS_PATH})\"
137+ $ sudo -H cp \"$SEARX_SRC/utils/templates/etc/searx/use_default_settings.yml\" \\
138+ \"${SEARX_SETTINGS_PATH}\"
139+
140+ .. group-tab:: searx/settings.yml
141+
142+ .. code-block:: sh
143+
144+ $ sudo -H mkdir -p \"$(dirname ${SEARX_SETTINGS_PATH})\"
145+ $ sudo -H cp \"$SEARX_SRC/searx/settings.yml\" \\
146+ \"${SEARX_SETTINGS_PATH}\"
147+
148+.. tabs::
149+
150+ .. group-tab:: minimal setup
99151
100152 .. code-block:: sh
101153
102− $ sudo -H cp "$SEARX_SRC/searx/settings.yml" "${SEARX_SETTINGS_PATH}"
103− $ sudo -H sed -i -e "s/ultrasecretkey/\\$(openssl rand -hex 16)/g" "$SEARX_SETTINGS_PATH"
104− $ sudo -H sed -i -e "s/{instance_name}/searx@\\$(uname -n)/g" "$SEARX_SETTINGS_PATH"
154+ $ sudo -H sed -i -e \"s/ultrasecretkey/\$(openssl rand -hex 16)/g\" \"$SEARX_SETTINGS_PATH\"
155+ $ sudo -H sed -i -e \"s/{instance_name}/searx@\$(uname -n)/g\" \"$SEARX_SETTINGS_PATH\"
105156
106157.. END searx config
107158
@@ -114,16 +165,16 @@ ${fedora}
114165 .. code-block:: sh
115166
116167 # enable debug ..
117− $ sudo -H sed -i -e "s/debug : False/debug : True/g" "$SEARX_SETTINGS_PATH"
168+ $ sudo -H sed -i -e \"s/debug : False/debug : True/g\" \"$SEARX_SETTINGS_PATH\"
118169
119170 # start webapp
120171 $ sudo -H -u ${SERVICE_USER} -i
121172 (${SERVICE_USER})$ cd ${SEARX_SRC}
122− (${SERVICE_USER})$ export SEARX_SETTINGS_PATH="${SEARX_SETTINGS_PATH}"
173+ (${SERVICE_USER})$ export SEARX_SETTINGS_PATH=\"${SEARX_SETTINGS_PATH}\"
123174 (${SERVICE_USER})$ python searx/webapp.py
124175
125176 # disable debug
126− $ sudo -H sed -i -e "s/debug : True/debug : False/g" "$SEARX_SETTINGS_PATH"
177+ $ sudo -H sed -i -e \"s/debug : True/debug : False/g\" \"$SEARX_SETTINGS_PATH\"
127178
128179Open WEB browser and visit http://$SEARX_INTERNAL_URL . If you are inside a
129180container or in a script, test with curl:
@@ -134,7 +185,7 @@ container or in a script, test with curl:
134185
135186 .. code-block:: sh
136187
137− $ xgd-open http://$SEARX_INTERNAL_URL
188+ $ xdg-open http://$SEARX_INTERNAL_URL
138189
139190 .. group-tab:: curl
140191
docs/conf.py+39−26
@@ -1,18 +1,16 @@
11# -*- coding: utf-8 -*-
2+# SPDX-License-Identifier: AGPL-3.0-or-later
23
34import sys, os
4−from searx.version import VERSION_STRING
55from pallets_sphinx_themes import ProjectLink
66
7−GIT_URL = os.environ.get("GIT_URL", "https://github.com/asciimoo/searx")
8−GIT_BRANCH =os.environ.get("GIT_BRANCH", "master")
9−SEARX_URL = os.environ.get("SEARX_URL", "https://searx.me")
10−DOCS_URL = os.environ.get("DOCS_URL", "https://asciimoo.github.io/searx/")
7+from searx import brand
8+from searx.version import VERSION_STRING
119
1210# Project --------------------------------------------------------------
1311
1412project = u'searx'
15−copyright = u'2015-2020, Adam Tauber, Noémi Ványi'
13+copyright = u'2015-2021, Adam Tauber, Noémi Ványi'
1614author = u'Adam Tauber'
1715release, version = VERSION_STRING, VERSION_STRING
1816highlight_language = 'none'
@@ -25,33 +23,39 @@ numfig = True
2523
2624exclude_patterns = ['build-templates/*.rst']
2725
28−from searx import webapp
26+import searx.search
27+import searx.engines
28+import searx.plugins
29+searx.search.initialize()
2930jinja_contexts = {
30− 'webapp': dict(**webapp.__dict__)
31+ 'searx': {
32+ 'engines': searx.engines.engines,
33+ 'plugins': searx.plugins.plugins
34+ },
3135}
3236
3337# usage:: lorem :patch:`f373169` ipsum
3438extlinks = {}
3539
3640# upstream links
37−extlinks['wiki'] = ('https://github.com/asciimoo/searx/wiki/%s', ' ')
38−extlinks['pull'] = ('https://github.com/asciimoo/searx/pull/%s', 'PR ')
41+extlinks['wiki'] = ('https://github.com/searx/searx/wiki/%s', ' ')
42+extlinks['pull'] = ('https://github.com/searx/searx/pull/%s', 'PR ')
3943
4044# links to custom brand
41−extlinks['origin'] = (GIT_URL + '/blob/' + GIT_BRANCH + '/%s', 'git://')
42−extlinks['patch'] = (GIT_URL + '/commit/%s', '#')
43−extlinks['search'] = (SEARX_URL + '/%s', '#')
44−extlinks['docs'] = (DOCS_URL + '/%s', 'docs: ')
45+extlinks['origin'] = (brand.GIT_URL + '/blob/' + brand.GIT_BRANCH + '/%s', 'git://')
46+extlinks['patch'] = (brand.GIT_URL + '/commit/%s', '#')
47+extlinks['search'] = (brand.SEARX_URL + '/%s', '#')
48+extlinks['docs'] = (brand.DOCS_URL + '/%s', 'docs: ')
4549extlinks['pypi'] = ('https://pypi.org/project/%s', 'PyPi: ')
4650extlinks['man'] = ('https://manpages.debian.org/jump?q=%s', '')
4751#extlinks['role'] = (
4852# 'https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-%s', '')
4953extlinks['duref'] = (
50− 'http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#%s', '')
54+ 'https://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#%s', '')
5155extlinks['durole'] = (
52− 'http://docutils.sourceforge.net/docs/ref/rst/roles.html#%s', '')
56+ 'https://docutils.sourceforge.net/docs/ref/rst/roles.html#%s', '')
5357extlinks['dudir'] = (
54− 'http://docutils.sourceforge.net/docs/ref/rst/directives.html#%s', '')
58+ 'https://docutils.sourceforge.net/docs/ref/rst/directives.html#%s', '')
5559extlinks['ctan'] = (
5660 'https://ctan.org/pkg/%s', 'CTAN: ')
5761
@@ -65,6 +69,7 @@ extensions = [
6569 "sphinx_issues", # https://github.com/sloria/sphinx-issues/blob/master/README.rst
6670 "sphinxcontrib.jinja", # https://github.com/tardyp/sphinx-jinja
6771 "sphinxcontrib.programoutput", # https://github.com/NextThought/sphinxcontrib-programoutput
72+ 'linuxdoc.kernel_include', # Implementation of the 'kernel-include' reST-directive.
6873 'linuxdoc.rstFlatTable', # Implementation of the 'flat-table' reST-directive.
6974 'linuxdoc.kfigure', # Sphinx extension which implements scalable image handling.
7075 "sphinx_tabs.tabs", # https://github.com/djungelorm/sphinx-tabs
@@ -79,11 +84,12 @@ intersphinx_mapping = {
7984 "sphinx" : ("https://www.sphinx-doc.org/en/master/", None),
8085}
8186
82−issues_github_path = "asciimoo/searx"
87+issues_github_path = "searx/searx"
8388
8489# HTML -----------------------------------------------------------------
8590
8691sys.path.append(os.path.abspath('_themes'))
92+sys.path.insert(0, os.path.abspath("../utils/"))
8793html_theme_path = ['_themes']
8894html_theme = "searx"
8995
@@ -94,14 +100,21 @@ imgmath_font_size = 14
94100# sphinx.ext.imgmath setup END
95101
96102html_theme_options = {"index_sidebar_logo": True}
97−html_context = {
98− "project_links": [
99− ProjectLink("Source", GIT_URL),
100− ProjectLink("Wiki", "https://github.com/asciimoo/searx/wiki"),
101− ProjectLink("Public instances", "https://searx.space/"),
102− ProjectLink("Twitter", "https://twitter.com/Searx_engine"),
103− ]
104−}
103+html_context = {"project_links": [] }
104+html_context["project_links"].append(ProjectLink("Blog", "blog/index.html"))
105+if brand.GIT_URL:
106+ html_context["project_links"].append(ProjectLink("Source", brand.GIT_URL))
107+if brand.WIKI_URL:
108+ html_context["project_links"].append(ProjectLink("Wiki", brand.WIKI_URL))
109+if brand.PUBLIC_INSTANCES:
110+ html_context["project_links"].append(ProjectLink("Public instances", brand.PUBLIC_INSTANCES))
111+if brand.TWITTER_URL:
112+ html_context["project_links"].append(ProjectLink("Twitter", brand.TWITTER_URL))
113+if brand.ISSUE_URL:
114+ html_context["project_links"].append(ProjectLink("Issue Tracker", brand.ISSUE_URL))
115+if brand.CONTACT_URL:
116+ html_context["project_links"].append(ProjectLink("Contact", brand.CONTACT_URL))
117+
105118html_sidebars = {
106119 "**": ["project.html", "relations.html", "searchbox.html"],
107120}
docs/dev/contribution_guide.rst+29−25
@@ -87,7 +87,7 @@ In order to submit a patch, please follow the steps below:
8787
8888- Add yourself to the :origin:`AUTHORS.rst` file.
8989
90−- Choose meaning full commit messages, read `Conventional Commits`_
90+- Choose meaningful commit messages, read `Conventional Commits`_
9191
9292 .. code::
9393
@@ -117,8 +117,8 @@ Translation currently takes place on :ref:`transifex <translation>`.
117117Documentation
118118=============
119119
120−.. _Sphinx: http://www.sphinx-doc.org
121−.. _reST: http://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html
120+.. _Sphinx: https://www.sphinx-doc.org
121+.. _reST: https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html
122122
123123.. sidebar:: The reST sources
124124
@@ -132,54 +132,58 @@ Here is an example which makes a complete rebuild:
132132
133133.. code:: sh
134134
135− $ make docs-clean docs
135+ $ make docs.clean docs.html
136136 ...
137137 The HTML pages are in dist/docs.
138138
139−.. _make docs-live:
139+.. _make docs.live:
140140
141141live build
142142----------
143143
144−.. sidebar:: docs-clean
144+.. _sphinx-autobuild:
145+ https://github.com/executablebooks/sphinx-autobuild/blob/master/README.md
146+
147+.. sidebar:: docs.clean
145148
146149 It is recommended to assert a complete rebuild before deploying (use
147− ``docs-clean``).
150+ ``docs.clean``).
148151
149152Live build is like WYSIWYG. If you want to edit the documentation, its
150−recommended to use. The Makefile target ``docs-live`` builds the docs, opens
153+recommended to use. The Makefile target ``docs.live`` builds the docs, opens
151154URL in your favorite browser and rebuilds every time a reST file has been
152155changed.
153156
154157.. code:: sh
155158
156− $ make docs-live
159+ $ make docs.live
157160 ...
158161 The HTML pages are in dist/docs.
159− ... Serving on http://0.0.0.0:8080
162+ ... Serving on http://0.0.0.0:8000
160163 ... Start watching changes
161164
165+Live builds are implemented by sphinx-autobuild_. Use environment
166+``$(SPHINXOPTS)`` to pass arguments to the sphinx-autobuild_ command. Except
167+option ``--host`` (which is always set to ``0.0.0.0``) you can pass any
168+argument. E.g to find and use a free port, use:
169+
170+.. code:: sh
171+
172+ $ SPHINXOPTS="--port 0" make docs.live
173+ ...
174+ ... Serving on http://0.0.0.0:50593
175+ ...
176+
162177
163178.. _deploy on github.io:
164179
165180deploy on github.io
166181-------------------
167182
168−To deploy documentation at :docs:`github.io <.>` use Makefile target
169−:ref:`make gh-pages`, which will builds the documentation, clones searx into a sub
170−folder ``gh-pages``, cleans it, copies the doc build into and runs all the
171−needed git add, commit and push:
183+To deploy documentation at :docs:`github.io <.>` use Makefile target :ref:`make
184+docs.gh-pages`, which builds the documentation and runs all the needed git add,
185+commit and push:
172186
173187.. code:: sh
174188
175− $ make docs-clean gh-pages
176− ...
177− SPHINX docs --> file://<...>/dist/docs
178− The HTML pages are in dist/docs.
179− ...
180− Cloning into 'gh-pages' ...
181− ...
182− cd gh-pages; git checkout gh-pages >/dev/null
183− Switched to a new branch 'gh-pages'
184− ...
185− doc available at --> https://asciimoo.github.io/searx
189+ $ make docs.clean docs.gh-pages
docs/dev/engine_overview.rst+70−31
@@ -18,6 +18,9 @@ engines. Adapters are stored under the folder :origin:`searx/engines`.
1818 :depth: 3
1919 :backlinks: entry
2020
21+
22+.. _general engine configuration:
23+
2124general engine configuration
2225============================
2326
@@ -34,30 +37,36 @@ settings. However, the standard way is the following:
3437engine file
3538-----------
3639
37−======================= =========== ===========================================
40+======================= =========== ========================================================
3841argument type information
39−======================= =========== ===========================================
42+======================= =========== ========================================================
4043categories list pages, in which the engine is working
4144paging boolean support multible pages
42−language_support boolean support language choosing
4345time_range_support boolean support search time range
44−offline boolean engine runs offline
45−======================= =========== ===========================================
46+engine_type str ``online`` by default, other possibles values are
47+ ``offline``, ``online_dictionnary``, ``online_currency``
48+======================= =========== ========================================================
4649
4750.. _engine settings:
4851
4952settings.yml
5053------------
5154
52−======================= =========== ===========================================
55+======================= =========== =============================================
5356argument type information
54−======================= =========== ===========================================
57+======================= =========== =============================================
5558name string name of search-engine
5659engine string name of searx-engine
5760 (filename without ``.py``)
61+enable_http bool enable HTTP
62+ (by default only HTTPS is enabled).
5863shortcut string shortcut of search-engine
5964timeout string specific timeout for search-engine
60−======================= =========== ===========================================
65+display_error_messages boolean display error messages on the web UI
66+proxies dict set proxies for a specific engine
67+ (e.g. ``proxies : {http: socks5://proxy:port,
68+ https: socks5://proxy:port}``)
69+======================= =========== =============================================
6170
6271
6372overrides
@@ -89,7 +98,6 @@ example code
8998 # engine dependent config
9099 categories = ['general']
91100 paging = True
92− language_support = True
93101
94102
95103making a request
@@ -104,21 +112,48 @@ passed arguments
104112These arguments can be used to construct the search query. Furthermore,
105113parameters with default value can be redefined for special purposes.
106114
115+If the ``engine_type`` is ``online```:
116+
117+====================== ============== ========================================================================
118+argument type default-value, information
119+====================== ============== ========================================================================
120+url str ``''``
121+method str ``'GET'``
122+headers set ``{}``
123+data set ``{}``
124+cookies set ``{}``
125+verify bool ``True``
126+headers.User-Agent str a random User-Agent
127+category str current category, like ``'general'``
128+safesearch int ``0``, between ``0`` and ``2`` (normal, moderate, strict)
129+time_range Optional[str] ``None``, can be ``day``, ``week``, ``month``, ``year``
130+pageno int current pagenumber
131+language str specific language code like ``'en_US'``, or ``'all'`` if unspecified
132+====================== ============== ========================================================================
133+
134+
135+If the ``engine_type`` is ``online_dictionnary```, in addition to the ``online`` arguments:
136+
107137====================== ============ ========================================================================
108138argument type default-value, information
109139====================== ============ ========================================================================
110−url string ``''``
111−method string ``'GET'``
112−headers set ``{}``
113−data set ``{}``
114−cookies set ``{}``
115−verify boolean ``True``
116−headers.User-Agent string a random User-Agent
117−category string current category, like ``'general'``
118−started datetime current date-time
119−pageno int current pagenumber
120−language string specific language code like ``'en_US'``, or ``'all'`` if unspecified
140+from_lang str specific language code like ``'en_US'``
141+to_lang str specific language code like ``'en_US'``
142+query str the text query without the languages
143+====================== ============ ========================================================================
144+
145+If the ``engine_type`` is ``online_currency```, in addition to the ``online`` arguments:
146+
121147====================== ============ ========================================================================
148+argument type default-value, information
149+====================== ============ ========================================================================
150+amount float the amount to convert
151+from str ISO 4217 code
152+to str ISO 4217 code
153+from_name str currency name
154+to_name str currency name
155+====================== ============ ========================================================================
156+
122157
123158parsed arguments
124159----------------
@@ -127,16 +162,20 @@ The function ``def request(query, params):`` always returns the ``params``
127162variable. Inside searx, the following paramters can be used to specify a search
128163request:
129164
130−============ =========== =========================================================
131−argument type information
132−============ =========== =========================================================
133−url string requested url
134−method string HTTP request method
135−headers set HTTP header information
136−data set HTTP data information (parsed if ``method != 'GET'``)
137−cookies set HTTP cookies
138−verify boolean Performing SSL-Validity check
139−============ =========== =========================================================
165+=================== =========== ==========================================================================
166+argument type information
167+=================== =========== ==========================================================================
168+url str requested url
169+method str HTTP request method
170+headers set HTTP header information
171+data set HTTP data information
172+cookies set HTTP cookies
173+verify bool Performing SSL-Validity check
174+follow_redirects bool Follow redirects
175+max_redirects int maximum redirects, hard limit
176+soft_max_redirects int maximum redirects, soft limit. Record an error but don't stop the engine
177+raise_for_httperror bool True by default: raise an exception if the HTTP code of response is >= 300
178+=================== =========== ==========================================================================
140179
141180
142181example code
@@ -255,7 +294,7 @@ latitude latitude of result (in decimal format)
255294longitude longitude of result (in decimal format)
256295boundingbox boundingbox of result (array of 4. values
257296 ``[lat-min, lat-max, lon-min, lon-max]``)
258−geojson geojson of result (http://geojson.org)
297+geojson geojson of result (https://geojson.org/)
259298osm.type type of osm-object (if OSM-Result)
260299osm.id id of osm-object (if OSM-Result)
261300address.name name of object
docs/dev/makefile.rst+127−130
@@ -1,69 +1,33 @@
11.. _makefile:
22
3−================
4−Makefile Targets
5−================
3+========
4+Makefile
5+========
66
77.. _gnu-make: https://www.gnu.org/software/make/manual/make.html#Introduction
88
99.. sidebar:: build environment
1010
11− Before looking deeper at the targets, first read about :ref:`makefile setup`
12− and :ref:`make pyenv`.
11+ Before looking deeper at the targets, first read about :ref:`make
12+ install`.
1313
1414 To install system requirements follow :ref:`buildhosts`.
1515
16−With the aim to simplify development cycles, started with :pull:`1756` a
17−``Makefile`` based boilerplate was added. If you are not familiar with
18−Makefiles, we recommend to read gnu-make_ introduction.
16+All relevant build tasks are implemented in :origin:`manage.sh` and for CI or
17+IDE integration a small ``Makefile`` wrapper is available. If you are not
18+familiar with Makefiles, we recommend to read gnu-make_ introduction.
1919
2020The usage is simple, just type ``make {target-name}`` to *build* a target.
21−Calling the ``help`` target gives a first overview::
22−
23− $ make help
24− test - run developer tests
25− docs - build documentation
26− docs-live - autobuild HTML documentation while editing
27− run - run developer instance
28− install - developer install (./local)
29− uninstall - uninstall (./local)
30− gh-pages - build docs & deploy on gh-pages branch
31− clean - drop builds and environments
32− ...
21+Calling the ``help`` target gives a first overview (``make help``):
22+
23+.. program-output:: bash -c "cd ..; make --no-print-directory help"
3324
3425.. contents:: Contents
3526 :depth: 2
3627 :local:
3728 :backlinks: entry
3829
39−
40−.. _makefile setup:
41−
42−Makefile setup
43−==============
44−
45−.. _git stash: https://git-scm.com/docs/git-stash
46−
47−The main setup is done in the :origin:`.config.sh` (read :ref:`toolboxing
48−setup`)::
49−
50− export SEARX_URL=https://searx.me
51−
52− export GIT_URL=https://github.com/asciimoo/searx
53− export DOCS_URL=https://asciimoo.github.io/searx
54−
55−.. sidebar:: fork & upstream
56−
57− Commit changes in your (local) branch, fork or whatever, but do not push them
58− upstream / `git stash`_ is your friend.
59−
60−:GIT_URL: Changes this, to point to your searx fork.
61−
62−:SEARX_URL: Changes this, to point to your searx instance.
63−
64−:DOCS_URL: If you host your own (branded) documentation, change this URL.
65−
66−.. _make pyenv:
30+.. _make install:
6731
6832Python environment
6933==================
@@ -72,31 +36,42 @@ Python environment
7236
7337 ``source ./local/py3/bin/activate``
7438
75−With Makefile we do no longer need to build up the virualenv manually (as
76−described in the :ref:`devquickstart` guide). Jump into your git working tree
77−and release a ``make pyenv``:
78−
79−.. code:: sh
39+We do no longer need to build up the virtualenv manually. Jump into your git
40+working tree and release a ``make install`` to get a virtualenv with a
41+*developer install* of searx (:origin:`setup.py`). ::
8042
8143 $ cd ~/searx-clone
82− $ make pyenv
83− PYENV usage: source ./local/py3/bin/activate
44+ $ make install
45+ PYENV [virtualenv] installing ./requirements*.txt into local/py3
8446 ...
47+ PYENV OK
48+ PYENV [install] pip install -e 'searx[test]'
49+ ...
50+ Successfully installed argparse-1.4.0 searx
51+ BUILDENV INFO:searx:load the default settings from ./searx/settings.yml
52+ BUILDENV INFO:searx:Initialisation done
53+ BUILDENV build utils/brand.env
8554
86−With target ``pyenv`` a development environment (aka virtualenv) was build up in
87−``./local/py3/``. To make a *developer install* of searx (:origin:`setup.py`)
88−into this environment, use make target ``install``:
89−
90−.. code:: sh
55+If you release ``make install`` multiple times the installation will only
56+rebuild if the sha256 sum of the *requirement files* fails. With other words:
57+the check fails if you edit the requirements listed in
58+:origin:`requirements-dev.txt` and :origin:`requirements.txt`). ::
9159
9260 $ make install
93− PYENV usage: source ./local/py3/bin/activate
94− PYENV using virtualenv from ./local/py3
95− PYENV install .
96−
97−You have never to think about intermediate targets like ``pyenv`` or
98−``install``, the ``Makefile`` chains them as requisites. Just run your main
99−target.
61+ PYENV OK
62+ PYENV [virtualenv] requirements.sha256 failed
63+ [virtualenv] - 6cea6eb6def9e14a18bf32f8a3e... ./requirements-dev.txt
64+ [virtualenv] - 471efef6c73558e391c3adb35f4... ./requirements.txt
65+ ...
66+ PYENV [virtualenv] installing ./requirements*.txt into local/py3
67+ ...
68+ PYENV OK
69+ PYENV [install] pip install -e 'searx[test]'
70+ ...
71+ Successfully installed argparse-1.4.0 searx
72+ BUILDENV INFO:searx:load the default settings from ./searx/settings.yml
73+ BUILDENV INFO:searx:Initialisation done
74+ BUILDENV build utils/brand.env
10075
10176.. sidebar:: drop environment
10277
@@ -104,10 +79,7 @@ target.
10479 <make clean>` first.
10580
10681If you think, something goes wrong with your ./local environment or you change
107−the :origin:`setup.py` file (or the requirements listed in
108−:origin:`requirements-dev.txt` and :origin:`requirements.txt`), you have to call
109−:ref:`make clean`.
110−
82+the :origin:`setup.py` file, you have to call :ref:`make clean`.
11183
11284.. _make run:
11385
@@ -117,88 +89,113 @@ the :origin:`setup.py` file (or the requirements listed in
11789To get up a running a developer instance simply call ``make run``. This enables
11890*debug* option in :origin:`searx/settings.yml`, starts a ``./searx/webapp.py``
11991instance, disables *debug* option again and opens the URL in your favorite WEB
120−browser (:man:`xdg-open`):
92+browser (:man:`xdg-open`)::
12193
122−.. code:: sh
123−
124− $ make run
125− PYENV usage: source ./local/py3/bin/activate
126− PYENV install .
127− ./local/py3/bin/python ./searx/webapp.py
128− ...
129− INFO:werkzeug: * Running on http://127.0.0.1:8888/ (Press CTRL+C to quit)
130− ...
94+ $ make run
95+ PYENV OK
96+ SEARX_DEBUG=1 ./manage.sh pyenv.cmd python ./searx/webapp.py
97+ ...
98+ INFO:werkzeug: * Running on http://127.0.0.1:8888/ (Press CTRL+C to quit)
13199
132100.. _make clean:
133101
134102``make clean``
135103==============
136104
137−Drop all intermediate files, all builds, but keep sources untouched. Includes
138−target ``pyclean`` which drops ./local environment. Before calling ``make
139−clean`` stop all processes using :ref:`make pyenv`.
140−
141−.. code:: sh
105+Drop all intermediate files, all builds, but keep sources untouched. Before
106+calling ``make clean`` stop all processes using :ref:`make install`. ::
142107
143108 $ make clean
144− CLEAN pyclean
145− CLEAN clean
109+ CLEAN pyenv
110+ PYENV [virtualenv] drop ./local/py3
111+ CLEAN docs -- ./build/docs ./dist/docs
112+ CLEAN locally installed npm dependencies
113+ CLEAN test stuff
114+ CLEAN common files
146115
147116.. _make docs:
148117
149−``make docs docs-live docs-clean``
150−==================================
118+``make docs docs.autobuild docs.clean``
119+=======================================
151120
152−We describe the usage of the ``doc*`` targets in the :ref:`How to contribute /
121+We describe the usage of the ``doc.*`` targets in the :ref:`How to contribute /
153122Documentation <contrib docs>` section. If you want to edit the documentation
154−read our :ref:`make docs-live` section. If you are working in your own brand,
155−adjust your :ref:`Makefile setup <makefile setup>`.
156−
123+read our :ref:`make docs.live` section. If you are working in your own brand,
124+adjust your :ref:`settings global`.
157125
158−.. _make gh-pages:
126+.. _make docs.gh-pages:
159127
160−``make gh-pages``
161−=================
128+``make docs.gh-pages``
129+======================
162130
163−To deploy on github.io first adjust your :ref:`Makefile setup <makefile
164−setup>`. For any further read :ref:`deploy on github.io`.
131+To deploy on github.io first adjust your :ref:`settings global`. For any
132+further read :ref:`deploy on github.io`.
165133
166134.. _make test:
167135
168136``make test``
169137=============
170138
171−Runs a series of tests: ``test.pep8``, ``test.unit``, ``test.robot`` and does
172−additional :ref:`pylint checks <make pylint>`. You can run tests selective,
173−e.g.:
174−
175−.. code:: sh
139+Runs a series of tests: :ref:`make test.pylint`, ``test.pep8``, ``test.unit``
140+and ``test.robot``. You can run tests selective, e.g.::
176141
177142 $ make test.pep8 test.unit test.sh
178− . ./local/py3/bin/activate; ./manage.sh pep8_check
179− [!] Running pep8 check
180− . ./local/py3/bin/activate; ./manage.sh unit_tests
181− [!] Running unit tests
143+ TEST test.pep8 OK
144+ ...
145+ TEST test.unit OK
146+ ...
147+ TEST test.sh OK
148+
149+.. _make test.sh:
150+
151+``make test.sh``
152+================
153+
154+:ref:`sh lint` / if you have changed some bash scripting run this test before
155+commit.
182156
183−.. _make pylint:
157+.. _make test.pylint:
184158
185−``make pylint``
186−===============
159+``make test.pylint``
160+====================
187161
188162.. _Pylint: https://www.pylint.org/
189163
190−Before commiting its recommend to do some (more) linting. Pylint_ is known as
191−one of the best source-code, bug and quality checker for the Python programming
192−language. Pylint_ is not yet a quality gate within our searx project (like
193−:ref:`test.pep8 <make test>` it is), but Pylint_ can help to improve code
194−quality anyway. The pylint profile we use at searx project is found in
195−project's root folder :origin:`.pylintrc`.
164+Pylint_ is known as one of the best source-code, bug and quality checker for the
165+Python programming language. The pylint profile we use at searx project is
166+found in project's root folder :origin:`.pylintrc`.
196167
197−Code quality is a ongoing process. Don't try to fix all messages from Pylint,
198−run Pylint and check if your changed lines are bringing up new messages. If so,
199−fix it. By this, code quality gets incremental better and if there comes the
200−day, the linting is balanced out, we might decide to add Pylint as a quality
201−gate.
168+.. _make search.checker:
169+
170+``search.checker.{engine name}``
171+================================
172+
173+To check all engines::
174+
175+ make search.checker
176+
177+To check a engine with whitespace in the name like *google news* replace space
178+by underline::
179+
180+ make search.checker.google_news
181+
182+To see HTTP requests and more use SEARX_DEBUG::
183+
184+ make SEARX_DEBUG=1 search.checker.google_news
185+
186+.. _3xx: https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#3xx_redirection
187+
188+To filter out HTTP redirects (3xx_)::
189+
190+ make SEARX_DEBUG=1 search.checker.google_news | grep -A1 "HTTP/1.1\" 3[0-9][0-9]"
191+ ...
192+ Engine google news Checking
193+ 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
194+ https://news.google.com:443 "GET /search?q=life&hl=en-US&lr=lang_en&ie=utf8&oe=utf8&ceid=US:en&gl=US HTTP/1.1" 200 None
195+ --
196+ https://news.google.com:443 "GET /search?q=computer&hl=en&lr=lang_en&ie=utf8&oe=utf8&ceid=US%3Aen&gl=US HTTP/1.1" 302 0
197+ https://news.google.com:443 "GET /search?q=computer&hl=en-US&lr=lang_en&ie=utf8&oe=utf8&ceid=US:en&gl=US HTTP/1.1" 200 None
198+ --
202199
203200
204201``make pybuild``
@@ -207,9 +204,7 @@ gate.
207204.. _PyPi: https://pypi.org/
208205.. _twine: https://twine.readthedocs.io/en/latest/
209206
210−Build Python packages in ``./dist/py``.
211−
212−.. code:: sh
207+Build Python packages in ``./dist/py``::
213208
214209 $ make pybuild
215210 ...
@@ -217,9 +212,11 @@ Build Python packages in ``./dist/py``.
217212 running sdist
218213 running egg_info
219214 ...
220− $ ls ./dist/py/
221− searx-0.15.0-py3-none-any.whl searx-0.15.0.tar.gz
215+ running bdist_wheel
216+
217+ $ ls ./dist
218+ searx-0.18.0-py3-none-any.whl searx-0.18.0.tar.gz
222219
223−To upload packages to PyPi_, there is also a ``upload-pypi`` target. It needs
224−twine_ to be installed. Since you are not the owner of :pypi:`searx` you will
225−never need the latter.
220+To upload packages to PyPi_, there is also a ``pypi.upload`` target (to test use
221+``pypi.upload.test``). Since you are not the owner of :pypi:`searx` you will
222+never need to upload.
docs/dev/plugins.rst+15
@@ -30,6 +30,21 @@ Example plugin
3030 ctx['search'].suggestions.add('example')
3131 return True
3232
33+External plugins
34+================
35+
36+External plugins are standard python modules implementing all the requirements of the standard plugins.
37+Plugins can be enabled by adding them to :ref:`settings.yml`'s ``plugins`` section.
38+Example external plugin can be found `here <https://github.com/asciimoo/searx_external_plugin_example>`_.
39+
40+Register your plugin
41+====================
42+
43+To enable your plugin register your plugin in
44+searx > plugin > __init__.py.
45+And at the bottom of the file add your plugin like.
46+``plugins.register(name_of_python_file)``
47+
3348Plugin entry points
3449===================
3550
docs/dev/quickstart.rst+26−103
@@ -4,129 +4,52 @@
44Development Quickstart
55======================
66
7−.. sidebar:: :ref:`makefile`
7+.. _npm: https://www.npmjs.com/
88
9− For additional developer purpose there are :ref:`makefile`.
10−
11−This quickstart guide gets your environment set up with searx. Furthermore, it
12−gives a short introduction to the ``manage.sh`` script.
13−
14−How to setup your development environment
15−=========================================
16−
17−.. sidebar:: :ref:`make pyenv <make pyenv>`
18−
19− Alternatively use the :ref:`make pyenv`.
20−
21−First, clone the source code of searx to the desired folder. In this case the
22−source is cloned to ``~/myprojects/searx``. Then create and activate the
23−searx-ve virtualenv and install the required packages using ``manage.sh``.
24−
25−.. code:: sh
26−
27− cd ~/myprojects
28− git clone https://github.com/asciimoo/searx.git
29− cd searx
30− virtualenv searx-ve
31− . ./searx-ve/bin/activate
32− ./manage.sh update_dev_packages
33−
34−
35−How to run tests
36−================
37−
38−.. sidebar:: :ref:`make test.unit <make test>`
39−
40− Alternatively use the ``test.pep8``, ``test.unit``, ``test.robot`` targets.
41−
42−Tests can be run using the ``manage.sh`` script. Following tests and checks are
43−available:
44−
45−- Unit tests
46−- Selenium tests
47−- PEP8 validation
48−- Unit test coverage check
49−
50−For example unit tests are run with the command below:
51−
52−.. code:: sh
53−
54− ./manage.sh unit_tests
55−
56−For further test options, please consult the help of the ``manage.sh`` script or
57−read :ref:`make test`.
58−
59−
60−How to compile styles and javascript
61−====================================
62−
63−.. _less: http://lesscss.org/
64−.. _NodeJS: https://nodejs.org
65−
66−How to build styles
67−-------------------
68−
69−Less_ is required to build the styles of searx. Less_ can be installed using
70−either NodeJS_ or Apt.
9+Searx loves developers, just clone and start hacking. All the rest is done for
10+you simply by using :ref:`make <makefile>`.
7111
7212.. code:: sh
7313
74− sudo -H apt-get install nodejs
75− sudo -H npm install -g less
14+ git clone https://github.com/searx/searx.git
7615
77−OR
16+Here is how a minimal workflow looks like:
7817
79−.. code:: sh
18+1. *start* hacking
19+2. *run* your code: :ref:`make run`
20+3. *test* your code: :ref:`make test`
8021
81− sudo -H apt-get install node-less
22+If you think at some point something fails, go back to *start*. Otherwise,
23+choose a meaningful commit message and we are happy to receive your pull
24+request. To not end in *wild west* we have some directives, please pay attention
25+to our ":ref:`how to contribute`" guideline.
8226
83−After satisfying the requirements styles can be build using ``manage.sh``
27+If you implement themes, you will need to compile styles and JavaScript before
28+*run*.
8429
8530.. code:: sh
8631
87− ./manage.sh styles
88−
89−
90−How to build the source of the oscar theme
91−==========================================
92−
93−.. _grunt: https://gruntjs.com/
32+ make themes
9433
95−Grunt_ must be installed in order to build the javascript sources. It depends on
96−NodeJS, so first Node has to be installed.
34+Don't forget to install npm_ first.
9735
98−.. code:: sh
99−
100− sudo -H apt-get install nodejs
101− sudo -H npm install -g grunt-cli
36+.. tabs::
10237
103−After installing grunt, the files can be built using the following command:
104−
105−.. code:: sh
38+ .. group-tab:: Ubuntu / debian
10639
107− ./manage.sh grunt_build
40+ .. code:: sh
10841
42+ sudo -H apt-get install npm
10943
110−Tips for debugging/development
111−==============================
44+ .. group-tab:: Arch Linux
11245
113−.. sidebar:: :ref:`make run`
46+ .. code-block:: sh
11447
115− Makefile target ``run`` already enables debug option for your developer
116− session / see :ref:`make run`.
48+ sudo -H pacman -S npm
11749
118−Turn on debug logging
119− Whether you are working on a new engine or trying to eliminate a bug, it is
120− always a good idea to turn on debug logging. When debug logging is enabled a
121− stack trace appears, instead of the cryptic ``Internal Server Error``
122− message. It can be turned on by setting ``debug: False`` to ``debug: True`` in
123− :origin:`settings.yml <searx/settings.yml>`.
50+ .. group-tab:: Fedora / RHEL
12451
125−.. sidebar:: :ref:`make test`
52+ .. code-block:: sh
12653
127− Alternatively use the :ref:`make test` targets.
54+ sudo -H dnf install npm
12855
129−Run ``./manage.sh tests`` before creating a PR.
130− Failing build on Travis is common because of PEP8 checks. So a new commit
131− must be created containing these format fixes. This phase can be skipped if
132− ``./manage.sh tests`` is run locally before creating a PR.
docs/dev/reST.rst+35−26
@@ -15,8 +15,8 @@ generated and deployed at :docs:`github.io <.>`. For build prerequisites read
1515:ref:`docs build`.
1616
1717The source files of Searx's documentation are located at :origin:`docs`. Sphinx
18−assumes source files to be encoded in UTF-8 by defaul. Run :ref:`make docs-live
19−<make docs-live>` to build HTML while editing.
18+assumes source files to be encoded in UTF-8 by defaul. Run :ref:`make docs.live
19+<make docs.live>` to build HTML while editing.
2020
2121.. sidebar:: Further reading
2222
@@ -319,14 +319,18 @@ To list all anchors of the inventory (e.g. ``python``) use:
319319.. code:: sh
320320
321321 $ python -m sphinx.ext.intersphinx https://docs.python.org/3/objects.inv
322+ ...
323+ $ python -m sphinx.ext.intersphinx https://searx.github.io/searx/objects.inv
324+ ...
322325
323326Literal blocks
324327==============
325328
326329The simplest form of :duref:`literal-blocks` is a indented block introduced by
327330two colons (``::``). For highlighting use :dudir:`highlight` or :ref:`reST
328−code` directive. To include literals from external files use directive
329−:rst:dir:`literalinclude`.
331+code` directive. To include literals from external files use
332+:rst:dir:`literalinclude` or :ref:`kernel-include <kernel-include-directive>`
333+directive (latter one expands environment variables in the path name).
330334
331335.. _reST literal:
332336
@@ -1272,28 +1276,33 @@ Templating
12721276
12731277.. sidebar:: Build environment
12741278
1275− All *generic-doc* tasks are running in the :ref:`build environment <make
1276− pyenv>`.
1279+ All *generic-doc* tasks are running in the :ref:`make install`.
12771280
12781281Templating is suitable for documentation which is created generic at the build
1279−time. The sphinx-jinja_ extension evaluates jinja_ templates in the :ref:`build
1280−environment <make pyenv>` (with searx modules installed). We use this e.g. to
1281−build chapter: :ref:`engines generic`. Below the jinja directive from the
1282+time. The sphinx-jinja_ extension evaluates jinja_ templates in the :ref:`make
1283+install` (with searx modules installed). We use this e.g. to build chapter:
1284+:ref:`engines generic`. Below the jinja directive from the
12821285:origin:`docs/admin/engines.rst` is shown:
12831286
12841287.. literalinclude:: ../admin/engines.rst
12851288 :language: reST
12861289 :start-after: .. _configured engines:
12871290
1288−The context for the template is selected in the line ``.. jinja:: webapp``. In
1289−sphinx's build configuration (:origin:`docs/conf.py`) the ``webapp`` context
1290−points to the name space of the python module: ``webapp``.
1291+The context for the template is selected in the line ``.. jinja:: searx``. In
1292+sphinx's build configuration (:origin:`docs/conf.py`) the ``searx`` context
1293+contains the ``engines`` and ``plugins``.
12911294
12921295.. code:: py
12931296
1294− from searx import webapp
1297+ import searx.search
1298+ import searx.engines
1299+ import searx.plugins
1300+ searx.search.initialize()
12951301 jinja_contexts = {
1296− 'webapp': dict(**webapp.__dict__)
1302+ 'searx': {
1303+ 'engines': searx.engines.engines,
1304+ 'plugins': searx.plugins.plugins
1305+ },
12971306 }
12981307
12991308
@@ -1390,27 +1399,27 @@ The next example shows the difference of ``\tfrac`` (*textstyle*) and ``\dfrac``
13901399
13911400.. _readability: https://docs.python-guide.org/writing/style/
13921401.. _Sphinx-Primer:
1393− http://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html
1402+ https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html
13941403.. _reST: https://docutils.sourceforge.io/rst.html
13951404.. _Sphinx Roles:
13961405 https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html
1397−.. _Sphinx: http://www.sphinx-doc.org
1398−.. _`sphinx-doc FAQ`: http://www.sphinx-doc.org/en/stable/faq.html
1406+.. _Sphinx: https://www.sphinx-doc.org
1407+.. _`sphinx-doc FAQ`: https://www.sphinx-doc.org/en/stable/faq.html
13991408.. _Sphinx markup constructs:
1400− http://www.sphinx-doc.org/en/stable/markup/index.html
1409+ https://www.sphinx-doc.org/en/stable/markup/index.html
14011410.. _`sphinx cross references`:
1402− http://www.sphinx-doc.org/en/stable/markup/inline.html#cross-referencing-arbitrary-locations
1411+ https://www.sphinx-doc.org/en/stable/markup/inline.html#cross-referencing-arbitrary-locations
14031412.. _sphinx.ext.extlinks:
14041413 https://www.sphinx-doc.org/en/master/usage/extensions/extlinks.html
1405−.. _intersphinx: http://www.sphinx-doc.org/en/stable/ext/intersphinx.html
1406−.. _sphinx config: http://www.sphinx-doc.org/en/stable/config.html
1407−.. _Sphinx's autodoc: http://www.sphinx-doc.org/en/stable/ext/autodoc.html
1414+.. _intersphinx: https://www.sphinx-doc.org/en/stable/ext/intersphinx.html
1415+.. _sphinx config: https://www.sphinx-doc.org/en/stable/config.html
1416+.. _Sphinx's autodoc: https://www.sphinx-doc.org/en/stable/ext/autodoc.html
14081417.. _Sphinx's Python domain:
1409− http://www.sphinx-doc.org/en/stable/domains.html#the-python-domain
1418+ https://www.sphinx-doc.org/en/stable/domains.html#the-python-domain
14101419.. _Sphinx's C domain:
1411− http://www.sphinx-doc.org/en/stable/domains.html#cross-referencing-c-constructs
1420+ https://www.sphinx-doc.org/en/stable/domains.html#cross-referencing-c-constructs
14121421.. _doctree:
1413− http://www.sphinx-doc.org/en/master/extdev/tutorial.html?highlight=doctree#build-phases
1422+ https://www.sphinx-doc.org/en/master/extdev/tutorial.html?highlight=doctree#build-phases
14141423.. _docutils: http://docutils.sourceforge.net/docs/index.html
14151424.. _docutils FAQ: http://docutils.sourceforge.net/FAQ.html
14161425.. _linuxdoc: https://return42.github.io/linuxdoc
@@ -1423,5 +1432,5 @@ The next example shows the difference of ``\tfrac`` (*textstyle*) and ``\dfrac``
14231432.. _ImageMagick: https://www.imagemagick.org
14241433
14251434.. _`Emacs Table Mode`: https://www.emacswiki.org/emacs/TableMode
1426−.. _`Online Tables Generator`: http://www.tablesgenerator.com/text_tables
1435+.. _`Online Tables Generator`: https://www.tablesgenerator.com/text_tables
14271436.. _`OASIS XML Exchange Table Model`: https://www.oasis-open.org/specs/tm9901.html
docs/dev/search_api.rst+4−4
@@ -6,7 +6,7 @@ Search API
66
77The search supports both ``GET`` and ``POST``.
88
9−Furthermore, two enpoints ``/`` and ``/search`` are available for querying.
9+Furthermore, two endpoints ``/`` and ``/search`` are available for querying.
1010
1111
1212``GET /``
@@ -76,12 +76,12 @@ Parameters
7676 supports safe search in the preferences page of an instance.
7777
7878``theme`` : default ``oscar``
79− [ ``oscar``, ``simple``, ``legacy``, ``pix-art``, ``courgette`` ]
79+ [ ``oscar``, ``simple`` ]
8080
8181 Theme of instance.
8282
8383 Please note, available themes depend on an instance. It is possible that an
84− instance administrator deleted, created or renamed themes on his/her instance.
84+ instance administrator deleted, created or renamed themes on their instance.
8585 See the available options in the preferences page of the instance.
8686
8787``oscar-style`` : default ``logicodev``
@@ -91,7 +91,7 @@ Parameters
9191 ``oscar``.
9292
9393 Please note, available styles depend on an instance. It is possible that an
94− instance administrator deleted, created or renamed styles on his/her
94+ instance administrator deleted, created or renamed styles on their
9595 instance. See the available options in the preferences page of the instance.
9696
9797``enabled_plugins`` : optional
docs/index.rst+1
@@ -30,6 +30,7 @@ anyone, you can set up your own, see :ref:`installation`.
3030 user/index
3131 admin/index
3232 dev/index
33+ searx_extra/index
3334 utils/index
3435 blog/index
3536
docs/searx_extra/index.rstnew file+14
@@ -0,0 +1,14 @@
1+.. _searx_extra:
2+
3+======================================================
4+Tooling box ``searx_extra`` for developers and users
5+======================================================
6+
7+In the folder :origin:`searx_extra/` we maintain some tools useful for
8+developers and users.
9+
10+.. toctree::
11+ :maxdepth: 2
12+ :caption: Contents
13+
14+ standalone_searx.py
docs/searx_extra/standalone_searx.py.rstnew file+9
@@ -0,0 +1,9 @@
1+
2+.. _standalone_searx.py:
3+
4+===================================
5+``searx_extra/standalone_searx.py``
6+===================================
7+
8+.. automodule:: searx_extra.standalone_searx
9+ :members:
docs/user/own-instance.rst+5−5
@@ -44,9 +44,9 @@ hidden from visited result pages.
4444What are the consequences of using public instances?
4545----------------------------------------------------
4646
47−If someone uses a public instance, he/she has to trust the administrator of that
47+If someone uses a public instance, they have to trust the administrator of that
4848instance. This means that the user of the public instance does not know whether
49−his/her requests are logged, aggregated and sent or sold to a third party.
49+their requests are logged, aggregated and sent or sold to a third party.
5050
5151Also, public instances without proper protection are more vulnerable to abusing
5252the search service, In this case the external service in exchange returns
@@ -56,9 +56,9 @@ results.
5656I see. What about private instances?
5757------------------------------------
5858
59−If users run their own instances, everything is in their control: the source
60−code, logging settings and private data. Unknown instance administrators do not
61−have to be trusted.
59+If users run their :ref:`own instances <installation>`, everything is in their
60+control: the source code, logging settings and private data. Unknown instance
61+administrators do not have to be trusted.
6262
6363Furthermore, as the default settings of their instance is editable, there is no
6464need to use cookies to tailor searx to their needs. So preferences will not be
docs/user/search_syntax.rst+24
@@ -40,3 +40,27 @@ Image search:
4040Custom language in wikipedia:
4141
4242- :search:`:hu !wp hackerspace <?q=%3Ahu%20%21wp%20hackerspace>`
43+
44+Multilingual Search
45+===================
46+
47+Searx does not support true multilingual search.
48+You have to use the language prefix in your search query when searching in a different language.
49+
50+But there is a workaround:
51+By adding a new search engine with a different language, Searx will search in your default and other language.
52+
53+Example configuration in settings.yml for a German and English speaker:
54+ .. code-block:: yaml
55+
56+ search:
57+ language : "de"
58+ ...
59+
60+ engines:
61+ - name : google english
62+ engine : google
63+ language : english
64+ ...
65+
66+When searching, the default google engine will return German results and "google english" will return English results.
docs/utils/filtron.sh.rst+25−21
@@ -7,9 +7,10 @@
77
88.. sidebar:: further reading
99
10− - :ref:`installation`
1110 - :ref:`searx filtron`
1211 - :ref:`architecture`
12+ - :ref:`installation` (:ref:`nginx <installation nginx>` & :ref:`apache
13+ <installation apache>`)
1314
1415.. _Go: https://golang.org/
1516.. _filtron: https://github.com/asciimoo/filtron
@@ -27,8 +28,8 @@ The script adds a ``${SERVICE_USER}`` (default:``filtron``) and installs filtron
2728into this user account:
2829
2930#. Create a separated user account (``filtron``).
30−#. Download and install Go_ binary in users $HOME (``~filtron``).
31−#. Install filtron with the package management of Go_ (``go get -v -u
31+#. Download and install Go_ binary in user's $HOME (``~filtron``).
32+#. Install filtron with the package management from Go_ (``go get -v -u
3233 github.com/asciimoo/filtron``)
3334#. Setup a proper rule configuration :origin:`[ref]
3435 <utils/templates/etc/filtron/rules.json>` (``/etc/filtron/rules.json``).
@@ -36,33 +37,37 @@ into this user account:
3637 <utils/templates/lib/systemd/system/filtron.service>`
3738 (``/lib/systemd/system/filtron.service``).
3839
39−.. _reverse proxy:
4040
41−Public Reverse Proxy
42−====================
43−
44−To install searx in your public HTTP server use:
41+Create user
42+===========
4543
46−.. code:: bash
44+.. kernel-include:: $DOCS_BUILD/includes/filtron.rst
45+ :start-after: START create user
46+ :end-before: END create user
4747
48− sudo -H ./utils/filtron.sh apache install
4948
50−.. tabs::
49+Install go
50+==========
5151
52− .. group-tab:: apache
52+.. kernel-include:: $DOCS_BUILD/includes/filtron.rst
53+ :start-after: START install go
54+ :end-before: END install go
5355
54− .. literalinclude:: ../../utils/templates/etc/apache2/sites-available/searx.conf:filtron
55− :language: apache
5656
57− .. tabs::
57+Install filtron
58+===============
5859
59− .. group-tab:: Ubuntu / debian
60+Install :origin:`rules.json <utils/templates/etc/filtron/rules.json>` at
61+``/etc/filtron/rules.json`` (see :ref:`Sample configuration of filtron`) and
62+install filtron software and systemd unit:
6063
61− .. code-block:: sh
64+.. kernel-include:: $DOCS_BUILD/includes/filtron.rst
65+ :start-after: START install filtron
66+ :end-before: END install filtron
6267
63− $ sudo -H a2enmod headers
64− $ sudo -H a2enmod proxy
65− $ sudo -H a2enmod proxy_http
68+.. kernel-include:: $DOCS_BUILD/includes/filtron.rst
69+ :start-after: START install systemd unit
70+ :end-before: END install systemd unit
6671
6772.. _filtron.sh overview:
6873
@@ -73,4 +78,3 @@ The ``--help`` output of the script is largely self-explanatory
7378(:ref:`toolboxing common`):
7479
7580.. program-output:: ../utils/filtron.sh --help
76−
docs/utils/index.rst+19−11
@@ -1,12 +1,11 @@
11.. _searx_utils:
22.. _toolboxing:
33
4−=======================
5−Tooling box ``utils/*``
6−=======================
4+===================
5+Admin's tooling box
6+===================
77
8−In the folder :origin:`utils/` we maintain some tools useful for admins and
9−developers.
8+In the folder :origin:`utils/` we maintain some tools useful for administrators.
109
1110.. toctree::
1211 :maxdepth: 2
@@ -15,30 +14,39 @@ developers.
1514 searx.sh
1615 filtron.sh
1716 morty.sh
17+ lxc.sh
1818
1919.. _toolboxing common:
2020
21−Common commands
22−===============
21+Common commands & environment
22+=============================
2323
2424Scripts to maintain services often dispose of common commands and environments.
2525
26−``shell``:
26+``shell`` : command
2727 Opens a shell from the service user ``${SERVICE_USSR}``, very helpful for
2828 troubleshooting.
2929
30−``inspect service``:
30+``inspect service`` : command
3131 Shows status and log of the service, most often you have a option to enable
3232 more verbose debug logs. Very helpful for debugging, but be careful not to
3333 enable debugging in a production environment!
3434
35+``FORCE_TIMEOUT`` : environment
36+ Sets timeout for interactive prompts. If you want to run a script in batch
37+ job, with defaults choices, set ``FORCE_TIMEOUT=0``. By example; to install a
38+ reverse proxy for filtron on all containers of the :ref:`searx suite
39+ <lxc-searx.env>` use ::
40+
41+ sudo -H ./utils/lxc.sh cmd -- FORCE_TIMEOUT=0 ./utils/filtron.sh apache install
42+
3543.. _toolboxing setup:
3644
3745Tooling box setup
3846=================
3947
40−The main setup is done in the :origin:`.config.sh` (read also :ref:`makefile
41−setup`).
48+The main setup is done in the :origin:`.config.sh` (read also :ref:`settings
49+global`).
4250
4351.. literalinclude:: ../../.config.sh
4452 :language: bash
docs/utils/lxc.sh.rstnew file+149
@@ -0,0 +1,149 @@
1+
2+.. _snap: https://snapcraft.io
3+.. _snapcraft LXD: https://snapcraft.io/lxd
4+.. _LXC/LXD Image Server: https://uk.images.linuxcontainers.org/
5+.. _LXC: https://linuxcontainers.org/lxc/introduction/
6+.. _LXD: https://linuxcontainers.org/lxd/introduction/
7+.. _`LXD@github`: https://github.com/lxc/lxd
8+
9+.. _archlinux: https://www.archlinux.org/
10+
11+.. _lxc.sh:
12+
13+================
14+``utils/lxc.sh``
15+================
16+
17+.. sidebar:: further reading
18+
19+ - snap_, `snapcraft LXD`_
20+ - LXC_, LXD_
21+ - `LXC/LXD Image Server`_
22+ - `LXD@github`_
23+
24+With the use of *Linux Containers* (LXC_) we can scale our tasks over a stack of
25+containers, what we call the: *lxc suite*. The *searx suite*
26+(:origin:`lxc-searx.env <utils/lxc-searx.env>`) is loaded by default, every time
27+you start the ``lxc.sh`` script (*you do not need to care about*).
28+
29+Before you can start with containers, you need to install and initiate LXD_
30+once::
31+
32+ $ snap install lxd
33+ $ lxd init --auto
34+
35+To make use of the containers from the *searx suite*, you have to build the
36+:ref:`LXC suite containers <lxc.sh help>` initial. But be warned, **this might
37+take some time**::
38+
39+ $ sudo -H ./utils/lxc.sh build
40+
41+A cup of coffee later, your LXC suite is build up and you can run whatever task
42+you want / in a selected or even in all :ref:`LXC suite containers <lxc.sh
43+help>`. If you do not want to build all containers, **you can build just
44+one**::
45+
46+ $ sudo -H ./utils/lxc.sh build searx-ubu1804
47+
48+*Good to know ...*
49+
50+Each container shares the root folder of the repository and the command
51+``utils/lxc.sh cmd`` **handles relative path names transparent**, compare output
52+of::
53+
54+ $ sudo -H ./utils/lxc.sh cmd -- ls -la Makefile
55+ ...
56+
57+In the containers, you can run what ever you want, e.g. to start a bash use::
58+
59+ $ sudo -H ./utils/lxc.sh cmd searx-ubu1804 bash
60+ INFO: [searx-ubu1804] bash
61+ root@searx-ubu1804:/share/searx#
62+
63+If there comes the time you want to **get rid off all** the containers and
64+**clean up local images** just type::
65+
66+ $ sudo -H ./utils/lxc.sh remove
67+ $ sudo -H ./utils/lxc.sh remove images
68+
69+.. _lxc.sh install suite:
70+
71+Install suite
72+=============
73+
74+To install the complete :ref:`searx suite (includes searx, morty & filtron)
75+<lxc-searx.env>` into all LXC_ use::
76+
77+ $ sudo -H ./utils/lxc.sh install suite
78+
79+The command above installs a searx suite (see :ref:`installation scripts`). To
80+get the IP (URL) of the filtron service in the containers use ``show suite``
81+command. To test instances from containers just open the URLs in your
82+WEB-Browser::
83+
84+ $ sudo ./utils/lxc.sh show suite | grep filtron
85+ [searx-ubu1604] INFO: (eth0) filtron: http://n.n.n.246:4004/ http://n.n.n.246/searx
86+ [searx-ubu1804] INFO: (eth0) filtron: http://n.n.n.147:4004/ http://n.n.n.147/searx
87+ [searx-ubu1910] INFO: (eth0) filtron: http://n.n.n.140:4004/ http://n.n.n.140/searx
88+ [searx-ubu2004] INFO: (eth0) filtron: http://n.n.n.18:4004/ http://n.n.n.18/searx
89+ [searx-fedora31] INFO: (eth0) filtron: http://n.n.n.46:4004/ http://n.n.n.46/searx
90+ [searx-archlinux] INFO: (eth0) filtron: http://n.n.n.32:4004/ http://n.n.n.32/searx
91+
92+To :ref:`install a nginx <installation nginx>` reverse proxy for filtron and
93+morty use (or alternatively use :ref:`apache <installation apache>`)::
94+
95+ sudo -H ./utils/lxc.sh cmd -- FORCE_TIMEOUT=0 ./utils/filtron.sh nginx install
96+ sudo -H ./utils/lxc.sh cmd -- FORCE_TIMEOUT=0 ./utils/morty.sh nginx install
97+
98+
99+Running commands
100+================
101+
102+**Inside containers, you can use make or run scripts** from the
103+:ref:`toolboxing`. By example: to setup a :ref:`buildhosts` and run the
104+Makefile target ``test`` in the archlinux_ container::
105+
106+ sudo -H ./utils/lxc.sh cmd searx-archlinux ./utils/searx.sh install buildhost
107+ sudo -H ./utils/lxc.sh cmd searx-archlinux make test
108+
109+
110+Setup searx buildhost
111+=====================
112+
113+You can **install the searx buildhost environment** into one or all containers.
114+The installation procedure to set up a :ref:`build host<buildhosts>` takes its
115+time. Installation in all containers will take more time (time for another cup
116+of coffee).::
117+
118+ sudo -H ./utils/lxc.sh cmd -- ./utils/searx.sh install buildhost
119+
120+To build (live) documentation inside a archlinux_ container::
121+
122+ sudo -H ./utils/lxc.sh cmd searx-archlinux make docs.clean docs.live
123+ ...
124+ [I 200331 15:00:42 server:296] Serving on http://0.0.0.0:8080
125+
126+To get IP of the container and the port number *live docs* is listening::
127+
128+ $ sudo ./utils/lxc.sh show suite | grep docs.live
129+ ...
130+ [searx-archlinux] INFO: (eth0) docs.live: http://n.n.n.12:8080/
131+
132+
133+.. _lxc.sh help:
134+
135+Overview
136+========
137+
138+The ``--help`` output of the script is largely self-explanatory:
139+
140+.. program-output:: ../utils/lxc.sh --help
141+
142+
143+.. _lxc-searx.env:
144+
145+searx suite
146+===========
147+
148+.. literalinclude:: ../../utils/lxc-searx.env
149+ :language: bash
docs/utils/morty.sh.rst+43−2
@@ -1,6 +1,7 @@
11
22.. _morty: https://github.com/asciimoo/morty
33.. _morty's README: https://github.com/asciimoo/morty
4+.. _Go: https://golang.org/
45
56.. _morty.sh:
67
@@ -10,8 +11,10 @@
1011
1112.. sidebar:: further reading
1213
13− - :ref:`installation`
1414 - :ref:`architecture`
15+ - :ref:`installation` (:ref:`nginx <installation nginx>` & :ref:`apache
16+ <installation apache>`)
17+ - :ref:`searx morty`
1518
1619To simplify installation and maintenance of a morty_ instance you can use the
1720script :origin:`utils/morty.sh`. In most cases you will install morty_ simply by
@@ -22,12 +25,50 @@ running the command:
2225 sudo -H ./utils/morty.sh install all
2326
2427The script adds a ``${SERVICE_USER}`` (default:``morty``) and installs morty_
25−into this user account.
28+into this user account:
29+
30+#. Create a separated user account (``morty``).
31+#. Download and install Go_ binary in user's $HOME (``~morty``).
32+#. Install morty_ with the package management from Go_ (``go get -v -u
33+ github.com/asciimoo/morty``)
34+#. Setup a systemd service unit :origin:`[ref]
35+ <utils/templates/lib/systemd/system/morty.service>`
36+ (``/lib/systemd/system/morty.service``).
2637
2738.. hint::
2839
2940 To add morty to your searx instance read chapter :ref:`searx morty`.
3041
42+Create user
43+===========
44+
45+.. kernel-include:: $DOCS_BUILD/includes/morty.rst
46+ :start-after: START create user
47+ :end-before: END create user
48+
49+
50+Install go
51+==========
52+
53+.. kernel-include:: $DOCS_BUILD/includes/morty.rst
54+ :start-after: START install go
55+ :end-before: END install go
56+
57+
58+Install morty
59+=============
60+
61+Install morty software and systemd unit:
62+
63+.. kernel-include:: $DOCS_BUILD/includes/morty.rst
64+ :start-after: START install morty
65+ :end-before: END install morty
66+
67+.. kernel-include:: $DOCS_BUILD/includes/morty.rst
68+ :start-after: START install systemd unit
69+ :end-before: END install systemd unit
70+
71+.. _morty.sh overview:
3172
3273Overview
3374========
docs/utils/searx.sh.rst+3−37
@@ -7,9 +7,10 @@
77
88.. sidebar:: further reading
99
10− - :ref:`installation`
1110 - :ref:`architecture`
12− - :ref:`filtron.sh`
11+ - :ref:`installation`
12+ - :ref:`installation nginx`
13+ - :ref:`installation apache`
1314
1415To simplify installation and maintenance of a searx instance you can use the
1516script :origin:`utils/searx.sh`.
@@ -29,41 +30,6 @@ into this user account. The installation is described in chapter
2930
3031.. _intranet reverse proxy:
3132
32−Intranet Reverse Proxy
33−======================
34−
35−To install searx in your intranet HTTP server use:
36−
37−.. code:: bash
38−
39− sudo -H ./utils/searx.sh apache install
40−
41−.. warning::
42−
43− This setup is **not** suitable **for public instances**, go on with
44− :ref:`reverse proxy`!
45−
46−.. tabs::
47−
48− .. group-tab:: apache
49−
50− .. literalinclude:: ../../utils/templates/etc/apache2/sites-available/searx.conf:uwsgi
51− :language: apache
52−
53− .. tabs::
54−
55− .. group-tab:: Ubuntu / debian
56−
57− .. code-block:: sh
58−
59− $ sudo -H apt install libapache2-mod-uwsgi
60−
61− .. group-tab:: Arch Linux
62−
63− .. code-block:: sh
64−
65− $ sudo pacman -S uwsgi
66−
6733Overview
6834========
6935
managenew file+504
@@ -0,0 +1,504 @@
1+#!/usr/bin/env bash
2+# -*- coding: utf-8; mode: sh indent-tabs-mode: nil -*-
3+# SPDX-License-Identifier: AGPL-3.0-or-later
4+# shellcheck disable=SC2031
5+
6+# shellcheck source=utils/lib.sh
7+source "$(dirname "${BASH_SOURCE[0]}")/utils/lib.sh"
8+# shellcheck source=utils/brand.env
9+source "${REPO_ROOT}/utils/brand.env"
10+source_dot_config
11+
12+# config
13+
14+PY_SETUP_EXTRAS='[test]'
15+NPM_PACKAGES="less@2.7 less-plugin-clean-css grunt-cli"
16+GECKODRIVER_VERSION="v0.30.0"
17+# SPHINXOPTS=
18+
19+# These py files are linted by test.pylint(), all other files are linted by
20+# test.pep8()
21+PYLINT_FILES=(
22+ searx/preferences.py
23+ searx/testing.py
24+ searx/engines/gigablast.py
25+ searx/engines/deviantart.py
26+ searx/engines/digg.py
27+ searx/engines/google.py
28+ searx/engines/google_news.py
29+ searx/engines/google_videos.py
30+ searx/engines/google_images.py
31+ searx/engines/mediathekviewweb.py
32+ searx/engines/meilisearch.py
33+ searx/engines/solidtorrents.py
34+ searx/engines/solr.py
35+ searx/engines/sqlite.py
36+ searx/engines/springer.py
37+ searx/engines/google_scholar.py
38+ searx/engines/yahoo_news.py
39+ searx/engines/apkmirror.py
40+ searx/engines/core.py
41+ searx_extra/update/update_external_bangs.py
42+)
43+
44+PYLINT_SEARX_DISABLE_OPTION="\
45+I,C,R,\
46+W0105,W0212,W0511,W0603,W0613,W0621,W0702,W0703,W1401,\
47+E1136"
48+PYLINT_ADDITIONAL_BUILTINS_FOR_ENGINES="supported_languages,language_aliases"
49+PYLINT_OPTIONS="-m pylint -j 0 --rcfile .pylintrc"
50+
51+help() {
52+ cat <<EOF
53+buildenv
54+ rebuild ./utils/brand.env
55+babel.compile
56+ pybabel compile ./searx/translations
57+data.*
58+ all : update searx/languages.py and ./data/*
59+ languages : update searx/data/engines_languages.json & searx/languages.py
60+ useragents: update searx/data/useragents.json with the most recent versions of Firefox.
61+docs.*
62+ html : build HTML documentation
63+ live : autobuild HTML documentation while editing
64+ gh-pages : deploy on gh-pages branch
65+ prebuild : build reST include files (./${DOCS_BUILD}/includes)
66+ clean : clean documentation build
67+docker
68+ build : build docker image
69+ push : build and push docker image
70+gecko.driver
71+ download & install geckodriver if not already installed (required for
72+ robot_tests)
73+node.*
74+ env : download & install npm dependencies locally
75+ clean : drop npm installations
76+py.*
77+ build : Build python packages at ./${PYDIST}
78+ clean : delete virtualenv and intermediate py files
79+pyenv.* :
80+ install : developer install of searx into virtualenv
81+ uninstall : uninstall developer installation
82+ cmd ... : run command ... in virtualenv
83+ OK : test if virtualenv is OK
84+pypi.upload:
85+ Upload python packages to PyPi (to test use pypi.upload.test)
86+test.* :
87+ pylint : lint PYLINT_FILES, searx/engines, searx & tests
88+ pep8 : pycodestyle (pep8) for all files except PYLINT_FILES
89+ unit : run unit tests
90+ coverage : run unit tests with coverage
91+ robot : run robot test
92+ clean : clean intermediate test stuff
93+themes.* :
94+ all : build all themes
95+ oscar : build oscar theme
96+ simple : build simple theme
97+EOF
98+}
99+
100+
101+if [ "$VERBOSE" = "1" ]; then
102+ SPHINX_VERBOSE="-v"
103+ PYLINT_VERBOSE="-v"
104+fi
105+
106+# needed by sphinx-docs
107+export DOCS_BUILD
108+
109+buildenv() {
110+ SEARX_DEBUG=1 pyenv.cmd python utils/build_env.py 2>&1 \
111+ | prefix_stdout "${_Blue}BUILDENV${_creset} "
112+ return "${PIPESTATUS[0]}"
113+}
114+
115+babel.compile() {
116+ build_msg BABEL compile
117+ pyenv.cmd pybabel compile -d "${REPO_ROOT}/searx/translations"
118+ dump_return $?
119+}
120+
121+
122+data.all() {
123+ data.languages
124+ data.useragents
125+ build_msg DATA "update searx/data/ahmia_blacklist.txt"
126+ pyenv.cmd python searx_extra/update/update_ahmia_blacklist.py
127+ build_msg DATA "update searx/data/wikidata_units.json"
128+ pyenv.cmd python searx_extra/update/update_wikidata_units.py
129+ build_msg DATA "update searx/data/currencies.json"
130+ pyenv.cmd python searx_extra/update/update_currencies.py
131+}
132+
133+
134+data.languages() {
135+ ( set -e
136+ build_msg ENGINES "fetch languages .."
137+ pyenv.cmd python searx_extra/update/update_languages.py
138+ build_msg ENGINES "update update searx/languages.py"
139+ build_msg DATA "update searx/data/engines_languages.json"
140+ )
141+ dump_return $?
142+}
143+
144+data.useragents() {
145+ build_msg DATA "update searx/data/useragents.json"
146+ pyenv.cmd python searx_extra/update/update_firefox_version.py
147+ dump_return $?
148+}
149+
150+docs.prebuild() {
151+ build_msg DOCS "build ${DOCS_BUILD}/includes"
152+ (
153+ set -e
154+ [ "$VERBOSE" = "1" ] && set -x
155+ mkdir -p "${DOCS_BUILD}/includes"
156+ ./utils/searx.sh doc | cat > "${DOCS_BUILD}/includes/searx.rst"
157+ ./utils/filtron.sh doc | cat > "${DOCS_BUILD}/includes/filtron.rst"
158+ ./utils/morty.sh doc | cat > "${DOCS_BUILD}/includes/morty.rst"
159+ )
160+ dump_return $?
161+}
162+
163+docker.push() {
164+ docker.build push
165+}
166+
167+# shellcheck disable=SC2119
168+docker.build() {
169+ pyenv.install
170+
171+ build_msg DOCKER build
172+ # run installation in a subprocess and activate pyenv
173+
174+ # See https://www.shellcheck.net/wiki/SC1001 and others ..
175+ # shellcheck disable=SC2031,SC2230,SC2002,SC2236,SC2143,SC1001
176+ ( set -e
177+ # shellcheck source=/dev/null
178+ source "${PY_ENV_BIN}/activate"
179+
180+ # Check if it is a git repository
181+ if [ ! -d .git ]; then
182+ die 1 "This is not Git repository"
183+ fi
184+ if [ ! -x "$(which git)" ]; then
185+ die 1 "git is not installed"
186+ fi
187+
188+ if ! git remote get-url origin 2> /dev/null; then
189+ die 1 "there is no remote origin"
190+ fi
191+
192+ # This is a git repository
193+
194+ # "git describe" to get the Docker version (for example : v0.15.0-89-g0585788e)
195+ # awk to remove the "v" and the "g"
196+ SEARX_GIT_VERSION=$(git describe --match "v[0-9]*\.[0-9]*\.[0-9]*" HEAD 2>/dev/null | awk -F'-' '{OFS="-"; $1=substr($1, 2); if ($3) { $3=substr($3, 2); } print}')
197+
198+ # add the suffix "-dirty" if the repository has uncommited change
199+ # /!\ HACK for searx/searx: ignore utils/brand.env
200+ git update-index -q --refresh
201+ if [ ! -z "$(git diff-index --name-only HEAD -- | grep -v 'utils/brand.env')" ]; then
202+ SEARX_GIT_VERSION="${SEARX_GIT_VERSION}-dirty"
203+ fi
204+
205+ # Get the last git commit id, will be added to the Searx version (see Dockerfile)
206+ VERSION_GITCOMMIT=$(echo "$SEARX_GIT_VERSION" | cut -d- -f2-4)
207+ build_msg DOCKER "Last commit : $VERSION_GITCOMMIT"
208+
209+ # Check consistency between the git tag and the searx/version.py file
210+ # /! HACK : parse Python file with bash /!
211+ # otherwise it is not possible build the docker image without all Python
212+ # dependencies ( version.py loads __init__.py )
213+ # SEARX_PYTHON_VERSION=$(python3 -c "import six; import searx.version; six.print_(searx.version.VERSION_STRING)")
214+ SEARX_PYTHON_VERSION=$(cat searx/version.py | grep "\(VERSION_MAJOR\|VERSION_MINOR\|VERSION_BUILD\) =" | cut -d\= -f2 | sed -e 's/^[[:space:]]*//' | paste -sd "." -)
215+ if [ "$(echo "$SEARX_GIT_VERSION" | cut -d- -f1)" != "$SEARX_PYTHON_VERSION" ]; then
216+ err_msg "git tag: $SEARX_GIT_VERSION"
217+ err_msg "searx/version.py: $SEARX_PYTHON_VERSION"
218+ die 1 "Inconsistency between the last git tag and the searx/version.py file"
219+ fi
220+
221+ # define the docker image name
222+ GITHUB_USER=$(echo "${GIT_URL}" | sed 's/.*github\.com\/\([^\/]*\).*/\1/')
223+ SEARX_IMAGE_NAME="${SEARX_IMAGE_NAME:-${GITHUB_USER:-searx}/searx}"
224+
225+ # build Docker image
226+ build_msg DOCKER "Building image ${SEARX_IMAGE_NAME}:${SEARX_GIT_VERSION}"
227+ docker build \
228+ --build-arg GIT_URL="${GIT_URL}" \
229+ --build-arg SEARX_GIT_VERSION="${SEARX_GIT_VERSION}" \
230+ --build-arg VERSION_GITCOMMIT="${VERSION_GITCOMMIT}" \
231+ --build-arg LABEL_DATE="$(date -u +"%Y-%m-%dT%H:%M:%SZ")" \
232+ --build-arg LABEL_VCS_REF="$(git rev-parse HEAD)" \
233+ --build-arg LABEL_VCS_URL="${GIT_URL}" \
234+ --build-arg TIMESTAMP_SETTINGS="$(git log -1 --format="%cd" --date=unix -- searx/settings.yml)" \
235+ --build-arg TIMESTAMP_UWSGI="$(git log -1 --format="%cd" --date=unix -- dockerfiles/uwsgi.ini)" \
236+ -t "${SEARX_IMAGE_NAME}:latest" -t "${SEARX_IMAGE_NAME}:${SEARX_GIT_VERSION}" .
237+
238+ if [ "$1" = "push" ]; then
239+ docker push "${SEARX_IMAGE_NAME}:latest"
240+ docker push "${SEARX_IMAGE_NAME}:${SEARX_GIT_VERSION}"
241+ fi
242+ )
243+ dump_return $?
244+}
245+
246+# shellcheck disable=SC2119
247+gecko.driver() {
248+ pyenv.install
249+
250+ build_msg INSTALL "gecko.driver"
251+ # run installation in a subprocess and activate pyenv
252+ ( set -e
253+ # shellcheck source=/dev/null
254+ source "${PY_ENV_BIN}/activate"
255+
256+ # TODO : check the current geckodriver version
257+ geckodriver -V > /dev/null 2>&1 || NOTFOUND=1
258+ set +e
259+ if [ -z "$NOTFOUND" ]; then
260+ build_msg INSTALL "geckodriver already installed"
261+ return
262+ fi
263+ PLATFORM="$(python3 -c 'import platform; print(platform.system().lower(), platform.architecture()[0])')"
264+ case "$PLATFORM" in
265+ "linux 32bit" | "linux2 32bit") ARCH="linux32";;
266+ "linux 64bit" | "linux2 64bit") ARCH="linux64";;
267+ "windows 32 bit") ARCH="win32";;
268+ "windows 64 bit") ARCH="win64";;
269+ "mac 64bit") ARCH="macos";;
270+ esac
271+ GECKODRIVER_URL="https://github.com/mozilla/geckodriver/releases/download/$GECKODRIVER_VERSION/geckodriver-$GECKODRIVER_VERSION-$ARCH.tar.gz";
272+
273+ build_msg GECKO "Installing ${PY_ENV_BIN}/geckodriver from $GECKODRIVER_URL"
274+
275+ FILE="$(mktemp)"
276+ wget -qO "$FILE" -- "$GECKODRIVER_URL" && tar xz -C "${PY_ENV_BIN}" -f "$FILE" geckodriver
277+ rm -- "$FILE"
278+ chmod 755 -- "${PY_ENV_BIN}/geckodriver"
279+ )
280+ dump_return $?
281+}
282+
283+node.env() {
284+ local err=0
285+ pushd "${REPO_ROOT}" &> /dev/null
286+ # shellcheck disable=SC2230
287+ which npm &> /dev/null || die 1 'node.env - npm is not found!'
288+
289+ ( set -e
290+ # shellcheck disable=SC2030
291+ PATH="$(npm bin):$PATH"
292+ export PATH
293+
294+ build_msg INSTALL "npm install $NPM_PACKAGES"
295+ # shellcheck disable=SC2086
296+ npm install $NPM_PACKAGES
297+
298+ cd "${REPO_ROOT}/searx/static/themes/oscar"
299+ build_msg INSTALL "($(pwd)) npm install"
300+ npm install
301+
302+ build_msg INSTALL "($(pwd)) npm install"
303+ cd "${REPO_ROOT}/searx/static/themes/simple"
304+ npm install
305+ )
306+ err=$?
307+ popd &> /dev/null
308+ dump_return "$err"
309+}
310+
311+node.clean() {
312+
313+ build_msg CLEAN "locally installed npm dependencies"
314+ rm -rf \
315+ ./node_modules \
316+ ./package-lock.json \
317+ ./searx/static/themes/oscar/package-lock.json \
318+ ./searx/static/themes/oscar/node_modules \
319+ ./searx/static/themes/simple/package-lock.json \
320+ ./searx/static/themes/simple/node_modules
321+ dump_return $?
322+}
323+
324+py.build() {
325+ build_msg BUILD "[pylint] python package ${PYDIST}"
326+ pyenv.cmd python setup.py \
327+ sdist -d "${PYDIST}" \
328+ bdist_wheel --bdist-dir "${PYBUILD}" -d "${PYDIST}"
329+}
330+
331+py.clean() {
332+ build_msg CLEAN pyenv
333+ ( set -e
334+ pyenv.drop
335+ [ "$VERBOSE" = "1" ] && set -x
336+ rm -rf "${PYDIST}" "${PYBUILD}" "${PY_ENV}" ./.tox ./*.egg-info
337+ find . -name '*.pyc' -exec rm -f {} +
338+ find . -name '*.pyo' -exec rm -f {} +
339+ find . -name __pycache__ -exec rm -rf {} +
340+ )
341+}
342+
343+pyenv.check() {
344+ cat <<EOF
345+import yaml
346+print('import yaml --> OK')
347+EOF
348+}
349+
350+pyenv.install() {
351+
352+ if ! pyenv.OK; then
353+ py.clean > /dev/null
354+ fi
355+ if pyenv.install.OK > /dev/null; then
356+ return 0
357+ fi
358+ ( set -e
359+ pyenv
360+ build_msg PYENV "[install] pip install -e 'searx${PY_SETUP_EXTRAS}'"
361+ "${PY_ENV_BIN}/python" -m pip install -e ".${PY_SETUP_EXTRAS}"
362+ buildenv
363+ ) || die 42 "error while build & install pyenv (${PY_ENV_BIN})"
364+}
365+
366+pyenv.uninstall() {
367+ build_msg PYENV "[pyenv.uninstall] uninstall packages: ${PYOBJECTS}"
368+ pyenv.cmd python setup.py develop --uninstall 2>&1 \
369+ | prefix_stdout "${_Blue}PYENV ${_creset}[pyenv.uninstall] "
370+
371+}
372+
373+pypi.upload() {
374+ py.clean
375+ py.build
376+ # https://github.com/pypa/twine
377+ pyenv.cmd twine upload "${PYDIST}"/*
378+}
379+
380+pypi.upload.test() {
381+ py.clean
382+ py.build
383+ pyenv.cmd twine upload -r testpypi "${PYDIST}"/*
384+}
385+
386+test.pylint() {
387+ # shellcheck disable=SC2086
388+ ( set -e
389+ build_msg TEST "[pylint] \$PYLINT_FILES"
390+ pyenv.cmd python ${PYLINT_OPTIONS} ${PYLINT_VERBOSE} \
391+ "${PYLINT_FILES[@]}"
392+
393+ build_msg TEST "[pylint] searx/engines"
394+ pyenv.cmd python ${PYLINT_OPTIONS} ${PYLINT_VERBOSE} \
395+ --disable="${PYLINT_SEARX_DISABLE_OPTION}" \
396+ --additional-builtins="${PYLINT_ADDITIONAL_BUILTINS_FOR_ENGINES}" \
397+ searx/engines
398+
399+ build_msg TEST "[pylint] searx tests"
400+ pyenv.cmd python ${PYLINT_OPTIONS} ${PYLINT_VERBOSE} \
401+ --disable="${PYLINT_SEARX_DISABLE_OPTION}" \
402+ --ignore=searx/engines \
403+ tests
404+ )
405+ dump_return $?
406+}
407+
408+test.pep8() {
409+ build_msg TEST 'pycodestyle (formerly pep8)'
410+ local _exclude=""
411+ printf -v _exclude '%s, ' "${PYLINT_FILES[@]}"
412+ pyenv.cmd pycodestyle \
413+ --exclude="searx/static, searx/languages.py, $_exclude " \
414+ --max-line-length=120 \
415+ --ignore "E117,E252,E402,E722,E741,W503,W504,W605" \
416+ searx tests
417+ dump_return $?
418+}
419+
420+test.unit() {
421+ build_msg TEST 'tests/unit'
422+ pyenv.cmd python -m nose2 -s tests/unit
423+ dump_return $?
424+}
425+
426+test.coverage() {
427+ build_msg TEST 'unit test coverage'
428+ ( set -e
429+ pyenv.cmd python -m nose2 -C --log-capture --with-coverage --coverage searx -s tests/unit
430+ pyenv.cmd coverage report
431+ pyenv.cmd coverage html
432+ )
433+ dump_return $?
434+}
435+
436+test.robot() {
437+ build_msg TEST 'robot'
438+ gecko.driver
439+ PYTHONPATH=. pyenv.cmd python searx/testing.py robot
440+ dump_return $?
441+}
442+
443+test.clean() {
444+ build_msg CLEAN "test stuff"
445+ rm -rf geckodriver.log .coverage coverage/
446+ dump_return $?
447+}
448+
449+themes.all() {
450+ ( set -e
451+ node.env
452+ themes.oscar
453+ themes.simple
454+ )
455+ dump_return $?
456+}
457+
458+themes.oscar() {
459+ local gruntfile=searx/static/themes/oscar/gruntfile.js
460+ build_msg GRUNT "${gruntfile}"
461+ PATH="$(npm bin):$PATH" grunt --gruntfile "${gruntfile}"
462+ dump_return $?
463+}
464+
465+themes.simple() {
466+ local gruntfile=searx/static/themes/simple/gruntfile.js
467+ build_msg GRUNT "${gruntfile}"
468+ PATH="$(npm bin):$PATH" grunt --gruntfile "${gruntfile}"
469+ dump_return $?
470+}
471+
472+# shellcheck disable=SC2119
473+main() {
474+
475+ local _type
476+ local cmd="$1"; shift
477+
478+ if [ "$cmd" == "" ]; then
479+ help
480+ err_msg "missing command"
481+ return 42
482+ fi
483+
484+ case "$cmd" in
485+ --getenv) var="$1"; echo "${!var}";;
486+ --help) help;;
487+ --*)
488+ help
489+ err_msg "unknown option $cmd"
490+ return 42
491+ ;;
492+ *)
493+ _type="$(type -t "$cmd")"
494+ if [ "$_type" != 'function' ]; then
495+ err_msg "unknown command $1 / use --help"
496+ return 42
497+ else
498+ "$cmd" "$@"
499+ fi
500+ ;;
501+ esac
502+}
503+
504+main "$@"
manage.shdeleted−275
@@ -1,275 +0,0 @@
1−#!/bin/sh
2−
3−BASE_DIR="$(dirname -- "`readlink -f -- "$0"`")"
4−
5−cd -- "$BASE_DIR"
6−set -e
7−
8−# subshell
9−PYTHONPATH="$BASE_DIR"
10−SEARX_DIR="$BASE_DIR/searx"
11−ACTION="$1"
12−
13−
14−#
15−# Python
16−#
17−
18−update_packages() {
19− pip install --upgrade pip
20− pip install --upgrade setuptools
21− pip install -Ur "$BASE_DIR/requirements.txt"
22−}
23−
24−update_dev_packages() {
25− update_packages
26− pip install -Ur "$BASE_DIR/requirements-dev.txt"
27−}
28−
29−install_geckodriver() {
30− echo '[!] Checking geckodriver'
31− # TODO : check the current geckodriver version
32− set -e
33− geckodriver -V > /dev/null 2>&1 || NOTFOUND=1
34− set +e
35− if [ -z "$NOTFOUND" ]; then
36− return
37− fi
38− GECKODRIVER_VERSION="v0.24.0"
39− PLATFORM="`python -c "import six; import platform; six.print_(platform.system().lower(), platform.architecture()[0])"`"
40− case "$PLATFORM" in
41− "linux 32bit" | "linux2 32bit") ARCH="linux32";;
42− "linux 64bit" | "linux2 64bit") ARCH="linux64";;
43− "windows 32 bit") ARCH="win32";;
44− "windows 64 bit") ARCH="win64";;
45− "mac 64bit") ARCH="macos";;
46− esac
47− GECKODRIVER_URL="https://github.com/mozilla/geckodriver/releases/download/$GECKODRIVER_VERSION/geckodriver-$GECKODRIVER_VERSION-$ARCH.tar.gz";
48−
49− if [ -z "$1" ]; then
50− if [ -z "$VIRTUAL_ENV" ]; then
51− printf "geckodriver can't be installed because VIRTUAL_ENV is not set, you should download it from\n %s" "$GECKODRIVER_URL"
52− exit
53− else
54− GECKODRIVER_DIR="$VIRTUAL_ENV/bin"
55− fi
56− else
57− GECKODRIVER_DIR="$1"
58− mkdir -p -- "$GECKODRIVER_DIR"
59− fi
60−
61− printf "Installing %s/geckodriver from\n %s" "$GECKODRIVER_DIR" "$GECKODRIVER_URL"
62−
63− FILE="`mktemp`"
64− wget -qO "$FILE" -- "$GECKODRIVER_URL" && tar xz -C "$GECKODRIVER_DIR" -f "$FILE" geckodriver
65− rm -- "$FILE"
66− chmod 777 -- "$GECKODRIVER_DIR/geckodriver"
67−}
68−
69−locales() {
70− pybabel compile -d "$SEARX_DIR/translations"
71−}
72−
73−update_useragents() {
74− echo '[!] Updating user agent versions'
75− python utils/fetch_firefox_version.py
76−}
77−
78−pep8_check() {
79− echo '[!] Running pep8 check'
80− # ignored rules:
81− # E402 module level import not at top of file
82− # W503 line break before binary operator
83− pep8 --exclude=searx/static --max-line-length=120 --ignore "E402,W503" "$SEARX_DIR" "$BASE_DIR/tests"
84−}
85−
86−unit_tests() {
87− echo '[!] Running unit tests'
88− python -m nose2 -s "$BASE_DIR/tests/unit"
89−}
90−
91−py_test_coverage() {
92− echo '[!] Running python test coverage'
93− PYTHONPATH="`pwd`" python -m nose2 -C --log-capture --with-coverage --coverage "$SEARX_DIR" -s "$BASE_DIR/tests/unit" \
94− && coverage report \
95− && coverage html
96−}
97−
98−robot_tests() {
99− echo '[!] Running robot tests'
100− PYTHONPATH="`pwd`" python "$SEARX_DIR/testing.py" robot
101−}
102−
103−tests() {
104− set -e
105− pep8_check
106− unit_tests
107− install_geckodriver
108− robot_tests
109− set +e
110−}
111−
112−
113−#
114−# Web
115−#
116−
117−npm_path_setup() {
118− which npm || (printf 'Error: npm is not found\n'; exit 1)
119− export PATH="$(npm bin)":$PATH
120−}
121−
122−npm_packages() {
123− npm_path_setup
124−
125− echo '[!] install NPM packages'
126− cd -- "$BASE_DIR"
127− npm install less@2.7 less-plugin-clean-css grunt-cli
128−
129− echo '[!] install NPM packages for oscar theme'
130− cd -- "$BASE_DIR/searx/static/themes/oscar"
131− npm install
132−
133− echo '[!] install NPM packages for simple theme'
134− cd -- "$BASE_DIR/searx/static/themes/simple"
135− npm install
136−}
137−
138−build_style() {
139− npm_path_setup
140−
141− lessc --clean-css="--s1 --advanced --compatibility=ie9" "$BASE_DIR/searx/static/$1" "$BASE_DIR/searx/static/$2"
142−}
143−
144−styles() {
145− npm_path_setup
146−
147− echo '[!] Building legacy style'
148− build_style themes/legacy/less/style.less themes/legacy/css/style.css
149− build_style themes/legacy/less/style-rtl.less themes/legacy/css/style-rtl.css
150− echo '[!] Building courgette style'
151− build_style themes/courgette/less/style.less themes/courgette/css/style.css
152− build_style themes/courgette/less/style-rtl.less themes/courgette/css/style-rtl.css
153− echo '[!] Building pix-art style'
154− build_style themes/pix-art/less/style.less themes/pix-art/css/style.css
155− echo '[!] Building bootstrap style'
156− build_style less/bootstrap/bootstrap.less css/bootstrap.min.css
157−}
158−
159−grunt_build() {
160− npm_path_setup
161−
162− echo '[!] Grunt build : oscar theme'
163− grunt --gruntfile "$SEARX_DIR/static/themes/oscar/gruntfile.js"
164− echo '[!] Grunt build : simple theme'
165− grunt --gruntfile "$SEARX_DIR/static/themes/simple/gruntfile.js"
166−}
167−
168−docker_build() {
169− # Check if it is a git repository
170− if [ ! -d .git ]; then
171− echo "This is not Git repository"
172− exit 1
173− fi
174−
175− if [ ! -x "$(which git)" ]; then
176− echo "git is not installed"
177− exit 1
178− fi
179−
180− if [ ! git remote get-url origin 2> /dev/null ]; then
181− echo "there is no remote origin"
182− exit 1
183− fi
184−
185− # This is a git repository
186−
187− # "git describe" to get the Docker version (for example : v0.15.0-89-g0585788e)
188− # awk to remove the "v" and the "g"
189− SEARX_GIT_VERSION=$(git describe --match "v[0-9]*\.[0-9]*\.[0-9]*" HEAD 2>/dev/null | awk -F'-' '{OFS="-"; $1=substr($1, 2); $3=substr($3, 2); print}')
190−
191− # add the suffix "-dirty" if the repository has uncommited change
192− git update-index -q --refresh
193− if [ ! -z "$(git diff-index --name-only HEAD --)" ]; then
194− SEARX_GIT_VERSION="${SEARX_GIT_VERSION}-dirty"
195− fi
196−
197− # Get the last git commit id, will be added to the Searx version (see Dockerfile)
198− VERSION_GITCOMMIT=$(echo $SEARX_GIT_VERSION | cut -d- -f2-4)
199− echo "Last commit : $VERSION_GITCOMMIT"
200−
201− # Check consistency between the git tag and the searx/version.py file
202− # /!\ HACK : parse Python file with bash /!\
203− # otherwise it is not possible build the docker image without all Python dependencies ( version.py loads __init__.py )
204− # SEARX_PYTHON_VERSION=$(python -c "import six; import searx.version; six.print_(searx.version.VERSION_STRING)")
205− SEARX_PYTHON_VERSION=$(cat searx/version.py | grep "\(VERSION_MAJOR\|VERSION_MINOR\|VERSION_BUILD\) =" | cut -d\= -f2 | sed -e 's/^[[:space:]]*//' | paste -sd "." -)
206− if [ $(echo "$SEARX_GIT_VERSION" | cut -d- -f1) != "$SEARX_PYTHON_VERSION" ]; then
207− echo "Inconsistency between the last git tag and the searx/version.py file"
208− echo "git tag: $SEARX_GIT_VERSION"
209− echo "searx/version.py: $SEARX_PYTHON_VERSION"
210− exit 1
211− fi
212−
213− # define the docker image name
214− # /!\ HACK to get the user name /!\
215− GITHUB_USER=$(git remote get-url origin | sed 's/.*github\.com\/\([^\/]*\).*/\1/')
216− SEARX_IMAGE_NAME="${GITHUB_USER:-searx}/searx"
217−
218− # build Docker image
219− echo "Building image ${SEARX_IMAGE_NAME}:${SEARX_GIT_VERSION}"
220− sudo docker build \
221− --build-arg SEARX_GIT_VERSION="${SEARX_GIT_VERSION}" \
222− --build-arg VERSION_GITCOMMIT="${VERSION_GITCOMMIT}" \
223− --build-arg LABEL_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \
224− --build-arg LABEL_VCS_REF=$(git rev-parse HEAD) \
225− --build-arg LABEL_VCS_URL=$(git remote get-url origin) \
226− --build-arg TIMESTAMP_SETTINGS=$(git log -1 --format="%cd" --date=unix -- searx/settings.yml) \
227− --build-arg TIMESTAMP_UWSGI=$(git log -1 --format="%cd" --date=unix -- dockerfiles/uwsgi.ini) \
228− -t ${SEARX_IMAGE_NAME}:latest -t ${SEARX_IMAGE_NAME}:${SEARX_GIT_VERSION} .
229−
230− if [ "$1" = "push" ]; then
231− sudo docker push ${SEARX_IMAGE_NAME}:latest
232− sudo docker push ${SEARX_IMAGE_NAME}:${SEARX_GIT_VERSION}
233− fi
234−}
235−
236−#
237−# Help
238−#
239−
240−help() {
241− [ -z "$1" ] || printf 'Error: %s\n' "$1"
242− echo "Searx manage.sh help
243−
244−Commands
245−========
246− help - This text
247−
248− Build requirements
249− ------------------
250− update_packages - Check & update production dependency changes
251− update_dev_packages - Check & update development and production dependency changes
252− install_geckodriver - Download & install geckodriver if not already installed (required for robot_tests)
253− npm_packages - Download & install npm dependencies
254− update_useragents - Update useragents.json with the most recent versions of Firefox
255−
256− Build
257− -----
258− locales - Compile locales
259− styles - Build less files
260− grunt_build - Build files for themes
261− docker_build - Build Docker image
262−
263− Tests
264− -----
265− unit_tests - Run unit tests
266− pep8_check - Pep8 validation
267− robot_tests - Run selenium tests
268− tests - Run all python tests (pep8, unit, robot_tests)
269− py_test_coverage - Unit test coverage
270−"
271−}
272−
273−[ "$(command -V "$ACTION" | grep ' function$')" = "" ] \
274− && help "action not found" \
275− || "$ACTION" "$2"
requirements-dev.txt+19−18
@@ -1,19 +1,20 @@
1−pallets-sphinx-themes
2−Sphinx
3−sphinx-issues
4−mock==2.0.0
5−nose2[coverage_plugin]
1+mock==4.0.3
2+nose2[coverage_plugin]==0.10.0
63cov-core==1.15.0
7−pep8==1.7.0
8−pylint
9−plone.testing==5.0.0
10−splinter==0.11.0
11−transifex-client==0.12.2
12−unittest2==1.1.0
13−zope.testrunner==4.5.1
14−selenium==3.141.0
15−linuxdoc @ git+http://github.com/return42/linuxdoc.git
16−sphinx-jinja
17−sphinx-tabs
18−sphinxcontrib-programoutput
19−twine
4+pycodestyle==2.8.0
5+pylint==2.12.2
6+splinter==0.17.0
7+transifex-client==0.14.3; python_version < '3.10'
8+transifex-client==0.12.1; python_version == '3.10'
9+selenium==4.1.0
10+twine==3.7.1
11+Pallets-Sphinx-Themes==2.0.2
12+docutils==0.16
13+Sphinx==4.4.0
14+sphinx-issues==3.0.1
15+sphinx-jinja==1.4.0
16+sphinx-tabs==3.2.0
17+sphinxcontrib-programoutput==0.17
18+sphinx-autobuild==2021.3.14
19+linuxdoc==20211220
20+aiounittest==1.4.1
requirements.txt+16−12
@@ -1,12 +1,16 @@
1−certifi==2019.3.9
2−babel==2.7.0
3−flask-babel==1.0.0
4−flask==1.0.2
5−idna==2.8
6−jinja2==2.10.1
7−lxml==4.3.3
8−pygments==2.1.3
9−pyopenssl==19.0.0
10−python-dateutil==2.8.0
11−pyyaml==5.1
12−requests[socks]==2.22.0
1+certifi==2021.10.8
2+babel==2.9.1
3+flask-babel==2.0.0
4+flask==2.0.2
5+jinja2==3.0.3
6+lxml==4.7.1
7+pygments==2.8.0
8+python-dateutil==2.8.2
9+pyyaml==6.0
10+httpx[http2]==0.21.3
11+Brotli==1.0.9
12+uvloop==0.16.0; python_version >= '3.7'
13+uvloop==0.14.0; python_version < '3.7'
14+httpx-socks[asyncio]==0.7.2
15+langdetect==1.0.9
16+setproctitle==1.2.2
searx/__init__.py+53−41
@@ -15,52 +15,25 @@ along with searx. If not, see < http://www.gnu.org/licenses/ >.
1515(C) 2013- by Adam Tauber, <asciimoo@gmail.com>
1616'''
1717
18−import certifi
1918import logging
19+import searx.settings_loader
2020from os import environ
2121from os.path import realpath, dirname, join, abspath, isfile
22−from io import open
23−from ssl import OPENSSL_VERSION_INFO, OPENSSL_VERSION
24−try:
25− from yaml import safe_load
26−except:
27− from sys import exit, stderr
28− stderr.write('[E] install pyyaml\n')
29− exit(2)
22+
3023
3124searx_dir = abspath(dirname(__file__))
3225engine_dir = dirname(realpath(__file__))
26+static_path = abspath(join(dirname(__file__), 'static'))
27+settings, settings_load_message = searx.settings_loader.load_settings()
3328
34−
35−def check_settings_yml(file_name):
36− if isfile(file_name):
37− return file_name
38− else:
39− return None
40−
41−
42−# find location of settings.yml
43−if 'SEARX_SETTINGS_PATH' in environ:
44− # if possible set path to settings using the
45− # enviroment variable SEARX_SETTINGS_PATH
46− settings_path = check_settings_yml(environ['SEARX_SETTINGS_PATH'])
47−else:
48− # if not, get it from searx code base or last solution from /etc/searx
49− settings_path = check_settings_yml(join(searx_dir, 'settings.yml')) or check_settings_yml('/etc/searx/settings.yml')
50−
51−if not settings_path:
52− raise Exception('settings.yml not found')
53−
54−# load settings
55−with open(settings_path, 'r', encoding='utf-8') as settings_yaml:
56− settings = safe_load(settings_yaml)
29+if settings['ui']['static_path']:
30+ static_path = settings['ui']['static_path']
5731
5832'''
5933enable debug if
6034the environnement variable SEARX_DEBUG is 1 or true
6135(whatever the value in settings.yml)
6236or general.debug=True in settings.yml
63−
6437disable debug if
6538the environnement variable SEARX_DEBUG is 0 or false
6639(whatever the value in settings.yml)
@@ -80,17 +53,56 @@ else:
8053 logging.basicConfig(level=logging.WARNING)
8154
8255logger = logging.getLogger('searx')
83−logger.debug('read configuration from %s', settings_path)
84−# Workaround for openssl versions <1.0.2
85−# https://github.com/certifi/python-certifi/issues/26
86−if OPENSSL_VERSION_INFO[0:3] < (1, 0, 2):
87− if hasattr(certifi, 'old_where'):
88− environ['REQUESTS_CA_BUNDLE'] = certifi.old_where()
89− logger.warning('You are using an old openssl version({0}), please upgrade above 1.0.2!'.format(OPENSSL_VERSION))
90−
56+logger.info(settings_load_message)
9157logger.info('Initialisation done')
9258
9359if 'SEARX_SECRET' in environ:
9460 settings['server']['secret_key'] = environ['SEARX_SECRET']
9561if 'SEARX_BIND_ADDRESS' in environ:
9662 settings['server']['bind_address'] = environ['SEARX_BIND_ADDRESS']
63+
64+
65+class _brand_namespace:
66+
67+ @classmethod
68+ def get_val(cls, group, name, default=''):
69+ return settings.get(group, {}).get(name) or default
70+
71+ @property
72+ def SEARX_URL(self):
73+ return self.get_val('server', 'base_url')
74+
75+ @property
76+ def CONTACT_URL(self):
77+ return self.get_val('general', 'contact_url')
78+
79+ @property
80+ def GIT_URL(self):
81+ return self.get_val('brand', 'git_url')
82+
83+ @property
84+ def GIT_BRANCH(self):
85+ return self.get_val('brand', 'git_branch')
86+
87+ @property
88+ def ISSUE_URL(self):
89+ return self.get_val('brand', 'issue_url')
90+
91+ @property
92+ def DOCS_URL(self):
93+ return self.get_val('brand', 'docs_url')
94+
95+ @property
96+ def PUBLIC_INSTANCES(self):
97+ return self.get_val('brand', 'public_instances')
98+
99+ @property
100+ def WIKI_URL(self):
101+ return self.get_val('brand', 'wiki_url')
102+
103+ @property
104+ def TWITTER_URL(self):
105+ return self.get_val('brand', 'twitter_url')
106+
107+
108+brand = _brand_namespace()
searx/answerers/__init__.py+2−6
@@ -1,12 +1,8 @@
11from os import listdir
22from os.path import realpath, dirname, join, isdir
3−from sys import version_info
43from searx.utils import load_module
54from collections import defaultdict
65
7−if version_info[0] == 3:
8− unicode = str
9−
106
117answerers_dir = dirname(realpath(__file__))
128
@@ -36,10 +32,10 @@ def ask(query):
3632 results = []
3733 query_parts = list(filter(None, query.query.split()))
3834
39− if query_parts[0].decode('utf-8') not in answerers_by_keywords:
35+ if not query_parts or query_parts[0] not in answerers_by_keywords:
4036 return results
4137
42− for answerer in answerers_by_keywords[query_parts[0].decode('utf-8')]:
38+ for answerer in answerers_by_keywords[query_parts[0]]:
4339 result = answerer(query)
4440 if result:
4541 results.append(result)
searx/answerers/random/answerer.py+13−19
@@ -1,7 +1,6 @@
11import hashlib
22import random
33import string
4−import sys
54import uuid
65from flask_babel import gettext
76
@@ -10,12 +9,7 @@ from flask_babel import gettext
109keywords = ('random',)
1110
1211random_int_max = 2**31
13−
14−if sys.version_info[0] == 2:
15− random_string_letters = string.lowercase + string.digits + string.uppercase
16−else:
17− unicode = str
18− random_string_letters = string.ascii_lowercase + string.digits + string.ascii_uppercase
12+random_string_letters = string.ascii_lowercase + string.digits + string.ascii_uppercase
1913
2014
2115def random_characters():
@@ -24,32 +18,32 @@ def random_characters():
2418
2519
2620def random_string():
27− return u''.join(random_characters())
21+ return ''.join(random_characters())
2822
2923
3024def random_float():
31− return unicode(random.random())
25+ return str(random.random())
3226
3327
3428def random_int():
35− return unicode(random.randint(-random_int_max, random_int_max))
29+ return str(random.randint(-random_int_max, random_int_max))
3630
3731
3832def random_sha256():
3933 m = hashlib.sha256()
40− m.update(b''.join(random_characters()))
41− return unicode(m.hexdigest())
34+ m.update(''.join(random_characters()).encode())
35+ return str(m.hexdigest())
4236
4337
4438def random_uuid():
45− return unicode(uuid.uuid4())
39+ return str(uuid.uuid4())
4640
4741
48−random_types = {b'string': random_string,
49− b'int': random_int,
50− b'float': random_float,
51− b'sha256': random_sha256,
52− b'uuid': random_uuid}
42+random_types = {'string': random_string,
43+ 'int': random_int,
44+ 'float': random_float,
45+ 'sha256': random_sha256,
46+ 'uuid': random_uuid}
5347
5448
5549# required answerer function
@@ -70,4 +64,4 @@ def answer(query):
7064def self_info():
7165 return {'name': gettext('Random value generator'),
7266 'description': gettext('Generate different random values'),
73− 'examples': [u'random {}'.format(x.decode('utf-8')) for x in random_types]}
67+ 'examples': ['random {}'.format(x) for x in random_types]}
searx/answerers/statistics/answerer.py+6−9
@@ -1,11 +1,8 @@
1−from sys import version_info
21from functools import reduce
32from operator import mul
43
54from flask_babel import gettext
65
7−if version_info[0] == 3:
8− unicode = str
96
107keywords = ('min',
118 'max',
@@ -30,21 +27,21 @@ def answer(query):
3027 func = parts[0]
3128 answer = None
3229
33− if func == b'min':
30+ if func == 'min':
3431 answer = min(args)
35− elif func == b'max':
32+ elif func == 'max':
3633 answer = max(args)
37− elif func == b'avg':
34+ elif func == 'avg':
3835 answer = sum(args) / len(args)
39− elif func == b'sum':
36+ elif func == 'sum':
4037 answer = sum(args)
41− elif func == b'prod':
38+ elif func == 'prod':
4239 answer = reduce(mul, args, 1)
4340
4441 if answer is None:
4542 return []
4643
47− return [{'answer': unicode(answer)}]
44+ return [{'answer': str(answer)}]
4845
4946
5047# required answerer function
searx/autocomplete.py+40−92
@@ -16,107 +16,45 @@ along with searx. If not, see < http://www.gnu.org/licenses/ >.
1616'''
1717
1818
19−import sys
2019from lxml import etree
2120from json import loads
22−from searx import settings
23−from searx.languages import language_codes
24−from searx.engines import (
25− categories, engines, engine_shortcuts
26−)
27−from searx.poolrequests import get as http_get
28−from searx.url_utils import urlencode
21+from urllib.parse import urlencode
22+
23+from httpx import HTTPError
2924
30−if sys.version_info[0] == 3:
31− unicode = str
25+
26+from searx import settings
27+from searx.data import ENGINES_LANGUAGES
28+from searx.network import get as http_get
29+from searx.exceptions import SearxEngineResponseException
3230
3331
3432def get(*args, **kwargs):
3533 if 'timeout' not in kwargs:
3634 kwargs['timeout'] = settings['outgoing']['request_timeout']
37−
35+ kwargs['raise_for_httperror'] = True
3836 return http_get(*args, **kwargs)
3937
4038
41−def searx_bang(full_query):
42− '''check if the searchQuery contain a bang, and create fitting autocompleter results'''
43− # check if there is a query which can be parsed
44− if len(full_query.getSearchQuery()) == 0:
45− return []
39+def brave(query, lang):
40+ # brave search autocompleter
41+ url = 'https://search.brave.com/api/suggest?{query}'
42+
43+ resp = get(url.format(query=urlencode({'q': query})))
4644
4745 results = []
4846
49− # check if current query stats with !bang
50− first_char = full_query.getSearchQuery()[0]
51− if first_char == '!' or first_char == '?':
52− if len(full_query.getSearchQuery()) == 1:
53− # show some example queries
54− # TODO, check if engine is not avaliable
55− results.append(first_char + "images")
56− results.append(first_char + "wikipedia")
57− results.append(first_char + "osm")
58− else:
59− engine_query = full_query.getSearchQuery()[1:]
60−
61− # check if query starts with categorie name
62− for categorie in categories:
63− if categorie.startswith(engine_query):
64− results.append(first_char + '{categorie}'.format(categorie=categorie))
65−
66− # check if query starts with engine name
67− for engine in engines:
68− if engine.startswith(engine_query.replace('_', ' ')):
69− results.append(first_char + '{engine}'.format(engine=engine.replace(' ', '_')))
70−
71− # check if query starts with engine shortcut
72− for engine_shortcut in engine_shortcuts:
73− if engine_shortcut.startswith(engine_query):
74− results.append(first_char + '{engine_shortcut}'.format(engine_shortcut=engine_shortcut))
75−
76− # check if current query stats with :bang
77− elif first_char == ':':
78− if len(full_query.getSearchQuery()) == 1:
79− # show some example queries
80− results.append(":en")
81− results.append(":en_us")
82− results.append(":english")
83− results.append(":united_kingdom")
84− else:
85− engine_query = full_query.getSearchQuery()[1:]
86−
87− for lc in language_codes:
88− lang_id, lang_name, country, english_name = map(unicode.lower, lc)
89−
90− # check if query starts with language-id
91− if lang_id.startswith(engine_query):
92− if len(engine_query) <= 2:
93− results.append(u':{lang_id}'.format(lang_id=lang_id.split('-')[0]))
94− else:
95− results.append(u':{lang_id}'.format(lang_id=lang_id))
96−
97− # check if query starts with language name
98− if lang_name.startswith(engine_query) or english_name.startswith(engine_query):
99− results.append(u':{lang_name}'.format(lang_name=lang_name))
100−
101− # check if query starts with country
102− if country.startswith(engine_query.replace('_', ' ')):
103− results.append(u':{country}'.format(country=country.replace(' ', '_')))
104−
105− # remove duplicates
106− result_set = set(results)
107−
108− # remove results which are already contained in the query
109− for query_part in full_query.query_parts:
110− if query_part in result_set:
111− result_set.remove(query_part)
112−
113− # convert result_set back to list
114− return list(result_set)
47+ if resp.ok:
48+ data = loads(resp.text)
49+ for suggestion in data[1]:
50+ results.append(suggestion)
51+
52+ return results
11553
11654
11755def dbpedia(query, lang):
11856 # dbpedia autocompleter, no HTTPS
119− autocomplete_url = 'http://lookup.dbpedia.org/api/search.asmx/KeywordSearch?'
57+ autocomplete_url = 'https://lookup.dbpedia.org/api/search.asmx/KeywordSearch?'
12058
12159 response = get(autocomplete_url + urlencode(dict(QueryString=query)))
12260
@@ -124,8 +62,7 @@ def dbpedia(query, lang):
12462
12563 if response.ok:
12664 dom = etree.fromstring(response.content)
127− results = dom.xpath('//a:Result/a:Label//text()',
128− namespaces={'a': 'http://lookup.dbpedia.org/'})
65+ results = dom.xpath('//Result/Label//text()')
12966
13067 return results
13168
@@ -157,12 +94,11 @@ def google(query, lang):
15794
15895def startpage(query, lang):
15996 # startpage autocompleter
160− url = 'https://startpage.com/do/suggest?{query}'
161−
162− resp = get(url.format(query=urlencode({'query': query}))).text.split('\n')
163− if len(resp) > 1:
164− return resp
165− return []
97+ lui = ENGINES_LANGUAGES['startpage'].get(lang, 'english')
98+ url = 'https://startpage.com/suggestions?{query}'
99+ resp = get(url.format(query=urlencode({'q': query, 'segment': 'startpage.udog', 'lui': lui})))
100+ data = resp.json()
101+ return [e['text'] for e in data.get('suggestions', []) if 'text' in e]
166102
167103
168104def swisscows(query, lang):
@@ -200,7 +136,8 @@ def wikipedia(query, lang):
200136 return []
201137
202138
203−backends = {'dbpedia': dbpedia,
139+backends = {'brave': brave,
140+ 'dbpedia': dbpedia,
204141 'duckduckgo': duckduckgo,
205142 'google': google,
206143 'startpage': startpage,
@@ -208,3 +145,14 @@ backends = {'dbpedia': dbpedia,
208145 'qwant': qwant,
209146 'wikipedia': wikipedia
210147 }
148+
149+
150+def search_autocomplete(backend_name, query, lang):
151+ backend = backends.get(backend_name)
152+ if backend is None:
153+ return []
154+
155+ try:
156+ return backend(query, lang)
157+ except (HTTPError, SearxEngineResponseException):
158+ return []
searx/data/__init__.pynew file+50
@@ -0,0 +1,50 @@
1+# SPDX-License-Identifier: AGPL-3.0-or-later
2+# lint: pylint
3+"""This module holds the *data* created by::
4+
5+ make data.all
6+
7+"""
8+
9+__all__ = [
10+ 'ENGINES_LANGUAGES',
11+ 'CURRENCIES',
12+ 'USER_AGENTS',
13+ 'EXTERNAL_URLS',
14+ 'WIKIDATA_UNITS',
15+ 'EXTERNAL_BANGS',
16+ 'OSM_KEYS_TAGS',
17+ 'ahmia_blacklist_loader',
18+]
19+
20+import json
21+from pathlib import Path
22+
23+data_dir = Path(__file__).parent
24+
25+
26+def _load(filename):
27+ with open(data_dir / filename, encoding='utf-8') as f:
28+ return json.load(f)
29+
30+
31+def ahmia_blacklist_loader():
32+ """Load data from `ahmia_blacklist.txt` and return a list of MD5 values of onion
33+ names. The MD5 values are fetched by::
34+
35+ searx_extra/update/update_ahmia_blacklist.py
36+
37+ This function is used by :py:mod:`searx.plugins.ahmia_filter`.
38+
39+ """
40+ with open(str(data_dir / 'ahmia_blacklist.txt'), encoding='utf-8') as f:
41+ return f.read().split()
42+
43+
44+ENGINES_LANGUAGES = _load('engines_languages.json')
45+CURRENCIES = _load('currencies.json')
46+USER_AGENTS = _load('useragents.json')
47+EXTERNAL_URLS = _load('external_urls.json')
48+WIKIDATA_UNITS = _load('wikidata_units.json')
49+EXTERNAL_BANGS = _load('external_bangs.json')
50+OSM_KEYS_TAGS = _load('osm_keys_tags.json')
searx/data/ahmia_blacklist.txtnew file+35730

This diff is too big to show here.

searx/data/currencies.json+14643−7619

This diff is too big to show here.

searx/data/engines_languages.json+1112−858

This diff is too big to show here.

searx/data/external_bangs.jsonnew file+19068

This diff is too big to show here.

searx/data/external_urls.jsonnew file+156

This diff is too big to show here.

searx/data/osm_keys_tags.jsonnew file+15416

This diff is too big to show here.

searx/data/useragents.json+5−7

This diff is too big to show here.

searx/data/wikidata_units.jsonnew file+1223

This diff is too big to show here.

searx/engines/1337x.py+23−9

This diff is too big to show here.

searx/engines/__init__.py+58−24

This diff is too big to show here.

searx/engines/acgsou.pydeleted−75

This diff is too big to show here.

searx/engines/ahmia.pynew file+85

This diff is too big to show here.

searx/engines/apkmirror.py+33−26

This diff is too big to show here.

searx/engines/archlinux.py+17−14

This diff is too big to show here.

searx/engines/arxiv.py+23−25

This diff is too big to show here.

searx/engines/bandcamp.pynew file+73

This diff is too big to show here.

searx/engines/base.py+13−17

This diff is too big to show here.

searx/engines/bing.py+15−18

This diff is too big to show here.

searx/engines/bing_images.py+22−23

This diff is too big to show here.

searx/engines/bing_news.py+21−19

This diff is too big to show here.

searx/engines/bing_videos.py+14−11

This diff is too big to show here.

searx/engines/btdigg.py+16−12

This diff is too big to show here.

searx/engines/ccengine.pynew file+53

This diff is too big to show here.

searx/engines/command.pynew file+172

This diff is too big to show here.

searx/engines/core.pynew file+82

This diff is too big to show here.

searx/engines/currency_convert.py+18−63

This diff is too big to show here.

searx/engines/dailymotion.py+12−12

This diff is too big to show here.

searx/engines/deezer.py+13−10

This diff is too big to show here.

searx/engines/deviantart.py+50−54

This diff is too big to show here.

searx/engines/dictzone.py+21−29

This diff is too big to show here.

searx/engines/digbt.py+13−15

This diff is too big to show here.

searx/engines/digg.py+45−45

This diff is too big to show here.

searx/engines/doku.py+16−14

This diff is too big to show here.

searx/engines/duckduckgo.py+118−75

This diff is too big to show here.

searx/engines/duckduckgo_definitions.py+172−82

This diff is too big to show here.

searx/engines/duckduckgo_images.py+21−24

This diff is too big to show here.

searx/engines/duden.py+31−34

This diff is too big to show here.

searx/engines/dummy-offline.py+11−3

This diff is too big to show here.

searx/engines/dummy.py+11−3

This diff is too big to show here.

searx/engines/ebay.pynew file+73

This diff is too big to show here.

searx/engines/elasticsearch.pynew file+144

This diff is too big to show here.

searx/engines/etools.py+13−11

This diff is too big to show here.

searx/engines/faroo.pydeleted−96

This diff is too big to show here.

searx/engines/fdroid.py+13−9

This diff is too big to show here.

searx/engines/filecrop.pydeleted−88

This diff is too big to show here.

searx/engines/flickr.py+12−10

This diff is too big to show here.

searx/engines/flickr_noapi.py+17−20

This diff is too big to show here.

searx/engines/framalibre.py+14−14

This diff is too big to show here.

searx/engines/freesound.pynew file+69

This diff is too big to show here.

searx/engines/frinkiac.py+16−9

This diff is too big to show here.

searx/engines/genius.py+19−18

This diff is too big to show here.

searx/engines/gentoo.py+14−13

This diff is too big to show here.

searx/engines/gigablast.py+105−96

This diff is too big to show here.

searx/engines/github.py+13−10

This diff is too big to show here.

searx/engines/google.py+280−330

This diff is too big to show here.

searx/engines/google_images.py+183−71

This diff is too big to show here.

searx/engines/google_news.py+168−58

This diff is too big to show here.

searx/engines/google_scholar.pynew file+156

This diff is too big to show here.

searx/engines/google_videos.py+174−70

This diff is too big to show here.

searx/engines/imdb.pynew file+55

This diff is too big to show here.

searx/engines/ina.py+18−23

This diff is too big to show here.

searx/engines/invidious.py+38−16

This diff is too big to show here.

searx/engines/json_engine.py+19−12

This diff is too big to show here.

searx/engines/kickass.py+13−11

This diff is too big to show here.

searx/engines/loc.pynew file+68

This diff is too big to show here.

searx/engines/mediathekviewweb.pynew file+68

This diff is too big to show here.

searx/engines/mediawiki.py+14−14

This diff is too big to show here.

searx/engines/meilisearch.pynew file+59

This diff is too big to show here.

searx/engines/microsoft_academic.py+37−41

This diff is too big to show here.

searx/engines/mixcloud.py+12−9

This diff is too big to show here.

searx/engines/mongodb.pynew file+61

This diff is too big to show here.

searx/engines/mysql_server.pynew file+62

This diff is too big to show here.

searx/engines/nyaa.py+13−10

This diff is too big to show here.

searx/engines/onesearch.pynew file+57

This diff is too big to show here.

searx/engines/opensemantic.pynew file+46

This diff is too big to show here.

searx/engines/openstreetmap.py+418−72

This diff is too big to show here.

searx/engines/pdbe.py+11−8

This diff is too big to show here.

searx/engines/peertube.pynew file+96

This diff is too big to show here.

searx/engines/photon.py+13−11

This diff is too big to show here.

searx/engines/piratebay.py+72−67

This diff is too big to show here.

searx/engines/postgresql.pynew file+69

This diff is too big to show here.

searx/engines/prowlarr.pynew file+80

This diff is too big to show here.

searx/engines/pubmed.py+17−13

This diff is too big to show here.

searx/engines/qwant.py+199−88

This diff is too big to show here.

searx/engines/recoll.pynew file+111

This diff is too big to show here.

searx/engines/reddit.py+12−9

This diff is too big to show here.

searx/engines/redis_server.pynew file+69

This diff is too big to show here.

searx/engines/rumble.pynew file+81

This diff is too big to show here.

searx/engines/scanr_structures.py+12−9

This diff is too big to show here.

searx/engines/searchcode_code.py+13−11

This diff is too big to show here.

searx/engines/searchcode_doc.pydeleted−49

This diff is too big to show here.

searx/engines/searx_engine.py+10−8

This diff is too big to show here.

searx/engines/seedpeer.pydeleted−78

This diff is too big to show here.

searx/engines/semantic_scholar.pynew file+42

This diff is too big to show here.

searx/engines/sepiasearch.pynew file+102

This diff is too big to show here.

searx/engines/seznam.pynew file+66

This diff is too big to show here.

searx/engines/sjp.pynew file+92

This diff is too big to show here.

searx/engines/solidtorrents.pynew file+53

This diff is too big to show here.

searx/engines/solr.pynew file+74

This diff is too big to show here.

searx/engines/soundcloud.py+16−18

This diff is too big to show here.

searx/engines/spotify.py+18−14

This diff is too big to show here.

searx/engines/springer.pynew file+74

This diff is too big to show here.

searx/engines/sqlite.pynew file+51

This diff is too big to show here.

searx/engines/stackexchange.pynew file+67

This diff is too big to show here.

searx/engines/stackoverflow.pydeleted−57

This diff is too big to show here.

searx/engines/startpage.py+172−34

This diff is too big to show here.

searx/engines/tineye.pynew file+86

This diff is too big to show here.

searx/engines/tokyotoshokan.py+13−11

This diff is too big to show here.

searx/engines/torrentz.py+16−15

This diff is too big to show here.

searx/engines/translated.py+18−35

This diff is too big to show here.

searx/engines/twitter.pydeleted−87

This diff is too big to show here.

searx/engines/unsplash.py+12−9

This diff is too big to show here.

searx/engines/vimeo.py+15−14

This diff is too big to show here.

searx/engines/wikidata.py+647−453

This diff is too big to show here.

searx/engines/wikipedia.py+47−74

This diff is too big to show here.

searx/engines/wolframalpha_api.py+24−19

This diff is too big to show here.

searx/engines/wolframalpha_noapi.py+17−12

This diff is too big to show here.

searx/engines/wordnik.pynew file+77

This diff is too big to show here.

searx/engines/www1x.py+21−22

This diff is too big to show here.

searx/engines/xpath.py+41−81

This diff is too big to show here.

searx/engines/xpath_flex.pynew file+121

This diff is too big to show here.

searx/engines/yacy.py+23−17

This diff is too big to show here.

searx/engines/yahoo.py+104−102

This diff is too big to show here.

searx/engines/yahoo_news.py+84−83

This diff is too big to show here.

searx/engines/yandex.pydeleted−64

This diff is too big to show here.

searx/engines/yggtorrent.pynew file+128

This diff is too big to show here.

searx/engines/youtube_api.py+19−11

This diff is too big to show here.

searx/engines/youtube_noapi.py+90−20

This diff is too big to show here.

searx/exceptions.py+71−1

This diff is too big to show here.

searx/external_bang.pynew file+89

This diff is too big to show here.

searx/external_urls.pynew file+89

This diff is too big to show here.

searx/languages.py+69−73

This diff is too big to show here.

searx/metrology/__init__.pynew file

No changes to the content.

searx/metrology/error_recorder.pynew file+144

This diff is too big to show here.

searx/network/__init__.pynew file+188

This diff is too big to show here.

searx/network/client.pynew file+219

This diff is too big to show here.

searx/network/network.pynew file+358

This diff is too big to show here.

searx/network/raise_for_httperror.pynew file+66

This diff is too big to show here.

searx/plugins/__init__.py+110−9

This diff is too big to show here.

searx/plugins/ahmia_filter.pynew file+33

This diff is too big to show here.

searx/plugins/hash_plugin.pynew file+54

This diff is too big to show here.

searx/plugins/hostname_replace.pynew file+28

This diff is too big to show here.

searx/plugins/https_rewrite.py+1−4

This diff is too big to show here.

searx/plugins/oa_doi_rewrite.py+3−3

This diff is too big to show here.

searx/plugins/open_results_on_new_tab.pydeleted−25

This diff is too big to show here.

searx/plugins/self_info.py+5−7

This diff is too big to show here.

searx/plugins/tracker_url_remover.py+2−1

This diff is too big to show here.

searx/poolrequests.pydeleted−159

This diff is too big to show here.

searx/preferences.py+73−29

This diff is too big to show here.

searx/query.py+297−160

This diff is too big to show here.

searx/results.py+93−54

This diff is too big to show here.

searx/search.pydeleted−550

This diff is too big to show here.

searx/search/__init__.pynew file+216

This diff is too big to show here.

searx/search/checker/__init__.pynew file+4

This diff is too big to show here.

searx/search/checker/__main__.pynew file+95

This diff is too big to show here.

searx/search/checker/background.pynew file+125

This diff is too big to show here.

searx/search/checker/impl.pynew file+416

This diff is too big to show here.

searx/search/models.pynew file+71

This diff is too big to show here.

searx/search/processors/__init__.pynew file+41

This diff is too big to show here.

searx/search/processors/abstract.pynew file+52

This diff is too big to show here.

searx/search/processors/offline.pynew file+51

This diff is too big to show here.

searx/search/processors/online.pynew file+262

This diff is too big to show here.

searx/search/processors/online_currency.pynew file+69

This diff is too big to show here.

searx/search/processors/online_dictionary.pynew file+55

This diff is too big to show here.

searx/settings.yml+1104−134

This diff is too big to show here.

searx/settings_loader.pynew file+132

This diff is too big to show here.

searx/settings_robot.yml+12−3

This diff is too big to show here.

searx/shared/__init__.pynew file+31

This diff is too big to show here.

searx/shared/shared_abstract.pynew file+21

This diff is too big to show here.

searx/shared/shared_simple.pynew file+39

This diff is too big to show here.

searx/shared/shared_uwsgi.pynew file+64

This diff is too big to show here.

searx/static/css/bootstrap.min.cssdeleted−1

This diff is too big to show here.

searx/static/fonts/glyphicons-halflings-regular.eotdeleted

Binary file not shown.

searx/static/fonts/glyphicons-halflings-regular.svgdeleted−229

This diff is too big to show here.

searx/static/fonts/glyphicons-halflings-regular.ttfdeleted

Binary file not shown.

searx/static/fonts/glyphicons-halflings-regular.woffdeleted

Binary file not shown.

searx/static/js/bootstrap.min.jsdeleted−6

This diff is too big to show here.

searx/static/js/html5shiv.min.jsdeleted−4

This diff is too big to show here.

searx/static/js/jquery-1.11.1.min.jsdeleted−4

This diff is too big to show here.

searx/static/js/mootools-autocompleter-1.1.2-min.jsdeleted−2

This diff is too big to show here.

searx/static/js/mootools-core-1.4.5-min.jsdeleted−491

This diff is too big to show here.

searx/static/js/require-2.1.15.min.jsdeleted−36

This diff is too big to show here.

searx/static/js/respond.min.jsdeleted−5

This diff is too big to show here.

searx/static/js/typeahead.bundle.min.jsdeleted−7

This diff is too big to show here.

searx/static/less/bootstrap/.csscomb.jsondeleted−297

This diff is too big to show here.

searx/static/less/bootstrap/.csslintrcdeleted−19

This diff is too big to show here.

searx/static/less/bootstrap/alerts.lessdeleted−68

This diff is too big to show here.

searx/static/less/bootstrap/badges.lessdeleted−55

This diff is too big to show here.

searx/static/less/bootstrap/bootstrap.lessdeleted−53

This diff is too big to show here.

searx/static/less/bootstrap/breadcrumbs.lessdeleted−26

This diff is too big to show here.

searx/static/less/bootstrap/button-groups.lessdeleted−240

This diff is too big to show here.

searx/static/less/bootstrap/buttons.lessdeleted−157

This diff is too big to show here.

searx/static/less/bootstrap/carousel.lessdeleted−243

This diff is too big to show here.

searx/static/less/bootstrap/close.lessdeleted−33

This diff is too big to show here.

searx/static/less/bootstrap/code.lessdeleted−68

This diff is too big to show here.

searx/static/less/bootstrap/component-animations.lessdeleted−31

This diff is too big to show here.

searx/static/less/bootstrap/dropdowns.lessdeleted−215

This diff is too big to show here.

searx/static/less/bootstrap/forms.lessdeleted−540

This diff is too big to show here.

searx/static/less/bootstrap/glyphicons.lessdeleted−233

This diff is too big to show here.

searx/static/less/bootstrap/grid.lessdeleted−84

This diff is too big to show here.

searx/static/less/bootstrap/input-groups.lessdeleted−166

This diff is too big to show here.

searx/static/less/bootstrap/jumbotron.lessdeleted−48

This diff is too big to show here.

searx/static/less/bootstrap/labels.lessdeleted−64

This diff is too big to show here.

searx/static/less/bootstrap/list-group.lessdeleted−131

This diff is too big to show here.

searx/static/less/bootstrap/media.lessdeleted−56

This diff is too big to show here.

searx/static/less/bootstrap/mixins.lessdeleted−39

This diff is too big to show here.

searx/static/less/bootstrap/mixins/alerts.lessdeleted−14

This diff is too big to show here.

searx/static/less/bootstrap/mixins/background-variant.lessdeleted−8

This diff is too big to show here.

searx/static/less/bootstrap/mixins/border-radius.lessdeleted−18

This diff is too big to show here.

searx/static/less/bootstrap/mixins/buttons.lessdeleted−50

This diff is too big to show here.

searx/static/less/bootstrap/mixins/center-block.lessdeleted−7

This diff is too big to show here.

searx/static/less/bootstrap/mixins/clearfix.lessdeleted−22

This diff is too big to show here.

searx/static/less/bootstrap/mixins/forms.lessdeleted−81

This diff is too big to show here.

searx/static/less/bootstrap/mixins/gradients.lessdeleted−59

This diff is too big to show here.

searx/static/less/bootstrap/mixins/grid-framework.lessdeleted−91

This diff is too big to show here.

searx/static/less/bootstrap/mixins/grid.lessdeleted−122

This diff is too big to show here.

searx/static/less/bootstrap/mixins/hide-text.lessdeleted−21

This diff is too big to show here.

searx/static/less/bootstrap/mixins/image.lessdeleted−34

This diff is too big to show here.

searx/static/less/bootstrap/mixins/labels.lessdeleted−12

This diff is too big to show here.

searx/static/less/bootstrap/mixins/list-group.lessdeleted−29

This diff is too big to show here.

searx/static/less/bootstrap/mixins/nav-divider.lessdeleted−10

This diff is too big to show here.

searx/static/less/bootstrap/mixins/nav-vertical-align.lessdeleted−9

This diff is too big to show here.

searx/static/less/bootstrap/mixins/opacity.lessdeleted−8

This diff is too big to show here.

searx/static/less/bootstrap/mixins/pagination.lessdeleted−23

This diff is too big to show here.

searx/static/less/bootstrap/mixins/panels.lessdeleted−24

This diff is too big to show here.

searx/static/less/bootstrap/mixins/progress-bar.lessdeleted−10

This diff is too big to show here.

searx/static/less/bootstrap/mixins/reset-filter.lessdeleted−8

This diff is too big to show here.

searx/static/less/bootstrap/mixins/resize.lessdeleted−6

This diff is too big to show here.

searx/static/less/bootstrap/mixins/responsive-visibility.lessdeleted−15

This diff is too big to show here.

searx/static/less/bootstrap/mixins/size.lessdeleted−10

This diff is too big to show here.

searx/static/less/bootstrap/mixins/tab-focus.lessdeleted−9

This diff is too big to show here.

searx/static/less/bootstrap/mixins/table-row.lessdeleted−28

This diff is too big to show here.

searx/static/less/bootstrap/mixins/text-emphasis.lessdeleted−8

This diff is too big to show here.

searx/static/less/bootstrap/mixins/text-overflow.lessdeleted−8

This diff is too big to show here.

searx/static/less/bootstrap/mixins/vendor-prefixes.lessdeleted−224

This diff is too big to show here.

searx/static/less/bootstrap/modals.lessdeleted−150

This diff is too big to show here.

searx/static/less/bootstrap/navbar.lessdeleted−655

This diff is too big to show here.

searx/static/less/bootstrap/navs.lessdeleted−242

This diff is too big to show here.

searx/static/less/bootstrap/normalize.lessdeleted−425

This diff is too big to show here.

searx/static/less/bootstrap/pager.lessdeleted−55

This diff is too big to show here.

searx/static/less/bootstrap/pagination.lessdeleted−88

This diff is too big to show here.

searx/static/less/bootstrap/panels.lessdeleted−243

This diff is too big to show here.

searx/static/less/bootstrap/popovers.lessdeleted−133

This diff is too big to show here.

searx/static/less/bootstrap/print.lessdeleted−101

This diff is too big to show here.

searx/static/less/bootstrap/progress-bars.lessdeleted−105

This diff is too big to show here.

searx/static/less/bootstrap/responsive-embed.lessdeleted−34

This diff is too big to show here.

searx/static/less/bootstrap/responsive-utilities.lessdeleted−194

This diff is too big to show here.

searx/static/less/bootstrap/scaffolding.lessdeleted−150

This diff is too big to show here.

searx/static/less/bootstrap/tables.lessdeleted−233

This diff is too big to show here.

searx/static/less/bootstrap/theme.lessdeleted−258

This diff is too big to show here.

searx/static/less/bootstrap/thumbnails.lessdeleted−36

This diff is too big to show here.

searx/static/less/bootstrap/tooltip.lessdeleted−95

This diff is too big to show here.

searx/static/less/bootstrap/type.lessdeleted−313

This diff is too big to show here.

searx/static/less/bootstrap/typeahead.lessdeleted−153

This diff is too big to show here.

searx/static/less/bootstrap/utilities.lessdeleted−57

This diff is too big to show here.

searx/static/less/bootstrap/variables.lessdeleted−846

This diff is too big to show here.

searx/static/less/bootstrap/wells.lessdeleted−29

This diff is too big to show here.

searx/static/plugins/external_plugins/.gitignorenew file+3

This diff is too big to show here.

searx/static/plugins/js/infinite_scroll.js+33−17

This diff is too big to show here.

searx/static/plugins/js/open_results_on_new_tab.jsdeleted−3

This diff is too big to show here.

searx/static/plugins/js/search_on_category_select.js+18

This diff is too big to show here.

searx/static/themes/simple/js/searx_src/searx_imageresult.js → searx/static/themes/__common__/js/image_layout.jsrenamed+61−49

This diff is too big to show here.

searx/static/themes/courgette/css/style-rtl.cssdeleted−1

This diff is too big to show here.

searx/static/themes/courgette/css/style.cssdeleted−1

This diff is too big to show here.

searx/static/themes/courgette/img/bg-body-index.jpgdeleted

Binary file not shown.

searx/static/themes/courgette/img/favicon.pngdeleted

Binary file not shown.

searx/static/themes/courgette/img/github_ribbon.pngdeleted

Binary file not shown.

searx/static/themes/courgette/img/icons/icon_500px.icodeleted

Binary file not shown.

searx/static/themes/courgette/img/icons/icon_bing.icodeleted

Binary file not shown.

searx/static/themes/courgette/img/icons/icon_dailymotion.icodeleted

Binary file not shown.

searx/static/themes/courgette/img/icons/icon_deezer.icodeleted

Binary file not shown.

searx/static/themes/courgette/img/icons/icon_deviantart.icodeleted

Binary file not shown.

searx/static/themes/courgette/img/icons/icon_digg.icodeleted

Binary file not shown.

searx/static/themes/courgette/img/icons/icon_duckduckgo.icodeleted

Binary file not shown.

searx/static/themes/courgette/img/icons/icon_flickr.icodeleted

Binary file not shown.

searx/static/themes/courgette/img/icons/icon_github.icodeleted

Binary file not shown.

searx/static/themes/courgette/img/icons/icon_google play apps.icodeleted

Binary file not shown.

searx/static/themes/courgette/img/icons/icon_google play movies.icodeleted

Binary file not shown.

searx/static/themes/courgette/img/icons/icon_google play music.icodeleted

Binary file not shown.

searx/static/themes/courgette/img/icons/icon_google.icodeleted

Binary file not shown.

searx/static/themes/courgette/img/icons/icon_kickass.icodeleted

Binary file not shown.

searx/static/themes/courgette/img/icons/icon_openstreetmap.icodeleted

Binary file not shown.

searx/static/themes/courgette/img/icons/icon_searchcode code.icodeleted

Binary file not shown.

searx/static/themes/courgette/img/icons/icon_searchcode doc.icodeleted

Binary file not shown.

searx/static/themes/courgette/img/icons/icon_searchcode.icodeleted

Binary file not shown.

searx/static/themes/courgette/img/icons/icon_soundcloud.icodeleted

Binary file not shown.

searx/static/themes/courgette/img/icons/icon_stackoverflow.icodeleted

Binary file not shown.

searx/static/themes/courgette/img/icons/icon_startpage.icodeleted

Binary file not shown.

searx/static/themes/courgette/img/icons/icon_subtitleseeker.icodeleted

Binary file not shown.

searx/static/themes/courgette/img/icons/icon_twitter.icodeleted

Binary file not shown.

searx/static/themes/courgette/img/icons/icon_vimeo.icodeleted

Binary file not shown.

searx/static/themes/courgette/img/icons/icon_wikipedia.icodeleted

Binary file not shown.

searx/static/themes/courgette/img/icons/icon_yahoo.icodeleted

Binary file not shown.

searx/static/themes/courgette/img/icons/icon_youtube.icodeleted

Binary file not shown.

searx/static/themes/courgette/img/preference-icon.pngdeleted

Binary file not shown.

searx/static/themes/courgette/img/search-icon.pngdeleted

Binary file not shown.

searx/static/themes/courgette/img/searx-mobile.pngdeleted

Binary file not shown.

searx/static/themes/courgette/img/searx.pngdeleted

Binary file not shown.

searx/static/themes/courgette/img/searx_logo.svgdeleted−203

This diff is too big to show here.

searx/static/themes/courgette/js/searx.jsdeleted−45

This diff is too big to show here.

searx/static/themes/courgette/less/style-rtl.lessdeleted−42

This diff is too big to show here.

searx/static/themes/courgette/less/style.lessdeleted−695

This diff is too big to show here.

searx/static/themes/legacy/css/style-rtl.cssdeleted−1

This diff is too big to show here.

searx/static/themes/legacy/css/style.cssdeleted−1

This diff is too big to show here.

searx/static/themes/legacy/img/favicon.pngdeleted

Binary file not shown.

searx/static/themes/legacy/img/github_ribbon.pngdeleted

Binary file not shown.

searx/static/themes/legacy/img/icons/icon_500px.icodeleted

Binary file not shown.

searx/static/themes/legacy/img/icons/icon_bing.icodeleted

Binary file not shown.

searx/static/themes/legacy/img/icons/icon_dailymotion.icodeleted

Binary file not shown.

searx/static/themes/legacy/img/icons/icon_deezer.icodeleted

Binary file not shown.

searx/static/themes/legacy/img/icons/icon_deviantart.icodeleted

Binary file not shown.

searx/static/themes/legacy/img/icons/icon_digg.icodeleted

Binary file not shown.

searx/static/themes/legacy/img/icons/icon_duckduckgo.icodeleted

Binary file not shown.

searx/static/themes/legacy/img/icons/icon_flickr.icodeleted

Binary file not shown.

searx/static/themes/legacy/img/icons/icon_github.icodeleted

Binary file not shown.

searx/static/themes/legacy/img/icons/icon_google play apps.icodeleted

Binary file not shown.

searx/static/themes/legacy/img/icons/icon_google play movies.icodeleted

Binary file not shown.

searx/static/themes/legacy/img/icons/icon_google play music.icodeleted

Binary file not shown.

searx/static/themes/legacy/img/icons/icon_google.icodeleted

Binary file not shown.

searx/static/themes/legacy/img/icons/icon_kickass.icodeleted

Binary file not shown.

searx/static/themes/legacy/img/icons/icon_openstreetmap.icodeleted

Binary file not shown.

searx/static/themes/legacy/img/icons/icon_searchcode code.icodeleted

Binary file not shown.

searx/static/themes/legacy/img/icons/icon_searchcode doc.icodeleted

Binary file not shown.

searx/static/themes/legacy/img/icons/icon_searchcode.icodeleted

Binary file not shown.

searx/static/themes/legacy/img/icons/icon_soundcloud.icodeleted

Binary file not shown.

searx/static/themes/legacy/img/icons/icon_stackoverflow.icodeleted

Binary file not shown.

searx/static/themes/legacy/img/icons/icon_startpage.icodeleted

Binary file not shown.

searx/static/themes/legacy/img/icons/icon_subtitleseeker.icodeleted

Binary file not shown.

searx/static/themes/legacy/img/icons/icon_twitter.icodeleted

Binary file not shown.

searx/static/themes/legacy/img/icons/icon_vimeo.icodeleted

Binary file not shown.

searx/static/themes/legacy/img/icons/icon_wikipedia.icodeleted

Binary file not shown.

searx/static/themes/legacy/img/icons/icon_yahoo.icodeleted

Binary file not shown.

searx/static/themes/legacy/img/icons/icon_youtube.icodeleted

Binary file not shown.

searx/static/themes/legacy/img/preference-icon.pngdeleted

Binary file not shown.

searx/static/themes/legacy/img/search-icon.pngdeleted

Binary file not shown.

searx/static/themes/legacy/img/searx.pngdeleted

Binary file not shown.

searx/static/themes/legacy/img/searx_logo.svgdeleted−203

This diff is too big to show here.

searx/static/themes/legacy/js/searx.jsdeleted−49

This diff is too big to show here.

searx/static/themes/legacy/less/autocompleter.lessdeleted−61

This diff is too big to show here.

searx/static/themes/legacy/less/code.lessdeleted−83

This diff is too big to show here.

searx/static/themes/legacy/less/definitions.lessdeleted−119

This diff is too big to show here.

searx/static/themes/legacy/less/mixins.lessdeleted−27

This diff is too big to show here.

searx/static/themes/legacy/less/search.lessdeleted−68

This diff is too big to show here.

searx/static/themes/legacy/less/style-rtl.lessdeleted−11

This diff is too big to show here.

searx/static/themes/legacy/less/style.lessdeleted−743

This diff is too big to show here.

searx/static/themes/oscar/.gitignore+1−1

This diff is too big to show here.

searx/static/themes/oscar/README.rst+39

This diff is too big to show here.

searx/static/themes/oscar/css/bootstrap-theme.cssnew file+587

This diff is too big to show here.

searx/static/themes/oscar/css/bootstrap-theme.min.cssnew file+6

This diff is too big to show here.

searx/static/themes/oscar/css/bootstrap-theme.min.css.mapnew file+1

This diff is too big to show here.

searx/static/themes/oscar/css/bootstrap.cssnew file+6990

This diff is too big to show here.

searx/static/themes/oscar/css/bootstrap.min.cssnew file+5

This diff is too big to show here.

searx/static/themes/oscar/css/bootstrap.min.css.mapnew file+1

This diff is too big to show here.

searx/static/themes/oscar/css/images/layers-2x.pngnew file

Binary file not shown.

searx/static/themes/oscar/css/images/layers.pngnew file

Binary file not shown.

searx/static/themes/oscar/css/images/marker-icon-2x.pngnew file

Binary file not shown.

searx/static/themes/oscar/css/images/marker-icon.pngnew file

Binary file not shown.

searx/static/themes/oscar/css/images/marker-shadow.pngnew file

Binary file not shown.

searx/static/themes/oscar/css/leaflet.cssnew file+640

This diff is too big to show here.

searx/static/themes/oscar/css/leaflet.min.css+1−93

This diff is too big to show here.

searx/static/themes/oscar/css/leaflet.min.css.mapnew file+1

This diff is too big to show here.

searx/static/themes/oscar/css/logicodev-dark.css+383−179

This diff is too big to show here.

searx/static/themes/oscar/css/logicodev-dark.min.css+1−1

This diff is too big to show here.

searx/static/themes/oscar/css/logicodev-dark.min.css.mapnew file+1

This diff is too big to show here.

searx/static/themes/oscar/css/logicodev.css+396−182

This diff is too big to show here.

searx/static/themes/oscar/css/logicodev.min.css+1−1

This diff is too big to show here.

searx/static/themes/oscar/css/logicodev.min.css.mapnew file+1

This diff is too big to show here.

searx/static/themes/oscar/css/pointhi.css+235−104

This diff is too big to show here.

searx/static/themes/oscar/css/pointhi.min.css+1−1

This diff is too big to show here.

searx/static/themes/oscar/css/pointhi.min.css.mapnew file+1

This diff is too big to show here.

searx/static/themes/oscar/fonts/glyphicons-halflings-regular.eotnew file

Binary file not shown.

searx/static/themes/oscar/fonts/glyphicons-halflings-regular.svgnew file+288

This diff is too big to show here.

searx/static/themes/oscar/fonts/glyphicons-halflings-regular.ttfnew file

Binary file not shown.

searx/static/themes/oscar/fonts/glyphicons-halflings-regular.woffnew file

Binary file not shown.

searx/static/themes/oscar/fonts/glyphicons-halflings-regular.woff2new file

Binary file not shown.

searx/static/themes/oscar/gruntfile.js+88−32

This diff is too big to show here.

searx/static/themes/oscar/img/icons/bandcamp.pngnew file

Binary file not shown.

searx/static/themes/oscar/img/map/layers-2x.pngdeleted

Binary file not shown.

searx/static/themes/oscar/img/map/layers.pngdeleted

Binary file not shown.

searx/static/themes/oscar/img/map/marker-icon-2x-green.pngdeleted

Binary file not shown.

searx/static/themes/oscar/img/map/marker-icon-2x-orange.pngdeleted

Binary file not shown.

searx/static/themes/oscar/img/map/marker-icon-2x-red.pngdeleted

Binary file not shown.

searx/static/themes/oscar/img/map/marker-icon-2x.pngdeleted

Binary file not shown.

searx/static/themes/oscar/img/map/marker-icon-green.pngdeleted

Binary file not shown.

searx/static/themes/oscar/img/map/marker-icon-orange.pngdeleted

Binary file not shown.

searx/static/themes/oscar/img/map/marker-icon-red.pngdeleted

Binary file not shown.

searx/static/themes/oscar/img/map/marker-icon.pngdeleted

Binary file not shown.

searx/static/themes/oscar/img/map/marker-shadow.pngdeleted

Binary file not shown.

searx/static/themes/oscar/js/bootstrap.bundle.min.jsnew file+7

This diff is too big to show here.

searx/static/themes/oscar/js/bootstrap.min.jsnew file+6

This diff is too big to show here.

searx/static/themes/oscar/js/jquery.min.jsnew file+2

This diff is too big to show here.

searx/static/themes/oscar/js/leaflet-0.7.3.min.jsdeleted−9

This diff is too big to show here.

searx/static/themes/oscar/js/leaflet.jsnew file+6

This diff is too big to show here.

searx/static/themes/oscar/js/searx.js+274−156

This diff is too big to show here.

searx/static/themes/oscar/js/searx.min.js+4−2

This diff is too big to show here.

searx/static/themes/oscar/js/searx.min.js.mapnew file+1

This diff is too big to show here.

searx/static/themes/oscar/js/searx_src/00_requirejs_config.jsdeleted−23

This diff is too big to show here.

searx/static/themes/oscar/js/searx_src/autocompleter.jsdeleted−37

This diff is too big to show here.

searx/static/themes/oscar/js/searx_src/leaflet_map.jsdeleted−167

This diff is too big to show here.

searx/static/themes/oscar/js/typeahead.bundle.min.jsnew file+9

This diff is too big to show here.

searx/static/themes/oscar/less/logicodev/code.lessdeleted−101

This diff is too big to show here.

searx/static/themes/oscar/less/logicodev/infobox.lessdeleted−37

This diff is too big to show here.

searx/static/themes/oscar/less/logicodev/preferences.lessdeleted−3

This diff is too big to show here.

searx/static/themes/oscar/less/logicodev/search.lessdeleted−80

This diff is too big to show here.

searx/static/themes/oscar/less/pointhi/code.lessdeleted−79

This diff is too big to show here.

searx/static/themes/oscar/less/pointhi/infobox.lessdeleted−11

This diff is too big to show here.

searx/static/themes/oscar/less/pointhi/preferences.lessdeleted−3

This diff is too big to show here.

searx/static/themes/oscar/package.json+14−6

This diff is too big to show here.

searx/static/themes/oscar/js/searx_src/01_init.js → searx/static/themes/oscar/src/js/01_init.jsrenamed+5−1

This diff is too big to show here.

searx/static/themes/oscar/src/js/autocompleter.jsnew file+60

This diff is too big to show here.

searx/static/themes/oscar/js/searx_src/element_modifiers.js → searx/static/themes/oscar/src/js/element_modifiers.jsrenamed+18

This diff is too big to show here.

searx/static/themes/oscar/src/js/infobox.jsnew file+11

This diff is too big to show here.

searx/static/themes/oscar/src/js/leaflet_map.jsnew file+79

This diff is too big to show here.

searx/static/themes/oscar/src/js/toggleall.jsnew file+10

This diff is too big to show here.

searx/static/themes/oscar/src/less/bootstrap/bootstrap.lessnew file+3

This diff is too big to show here.

searx/static/themes/oscar/src/less/bootstrap/typeahead.lessnew file+154

This diff is too big to show here.

searx/static/themes/oscar/less/logicodev-dark/oscar.less → searx/static/themes/oscar/src/less/logicodev-dark/oscar.lessrenamed+16−4

This diff is too big to show here.

searx/static/themes/oscar/less/logicodev/advanced.less → searx/static/themes/oscar/src/less/logicodev/advanced.lessrenamed+2−2

This diff is too big to show here.

searx/static/themes/oscar/less/logicodev/checkbox.less → searx/static/themes/oscar/src/less/logicodev/checkbox.lessrenamed

The content is the same.

searx/static/themes/oscar/src/less/logicodev/code.lessnew file+14

This diff is too big to show here.

searx/static/themes/oscar/less/logicodev/cursor.less → searx/static/themes/oscar/src/less/logicodev/cursor.lessrenamed

The content is the same.

searx/static/themes/oscar/less/logicodev/footer.less → searx/static/themes/oscar/src/less/logicodev/footer.lessrenamed

The content is the same.

searx/static/themes/oscar/src/less/logicodev/infobox.lessnew file+92

This diff is too big to show here.

searx/static/themes/oscar/less/logicodev/navbar.less → searx/static/themes/oscar/src/less/logicodev/navbar.lessrenamed

The content is the same.

searx/static/themes/oscar/less/logicodev/onoff.less → searx/static/themes/oscar/src/less/logicodev/onoff.lessrenamed+19−2

This diff is too big to show here.

searx/static/themes/oscar/less/logicodev/oscar.less → searx/static/themes/oscar/src/less/logicodev/oscar.lessrenamed

The content is the same.

searx/static/themes/oscar/src/less/logicodev/preferences.lessnew file+31

This diff is too big to show here.

searx/static/themes/oscar/src/less/logicodev/pygments.lessnew file+99

This diff is too big to show here.

searx/static/themes/oscar/less/logicodev/results.less → searx/static/themes/oscar/src/less/logicodev/results.lessrenamed+89−9

This diff is too big to show here.

searx/static/themes/oscar/src/less/logicodev/search.lessnew file+98

This diff is too big to show here.

searx/static/themes/oscar/less/logicodev/variables.less → searx/static/themes/oscar/src/less/logicodev/variables.lessrenamed+6−3

This diff is too big to show here.

searx/static/themes/oscar/less/pointhi/advanced.less → searx/static/themes/oscar/src/less/pointhi/advanced.lessrenamed

The content is the same.

searx/static/themes/oscar/less/pointhi/checkbox.less → searx/static/themes/oscar/src/less/pointhi/checkbox.lessrenamed

The content is the same.

searx/static/themes/oscar/src/less/pointhi/code.lessnew file+2

This diff is too big to show here.

searx/static/themes/oscar/less/pointhi/cursor.less → searx/static/themes/oscar/src/less/pointhi/cursor.lessrenamed

The content is the same.

searx/static/themes/oscar/less/pointhi/footer.less → searx/static/themes/oscar/src/less/pointhi/footer.lessrenamed

The content is the same.

searx/static/themes/oscar/src/less/pointhi/infobox.lessnew file+62

This diff is too big to show here.

searx/static/themes/oscar/less/pointhi/navbar.less → searx/static/themes/oscar/src/less/pointhi/navbar.lessrenamed

The content is the same.

searx/static/themes/oscar/less/pointhi/onoff.less → searx/static/themes/oscar/src/less/pointhi/onoff.lessrenamed

The content is the same.

searx/static/themes/oscar/less/pointhi/oscar.less → searx/static/themes/oscar/src/less/pointhi/oscar.lessrenamed+2

This diff is too big to show here.

searx/static/themes/oscar/src/less/pointhi/preferences.lessnew file+19

This diff is too big to show here.

searx/static/themes/oscar/src/less/pointhi/pygments.lessnew file+99

This diff is too big to show here.

searx/static/themes/oscar/less/pointhi/results.less → searx/static/themes/oscar/src/less/pointhi/results.lessrenamed+4

This diff is too big to show here.

searx/static/themes/oscar/less/pointhi/search.less → searx/static/themes/oscar/src/less/pointhi/search.lessrenamed+10

This diff is too big to show here.

searx/static/themes/pix-art/css/style.cssdeleted−1

This diff is too big to show here.

searx/static/themes/pix-art/img/favicon.pngdeleted

Binary file not shown.

searx/static/themes/pix-art/img/preference-icon-pixel.pngdeleted

Binary file not shown.

searx/static/themes/pix-art/img/search-icon-pixel.pngdeleted

Binary file not shown.

searx/static/themes/pix-art/img/searx-pixel-small.pngdeleted

Binary file not shown.

searx/static/themes/pix-art/img/searx-pixel.pngdeleted

Binary file not shown.

searx/static/themes/pix-art/js/searx.jsdeleted−141

This diff is too big to show here.

searx/static/themes/pix-art/less/definitions.lessdeleted−119

This diff is too big to show here.

searx/static/themes/pix-art/less/mixins.lessdeleted−27

This diff is too big to show here.

searx/static/themes/pix-art/less/search.lessdeleted−57

This diff is too big to show here.

searx/static/themes/pix-art/less/style.lessdeleted−451

This diff is too big to show here.

searx/static/themes/simple/.gitignorenew file+1

This diff is too big to show here.

searx/static/themes/simple/css/searx-rtl.css+167−83

This diff is too big to show here.

searx/static/themes/simple/css/searx-rtl.min.css+1−1

This diff is too big to show here.

searx/static/themes/simple/css/searx.css+167−83

This diff is too big to show here.

searx/static/themes/simple/css/searx.min.css+1−1

This diff is too big to show here.

searx/static/themes/simple/gruntfile.js+5−5

This diff is too big to show here.

searx/static/themes/simple/js/searx.head.js+1−1

This diff is too big to show here.

searx/static/themes/simple/js/searx.head.min.js+2−2

This diff is too big to show here.

searx/static/themes/simple/js/searx.head.min.js.map+1−1

This diff is too big to show here.

searx/static/themes/simple/js/searx.js+169−240

This diff is too big to show here.

searx/static/themes/simple/js/searx.min.js+5−4

This diff is too big to show here.

searx/static/themes/simple/js/searx.min.js.map+1−1

This diff is too big to show here.

searx/static/themes/simple/js/searx_head/00_init.js+1−1

This diff is too big to show here.

searx/static/themes/simple/js/searx_src/searx_mapresult.js−87

This diff is too big to show here.

searx/static/themes/simple/js/searx_src/searx_results.js+1−1

This diff is too big to show here.

searx/static/themes/simple/js/searx_src/searx_search.js+5−1

This diff is too big to show here.

searx/static/themes/simple/less/code.less+5−80

This diff is too big to show here.

searx/static/themes/simple/less/preferences.less+17

This diff is too big to show here.

searx/static/themes/simple/less/pygments.lessnew file+99

This diff is too big to show here.

searx/static/themes/simple/less/style.less+36

This diff is too big to show here.

searx/templates/__common__/about.html+92−53

This diff is too big to show here.

searx/templates/__common__/opensearch.xml+10−16

This diff is too big to show here.

searx/templates/__common__/opensearch_response_rss.xml+26−2

This diff is too big to show here.

searx/templates/courgette/404.htmldeleted−9

This diff is too big to show here.

searx/templates/courgette/about.htmldeleted−5

This diff is too big to show here.

searx/templates/courgette/base.htmldeleted−43

This diff is too big to show here.

searx/templates/courgette/categories.htmldeleted−9

This diff is too big to show here.

searx/templates/courgette/color.cssdeleted−34

This diff is too big to show here.

searx/templates/courgette/github_ribbon.htmldeleted−3

This diff is too big to show here.

searx/templates/courgette/index.htmldeleted−17

This diff is too big to show here.

searx/templates/courgette/preferences.htmldeleted−132

This diff is too big to show here.

searx/templates/courgette/result_templates/code.htmldeleted−11

This diff is too big to show here.

searx/templates/courgette/result_templates/default.htmldeleted−13

This diff is too big to show here.

searx/templates/courgette/result_templates/images.htmldeleted−6

This diff is too big to show here.

searx/templates/courgette/result_templates/key-value.htmldeleted−13

This diff is too big to show here.

searx/templates/courgette/result_templates/map.htmldeleted−13

This diff is too big to show here.

searx/templates/courgette/result_templates/torrent.htmldeleted−13

This diff is too big to show here.

searx/templates/courgette/result_templates/videos.htmldeleted−10

This diff is too big to show here.

searx/templates/courgette/results.htmldeleted−87

This diff is too big to show here.

searx/templates/courgette/search.htmldeleted−7

This diff is too big to show here.

searx/templates/courgette/stats.htmldeleted−22

This diff is too big to show here.

searx/templates/legacy/404.htmldeleted−9

This diff is too big to show here.

searx/templates/legacy/about.htmldeleted−5

This diff is too big to show here.

searx/templates/legacy/base.htmldeleted−38

This diff is too big to show here.

searx/templates/legacy/categories.htmldeleted−10

This diff is too big to show here.

searx/templates/legacy/github_ribbon.htmldeleted−3

This diff is too big to show here.

searx/templates/legacy/index.htmldeleted−18

This diff is too big to show here.

searx/templates/legacy/infobox.htmldeleted−51

This diff is too big to show here.

searx/templates/legacy/preferences.htmldeleted−129

This diff is too big to show here.

searx/templates/legacy/result_templates/code.htmldeleted−11

This diff is too big to show here.

searx/templates/legacy/result_templates/default.htmldeleted−6

This diff is too big to show here.

searx/templates/legacy/result_templates/images.htmldeleted−6

This diff is too big to show here.

searx/templates/legacy/result_templates/key-value.htmldeleted−13

This diff is too big to show here.

searx/templates/legacy/result_templates/map.htmldeleted−13

This diff is too big to show here.

searx/templates/legacy/result_templates/torrent.htmldeleted−13

This diff is too big to show here.

searx/templates/legacy/result_templates/videos.htmldeleted−6

This diff is too big to show here.

searx/templates/legacy/results.htmldeleted−100

This diff is too big to show here.

searx/templates/legacy/search.htmldeleted−8

This diff is too big to show here.

searx/templates/legacy/stats.htmldeleted−22

This diff is too big to show here.

searx/templates/oscar/404.html+1−1

This diff is too big to show here.

searx/templates/oscar/advanced.html+1−1

This diff is too big to show here.

searx/templates/oscar/base.html+21−22

This diff is too big to show here.

searx/templates/oscar/index.html+8−9

This diff is too big to show here.

searx/templates/oscar/infobox.html+16−3

This diff is too big to show here.

searx/templates/oscar/languages.html+3−1

This diff is too big to show here.

searx/templates/oscar/macros.html+87−48

This diff is too big to show here.

searx/templates/oscar/messages/no_results.html+1−1

This diff is too big to show here.

searx/templates/oscar/preferences.html+137−76

This diff is too big to show here.

searx/templates/oscar/result_templates/code.html+2−2

This diff is too big to show here.

searx/templates/oscar/result_templates/default.html+12−12

This diff is too big to show here.

searx/templates/oscar/result_templates/files.htmlnew file+55

This diff is too big to show here.

searx/templates/oscar/result_templates/images.html+2−2

This diff is too big to show here.

searx/templates/oscar/result_templates/key-value.html+3−3

This diff is too big to show here.

searx/templates/oscar/result_templates/map.html+60−56

This diff is too big to show here.

searx/templates/oscar/result_templates/products.htmlnew file+23

This diff is too big to show here.

searx/templates/oscar/result_templates/torrent.html+17−17

This diff is too big to show here.

searx/templates/oscar/result_templates/videos.html+20−18

This diff is too big to show here.

searx/templates/oscar/results.html+49−18

This diff is too big to show here.

searx/templates/oscar/search.html+3−2

This diff is too big to show here.

searx/templates/oscar/search_full.html+3−2

This diff is too big to show here.

searx/templates/oscar/time-range.html+3−1

This diff is too big to show here.

searx/templates/pix-art/404.htmldeleted−9

This diff is too big to show here.

searx/templates/pix-art/about.htmldeleted−4

This diff is too big to show here.

searx/templates/pix-art/base.htmldeleted−35

This diff is too big to show here.

searx/templates/pix-art/index.htmldeleted−12

This diff is too big to show here.

searx/templates/pix-art/preferences.htmldeleted−82

This diff is too big to show here.

searx/templates/pix-art/result_templates/default.htmldeleted−7

This diff is too big to show here.

searx/templates/pix-art/result_templates/images.htmldeleted−6

This diff is too big to show here.

searx/templates/pix-art/results.htmldeleted−32

This diff is too big to show here.

searx/templates/pix-art/search.htmldeleted−9

This diff is too big to show here.

searx/templates/pix-art/stats.htmldeleted−22

This diff is too big to show here.

searx/templates/simple/404.html+1−1

This diff is too big to show here.

searx/templates/simple/base.html+9−8

This diff is too big to show here.

searx/templates/simple/infobox.html+1−2

This diff is too big to show here.

searx/templates/simple/macros.html+3−3

This diff is too big to show here.

searx/templates/simple/messages/no_results.html+1−1

This diff is too big to show here.

searx/templates/simple/preferences.html+34−3

This diff is too big to show here.

searx/templates/simple/result_templates/map.html+35−52

This diff is too big to show here.

searx/templates/simple/results.html+24−9

This diff is too big to show here.

searx/templates/simple/search.html+2−2

This diff is too big to show here.

searx/testing.py+5−5

This diff is too big to show here.

searx/translations/ar/LC_MESSAGES/messages.mo

Binary file not shown.

searx/translations/ar/LC_MESSAGES/messages.po+308−224

This diff is too big to show here.

searx/translations/bg/LC_MESSAGES/messages.mo

Binary file not shown.

searx/translations/bg/LC_MESSAGES/messages.po+306−222

This diff is too big to show here.

searx/translations/bo/LC_MESSAGES/messages.mo

Binary file not shown.

searx/translations/bo/LC_MESSAGES/messages.po+325−240

This diff is too big to show here.

searx/translations/ca/LC_MESSAGES/messages.mo

Binary file not shown.

searx/translations/ca/LC_MESSAGES/messages.po+308−224

This diff is too big to show here.

searx/translations/cs/LC_MESSAGES/messages.mo

Binary file not shown.

searx/translations/cs/LC_MESSAGES/messages.po+383−297

This diff is too big to show here.

searx/translations/cy/LC_MESSAGES/messages.mo

Binary file not shown.

searx/translations/cy/LC_MESSAGES/messages.po+306−222

This diff is too big to show here.

searx/translations/da/LC_MESSAGES/messages.mo

Binary file not shown.

searx/translations/da/LC_MESSAGES/messages.po+308−224

This diff is too big to show here.

searx/translations/de/LC_MESSAGES/messages.mo

Binary file not shown.

searx/translations/de/LC_MESSAGES/messages.po+310−224

This diff is too big to show here.

searx/translations/el_GR/LC_MESSAGES/messages.mo

Binary file not shown.

searx/translations/el_GR/LC_MESSAGES/messages.po+306−222

This diff is too big to show here.

searx/translations/en/LC_MESSAGES/messages.mo

Binary file not shown.

searx/translations/eo/LC_MESSAGES/messages.mo

Binary file not shown.

searx/translations/eo/LC_MESSAGES/messages.po+310−226

This diff is too big to show here.

searx/translations/es/LC_MESSAGES/messages.mo

Binary file not shown.

searx/translations/es/LC_MESSAGES/messages.po+313−228

This diff is too big to show here.

searx/translations/et/LC_MESSAGES/messages.mo

Binary file not shown.

searx/translations/et/LC_MESSAGES/messages.po+322−237

This diff is too big to show here.

searx/translations/eu/LC_MESSAGES/messages.mo

Binary file not shown.

searx/translations/eu/LC_MESSAGES/messages.po+310−225

This diff is too big to show here.

searx/translations/fa_IR/LC_MESSAGES/messages.mo

Binary file not shown.

searx/translations/fa_IR/LC_MESSAGES/messages.po+312−227

This diff is too big to show here.

searx/translations/fi/LC_MESSAGES/messages.mo

Binary file not shown.

searx/translations/fi/LC_MESSAGES/messages.po+307−223

This diff is too big to show here.

searx/translations/fil/LC_MESSAGES/messages.mo

Binary file not shown.

searx/translations/fil/LC_MESSAGES/messages.po+308−224

This diff is too big to show here.

searx/translations/fr/LC_MESSAGES/messages.mo

Binary file not shown.

searx/translations/fr/LC_MESSAGES/messages.po+310−226

This diff is too big to show here.

searx/translations/gl/LC_MESSAGES/messages.mo

Binary file not shown.

searx/translations/gl/LC_MESSAGES/messages.po+342−257

This diff is too big to show here.

searx/translations/he/LC_MESSAGES/messages.mo

Binary file not shown.

searx/translations/he/LC_MESSAGES/messages.po+311−226

This diff is too big to show here.

searx/translations/hr/LC_MESSAGES/messages.mo

This diff is too big to show here.

searx/translations/hr/LC_MESSAGES/messages.po+313−228

This diff is too big to show here.

searx/translations/hu/LC_MESSAGES/messages.mo

This diff is too big to show here.

searx/translations/hu/LC_MESSAGES/messages.po+308−224

This diff is too big to show here.

searx/translations/ia/LC_MESSAGES/messages.mo

This diff is too big to show here.

searx/translations/ia/LC_MESSAGES/messages.po+308−224

This diff is too big to show here.

searx/translations/it/LC_MESSAGES/messages.mo

This diff is too big to show here.

searx/translations/it/LC_MESSAGES/messages.po+311−227

This diff is too big to show here.

searx/translations/ja/LC_MESSAGES/messages.mo

This diff is too big to show here.

searx/translations/ja/LC_MESSAGES/messages.po+308−224

This diff is too big to show here.

searx/translations/lt/LC_MESSAGES/messages.mo

This diff is too big to show here.

searx/translations/lt/LC_MESSAGES/messages.po+308−224

This diff is too big to show here.

searx/translations/nl/LC_MESSAGES/messages.mo

This diff is too big to show here.

searx/translations/nl/LC_MESSAGES/messages.po+309−224

This diff is too big to show here.

searx/translations/nl_BE/LC_MESSAGES/messages.mo

This diff is too big to show here.

searx/translations/nl_BE/LC_MESSAGES/messages.po+309−224

This diff is too big to show here.

searx/translations/oc/LC_MESSAGES/messages.mo

This diff is too big to show here.

searx/translations/oc/LC_MESSAGES/messages.po+309−225

This diff is too big to show here.

searx/translations/pl/LC_MESSAGES/messages.mo

This diff is too big to show here.

searx/translations/pt/LC_MESSAGES/messages.mo

This diff is too big to show here.

searx/translations/pt/LC_MESSAGES/messages.po+308−224

This diff is too big to show here.

searx/translations/pt_BR/LC_MESSAGES/messages.mo

This diff is too big to show here.

searx/translations/pt_BR/LC_MESSAGES/messages.po+309−224

This diff is too big to show here.

searx/translations/ro/LC_MESSAGES/messages.mo

This diff is too big to show here.

searx/translations/ro/LC_MESSAGES/messages.po+308−224

This diff is too big to show here.

searx/translations/ru/LC_MESSAGES/messages.mo

This diff is too big to show here.

searx/translations/ru/LC_MESSAGES/messages.po+311−226

This diff is too big to show here.

searx/translations/sk/LC_MESSAGES/messages.mo

This diff is too big to show here.

searx/translations/sk/LC_MESSAGES/messages.po+308−224

This diff is too big to show here.

searx/translations/sl/LC_MESSAGES/messages.mo

This diff is too big to show here.

searx/translations/sl/LC_MESSAGES/messages.po+307−223

This diff is too big to show here.

searx/translations/sr/LC_MESSAGES/messages.mo

This diff is too big to show here.

searx/translations/sr/LC_MESSAGES/messages.po+313−228

This diff is too big to show here.

searx/translations/sv/LC_MESSAGES/messages.mo

This diff is too big to show here.

searx/translations/sv/LC_MESSAGES/messages.po+311−227

This diff is too big to show here.

searx/translations/ta/LC_MESSAGES/messages.mo

This diff is too big to show here.

searx/translations/ta/LC_MESSAGES/messages.po+306−222

This diff is too big to show here.

searx/translations/te/LC_MESSAGES/messages.mo

This diff is too big to show here.

searx/translations/te/LC_MESSAGES/messages.po+306−222

This diff is too big to show here.

searx/translations/tr/LC_MESSAGES/messages.mo

This diff is too big to show here.

searx/translations/tr/LC_MESSAGES/messages.po+416−331

This diff is too big to show here.

searx/translations/uk/LC_MESSAGES/messages.mo

This diff is too big to show here.

searx/translations/uk/LC_MESSAGES/messages.po+308−224

This diff is too big to show here.

searx/translations/vi/LC_MESSAGES/messages.mo

This diff is too big to show here.

searx/translations/vi/LC_MESSAGES/messages.po+308−224

This diff is too big to show here.

searx/translations/zh_CN/LC_MESSAGES/messages.mo

This diff is too big to show here.

searx/translations/zh_CN/LC_MESSAGES/messages.po+310−225

This diff is too big to show here.

searx/translations/zh_Hant_TW/LC_MESSAGES/messages.mo

This diff is too big to show here.

searx/translations/zh_TW/LC_MESSAGES/messages.mo

This diff is too big to show here.

searx/translations/zh_TW/LC_MESSAGES/messages.po+309−224

This diff is too big to show here.

searx/url_utils.py−30

This diff is too big to show here.

searx/utils.py+366−218

This diff is too big to show here.

searx/version.py+2−2

This diff is too big to show here.

searx/webadapter.py+250

This diff is too big to show here.

searx/webapp.py+469−256

This diff is too big to show here.

searx/webutils.py+148

This diff is too big to show here.

searx_extra/__init__.py

This diff is too big to show here.

searx_extra/google_search.py

This diff is too big to show here.

searx_extra/standalone_searx.py+217

This diff is too big to show here.

searx_extra/update/__init__.py

This diff is too big to show here.

searx_extra/update/update_ahmia_blacklist.py+30

This diff is too big to show here.

searx_extra/update/update_currencies.py+150

This diff is too big to show here.

searx_extra/update/update_engine_descriptions.py+202

This diff is too big to show here.

searx_extra/update/update_external_bangs.py+157

This diff is too big to show here.

searx_extra/update/update_firefox_version.py+3−8

This diff is too big to show here.

searx_extra/update/update_languages.py+205

This diff is too big to show here.

searx_extra/update/update_osm_keys_tags.py+209

This diff is too big to show here.

searx_extra/update/update_pygments.py+138

This diff is too big to show here.

searx_extra/update/update_translations.sh

This diff is too big to show here.

searx_extra/update/update_wikidata_units.py+54

This diff is too big to show here.

setup.py+11−7

This diff is too big to show here.

tests/__init__.py+2

This diff is too big to show here.

tests/test_robot.py−23

This diff is too big to show here.

tests/unit/engines/test_command.py+240

This diff is too big to show here.

tests/unit/engines/test_xpath.py+121

This diff is too big to show here.

tests/unit/network/__init__.py

This diff is too big to show here.

tests/unit/network/test_network.py+239

This diff is too big to show here.

tests/unit/settings/empty_settings.yml

This diff is too big to show here.

tests/unit/settings/syntaxerror_settings.yml+2

This diff is too big to show here.

tests/unit/settings/user_settings.yml+111

This diff is too big to show here.

tests/unit/settings/user_settings_keep_only.yml+14

This diff is too big to show here.

tests/unit/settings/user_settings_remove.yml+10

This diff is too big to show here.

tests/unit/settings/user_settings_remove2.yml+15

This diff is too big to show here.

tests/unit/settings/user_settings_simple.yml+9

This diff is too big to show here.

tests/unit/test_answerers.py+2−2

This diff is too big to show here.

tests/unit/test_engines_init.py+44

This diff is too big to show here.

tests/unit/test_external_bangs.py+117

This diff is too big to show here.

tests/unit/test_plugins.py+73−19

This diff is too big to show here.

tests/unit/test_preferences.py+25−29

This diff is too big to show here.

tests/unit/test_query.py+219−35

This diff is too big to show here.

tests/unit/test_results.py+4−4

This diff is too big to show here.

tests/unit/test_search.py+45−57

This diff is too big to show here.

tests/unit/test_settings_loader.py+122

This diff is too big to show here.

tests/unit/test_standalone_searx.py+111

This diff is too big to show here.

tests/unit/test_utils.py+145−68

This diff is too big to show here.

tests/unit/test_webadapter.py+54

This diff is too big to show here.

tests/unit/test_webapp.py+85−17

This diff is too big to show here.

tests/unit/test_webutils.py+87

This diff is too big to show here.

utils/brand.env+9

This diff is too big to show here.

utils/build_env.py+38

This diff is too big to show here.

utils/fabfile.py−117

This diff is too big to show here.

utils/fetch_currencies.py−163

This diff is too big to show here.

utils/fetch_languages.py−194

This diff is too big to show here.

utils/filtron.sh+120−28

This diff is too big to show here.

utils/lib.sh+787−72

This diff is too big to show here.

utils/lxc-searx.env+47−12

This diff is too big to show here.

utils/lxc.sh+221−184

This diff is too big to show here.

utils/makefile.include+25−50

This diff is too big to show here.

utils/makefile.lxc+32

This diff is too big to show here.

utils/makefile.python−290

This diff is too big to show here.

utils/makefile.sphinx−216

This diff is too big to show here.

utils/morty.sh+156−48

This diff is too big to show here.

utils/searx.sh+288−102

This diff is too big to show here.

utils/standalone_searx.py−104

This diff is too big to show here.

utils/templates/etc/apache2+1

This diff is too big to show here.

utils/templates/etc/apache2/sites-available/searx.conf:uwsgi−27

This diff is too big to show here.

utils/templates/etc/filtron/rules.json+115−113

This diff is too big to show here.

utils/templates/etc/httpd/sites-available/morty.conf+8−8

This diff is too big to show here.

utils/templates/etc/httpd/sites-available/searx.conf:filtron+8−8

This diff is too big to show here.

utils/templates/etc/httpd/sites-available/searx.conf:uwsgi+27

This diff is too big to show here.

utils/templates/etc/nginx/default.apps-available/morty.conf+11

This diff is too big to show here.

utils/templates/etc/nginx/default.apps-available/searx.conf:filtron+16

This diff is too big to show here.

utils/templates/etc/searx/use_default_settings.yml+22

This diff is too big to show here.

utils/templates/etc/uwsgi/apps-archlinux/searx.ini+12−4

This diff is too big to show here.

utils/templates/etc/uwsgi/apps-archlinux/searx.ini:socket+85

This diff is too big to show here.

utils/templates/etc/uwsgi/apps-available/searx.ini+12−4

This diff is too big to show here.

utils/templates/etc/uwsgi/apps-available/searx.ini:socket+84

This diff is too big to show here.

utils/templates/lib/systemd/system/morty.service+1−1

This diff is too big to show here.