on master help sign in
955 files changed+216651−41655
since splitsnapshots
unifiedsplit
.codecov.yml+31 .config.sh+59 .coveragerc+1−10 .dir-locals.el+133 .dockerignore+56 .gitattributes+10 .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+13−1 .pylintrc+444 .travis.yml−36 AUTHORS.rst+109−4 CHANGELOG.rst+507−1 CONTRIBUTING.md+49 Dockerfile+78−38 Makefile+107 PULL_REQUEST_TEMPLATE.md+25 README.rst+60−32 dockerfiles/docker-entrypoint.sh+145 dockerfiles/uwsgi.ini+47 docs/_themes/searx/static/searx.css+140 docs/_themes/searx/theme.conf+6 docs/admin/api.rst+96 docs/admin/arch_public.dot+33 docs/admin/architecture.rst+28 docs/admin/buildhosts.rst+155 docs/admin/engines.rst+88 docs/admin/engines/recoll.rst+50 docs/admin/filtron.rst+191 docs/admin/index.rst+23 docs/admin/installation-apache.rst+515 docs/admin/installation-docker.rst+60 docs/admin/installation-nginx.rst+383 docs/admin/installation-searx.rst+120 docs/admin/installation-uwsgi.rst+150 docs/admin/installation.rst+86 docs/admin/morty.rst+40 docs/admin/plugins.rst+39 docs/admin/settings.rst+394 docs/admin/update-searx.rst+59 docs/blog/admin.rst+43 docs/blog/command-line-engines.rst+65 docs/blog/index.rst+17 docs/blog/intro-offline.rst+77 docs/blog/lxcdev-202006.rst+413 docs/blog/private-engines.rst+65 docs/blog/python3.rst+68 docs/blog/search-database-engines.rst+95 docs/blog/search-indexer-engines.rst+114 docs/blog/searx-admin-engines.png docs/blog/searxpy3.png docs/blog/sql-engines.rst+117 docs/build-templates/filtron.rst+52 docs/build-templates/morty.rst+52 docs/build-templates/searx.rst+210 docs/conf.py+131 docs/dev/contribution_guide.rst+189 docs/dev/csv_table.txt+6 docs/dev/engine_overview.rst+306 docs/dev/hello.dot+3 docs/dev/index.rst+16 docs/dev/makefile.rst+222 docs/dev/plugins.rst+69 docs/dev/quickstart.rst+55 docs/dev/reST.rst+1436 docs/dev/search_api.rst+120 docs/dev/svg_image.svg+10 docs/dev/translation.rst+71 docs/index.rst+37 docs/searx_extra/index.rst+14 docs/searx_extra/standalone_searx.py.rst+9 docs/static/img/searx_logo_small.png docs/user/index.rst+10 docs/user/own-instance.rst+79 docs/user/search_syntax.rst+66 docs/utils/filtron.sh.rst+80 docs/utils/index.rst+52 docs/utils/lxc.sh.rst+149 docs/utils/morty.sh.rst+80 docs/utils/searx.sh.rst+39 manage+504 manage.sh−96 requirements-dev.txt+20−10 requirements.txt+16−12 searx/__init__.py+58−28 searx/answerers/__init__.py+3−3 searx/answerers/random/answerer.py+26−9 searx/answerers/statistics/answerer.py+3−2 searx/autocomplete.py+48−87 searx/data/__init__.py+50 searx/data/ahmia_blacklist.txt+35730 searx/data/currencies.json+14638−7602 searx/data/engines_languages.json+28588 searx/data/external_bangs.json+19068 searx/data/external_urls.json+156 searx/data/osm_keys_tags.json+15416 searx/data/useragents.json+13 searx/data/wikidata_units.json+1223 searx/engines/1337x.py+53 searx/engines/__init__.py+131−30 searx/engines/ahmia.py+85 searx/engines/apkmirror.py+68 searx/engines/archlinux.py+22−19 searx/engines/arxiv.py+75 searx/engines/bandcamp.py+73 searx/engines/base.py+14−18 searx/engines/bing.py+73−32 searx/engines/bing_images.py+55−55 searx/engines/bing_news.py+25−22 searx/engines/bing_videos.py+101 searx/engines/blekko_images.py−70 searx/engines/btdigg.py+32−36 searx/engines/ccengine.py+53 searx/engines/command.py+172 searx/engines/core.py+82 searx/engines/currency_convert.py+26−73 searx/engines/dailymotion.py+37−15 searx/engines/deezer.py+14−12 searx/engines/deviantart.py+47−54 searx/engines/dictzone.py+24−32 searx/engines/digbt.py+14−12 searx/engines/digg.py+47−52 searx/engines/doku.py+24−21 searx/engines/duckduckgo.py+152−70 searx/engines/duckduckgo_definitions.py+180−75 searx/engines/duckduckgo_images.py+94 searx/engines/duden.py+77 searx/engines/dummy-offline.py+20 searx/engines/dummy.py+11−3 searx/engines/ebay.py+73 searx/engines/elasticsearch.py+144 searx/engines/etools.py+56 searx/engines/faroo.py−116 searx/engines/fdroid.py+27−25 searx/engines/filecrop.py−85 searx/engines/flickr.py+12−10 searx/engines/flickr_noapi.py+52−42 searx/engines/framalibre.py+72 searx/engines/freesound.py+69 searx/engines/frinkiac.py+16−9 searx/engines/generalfile.py−62 searx/engines/genius.py+90 searx/engines/gentoo.py+129 searx/engines/gigablast.py+112−58 searx/engines/github.py+13−10 searx/engines/google.py+284−300 searx/engines/google_images.py+184−70 searx/engines/google_news.py+168−52 searx/engines/google_scholar.py+156 searx/engines/google_videos.py+201 searx/engines/imdb.py+55 searx/engines/ina.py+25−23 searx/engines/invidious.py+122 searx/engines/json_engine.py+41−11 searx/engines/kickass.py+13−12 searx/engines/loc.py+68 searx/engines/mediathekviewweb.py+68 searx/engines/mediawiki.py+19−17 searx/engines/meilisearch.py+59 searx/engines/microsoft_academic.py+73 searx/engines/mixcloud.py+12−9 searx/engines/mongodb.py+61 searx/engines/mysql_server.py+62 searx/engines/nyaa.py+51−57 searx/engines/onesearch.py+57 searx/engines/opensemantic.py+46 searx/engines/openstreetmap.py+416−74 searx/engines/pdbe.py+19−13 searx/engines/peertube.py+96 searx/engines/photon.py+15−13 searx/engines/piratebay.py+72−68 searx/engines/postgresql.py+69 searx/engines/prowlarr.py+80 searx/engines/pubmed.py+105 searx/engines/qwant.py+213−68 searx/engines/recoll.py+111 searx/engines/reddit.py+13−12 searx/engines/redis_server.py+69 searx/engines/rumble.py+81 searx/engines/scanr_structures.py+12−11 searx/engines/searchcode_code.py+14−13 searx/engines/searchcode_doc.py−50 searx/engines/searx_engine.py+10−8 searx/engines/seedpeer.py−77 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+31−21 searx/engines/spotify.py+29−12 searx/engines/springer.py+74 searx/engines/sqlite.py+51 searx/engines/stackexchange.py+67 searx/engines/stackoverflow.py−59 searx/engines/startpage.py+183−37 searx/engines/subtitleseeker.py−80 searx/engines/swisscows.py−108 searx/engines/tineye.py+86 searx/engines/tokyotoshokan.py+18−18 searx/engines/torrentz.py+35−28 searx/engines/translated.py+18−31 searx/engines/twitter.py−83 searx/engines/unsplash.py+55 searx/engines/vimeo.py+16−15 searx/engines/wikidata.py+644−439 searx/engines/wikipedia.py+72−74 searx/engines/wolframalpha_api.py+30−26 searx/engines/wolframalpha_noapi.py+21−16 searx/engines/wordnik.py+77 searx/engines/www1x.py+22−48 searx/engines/www500px.py−74 searx/engines/xpath.py+52−79 searx/engines/xpath_flex.py+121 searx/engines/yacy.py+34−19 searx/engines/yahoo.py+114−86 searx/engines/yahoo_news.py+90−83 searx/engines/yandex.py−62 searx/engines/yggtorrent.py+128 searx/engines/youtube_api.py+21−13 searx/engines/youtube_noapi.py+123−52 searx/exceptions.py+103 searx/external_bang.py+89 searx/external_urls.py+89 searx/languages.py+70−77 tests/unit/engines/__init__.py → 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+115−11 searx/plugins/ahmia_filter.py+33 searx/plugins/doai_rewrite.py−31 searx/plugins/hash_plugin.py+54 searx/plugins/hostname_replace.py+28 searx/plugins/https_rewrite.py+5−1 searx/plugins/infinite_scroll.py+1 searx/plugins/oa_doi_rewrite.py+48 searx/plugins/open_results_on_new_tab.py−24 searx/plugins/search_on_category_select.py+1 searx/plugins/self_info.py+4−6 searx/plugins/tracker_url_remover.py+19−10 searx/plugins/vim_hotkeys.py+1 searx/poolrequests.py−112 searx/preferences.py+316−64 searx/query.py+298−116 searx/results.py+178−74 searx/search.py−404 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+1356−183 searx/settings_loader.py+132 searx/settings_robot.yml+21−7 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/css/infinite_scroll.css+3 searx/static/plugins/external_plugins/.gitignore+3 searx/static/plugins/js/infinite_scroll.js+34−12 searx/static/plugins/js/open_results_on_new_tab.js−3 searx/static/plugins/js/search_on_category_select.js+24−1 searx/static/plugins/js/vim_hotkeys.js+12−3 searx/static/themes/__common__/js/image_layout.js+163 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/js/searx.js−45 searx/static/themes/courgette/less/style-rtl.less−42 searx/static/themes/courgette/less/style.less−691 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−739 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+936 searx/static/themes/oscar/css/logicodev-dark.min.css+1 searx/static/themes/oscar/css/logicodev-dark.min.css.map+1 searx/static/themes/oscar/css/logicodev.css+1145 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+693 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+90−28 searx/static/themes/oscar/img/favicon.png searx/static/themes/oscar/img/icons/1337x.png searx/static/themes/oscar/img/icons/amazon.png searx/static/themes/oscar/img/icons/bandcamp.png searx/static/themes/oscar/img/icons/dailymotion.png searx/static/themes/oscar/img/icons/flickr.png searx/static/themes/oscar/img/icons/github.png searx/static/themes/oscar/img/icons/invidious.png searx/static/themes/oscar/img/icons/searchcode code.png searx/static/themes/oscar/img/icons/searchcode doc.png searx/static/themes/oscar/img/icons/soundcloud.png searx/static/themes/oscar/img/icons/youtube.png searx/static/themes/oscar/img/loader.gif searx/static/themes/oscar/img/logo_searx_a.png searx/static/themes/oscar/img/logo_searx_a_n.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.png searx/static/themes/oscar/img/map/marker-icon.png searx/static/themes/oscar/img/map/marker-shadow.png searx/static/themes/oscar/img/searx_logo.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+474 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/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/advanced.less−72 searx/static/themes/oscar/less/logicodev/code.less−103 searx/static/themes/oscar/less/logicodev/infobox.less−37 searx/static/themes/oscar/less/logicodev/navbar.less−89 searx/static/themes/oscar/less/logicodev/search.less−56 searx/static/themes/oscar/less/pointhi/code.less−79 searx/static/themes/oscar/less/pointhi/infobox.less−11 searx/static/themes/oscar/less/pointhi/navbar.less−28 searx/static/themes/oscar/package.json+14−7 searx/static/themes/oscar/js/searx_src/00_requirejs_config.js → searx/static/themes/oscar/src/js/01_init.js+34−23 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+117−99 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/src/less/logicodev-dark/oscar.less+257 searx/static/themes/oscar/src/less/logicodev/advanced.less+49 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/src/less/logicodev/navbar.less+30 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+2 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+113−13 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−2 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/src/less/pointhi/navbar.less+20 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+4 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+13−1 searx/static/themes/oscar/less/pointhi/search.less → searx/static/themes/oscar/src/less/pointhi/search.less+11 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/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/.jshintignore+1 searx/static/themes/simple/css/searx-rtl.css+2261 searx/static/themes/simple/css/searx-rtl.min.css+1 searx/static/themes/simple/css/searx.css+2257 searx/static/themes/simple/css/searx.min.css+1 searx/static/themes/simple/fonts/ion.css+139 searx/static/themes/simple/fonts/ion.eot searx/static/themes/simple/fonts/ion.html+268 searx/static/themes/simple/fonts/ion.svg+105 searx/static/themes/simple/fonts/ion.ttf searx/static/themes/simple/fonts/ion.woff searx/static/themes/simple/fonts/ion.woff2 searx/static/themes/simple/gruntfile.js+161 searx/static/themes/simple/img/favicon.png searx/static/themes/simple/img/logo_searx_a.png searx/static/themes/simple/img/searx.png searx/static/themes/courgette/img/searx_logo.svg → searx/static/themes/simple/img/searx_logo.svg searx/static/themes/simple/js/searx.head.js+40 searx/static/themes/simple/js/searx.head.min.js+4 searx/static/themes/simple/js/searx.head.min.js.map+1 searx/static/themes/simple/js/searx.js+1502 searx/static/themes/simple/js/searx.min.js+26 searx/static/themes/simple/js/searx.min.js.map+1 searx/static/themes/simple/js/searx_head/00_init.js+40 searx/static/themes/simple/js/searx_src/00_searx_toolkit.js+164 searx/static/themes/simple/js/searx_src/autocomplete.js+536 searx/static/themes/simple/js/searx_src/searx_keyboard.js+366 searx/static/themes/simple/js/searx_src/searx_mapresult.js+89 searx/static/themes/simple/js/searx_src/searx_results.js+63 searx/static/themes/simple/js/searx_src/searx_search.js+121 searx/static/themes/simple/leaflet/images/layers-2x.png searx/static/themes/simple/leaflet/images/layers.png searx/static/themes/oscar/img/map/marker-icon-2x-green.png → searx/static/themes/simple/leaflet/images/marker-icon-2x-green.png searx/static/themes/oscar/img/map/marker-icon-2x-orange.png → searx/static/themes/simple/leaflet/images/marker-icon-2x-orange.png searx/static/themes/oscar/img/map/marker-icon-2x-red.png → searx/static/themes/simple/leaflet/images/marker-icon-2x-red.png searx/static/themes/simple/leaflet/images/marker-icon-2x.png searx/static/themes/oscar/img/map/marker-icon-green.png → searx/static/themes/simple/leaflet/images/marker-icon-green.png searx/static/themes/oscar/img/map/marker-icon-orange.png → searx/static/themes/simple/leaflet/images/marker-icon-orange.png searx/static/themes/oscar/img/map/marker-icon-red.png → searx/static/themes/simple/leaflet/images/marker-icon-red.png searx/static/themes/simple/leaflet/images/marker-icon.png searx/static/themes/simple/leaflet/images/marker-shadow.png searx/static/themes/simple/leaflet/leaflet.css+636 searx/static/themes/simple/leaflet/leaflet.js+5 searx/static/themes/simple/less/autocomplete.less+69 searx/static/themes/simple/less/code.less+8 searx/static/themes/pix-art/less/definitions.less → searx/static/themes/simple/less/definitions.less+25−9 searx/static/themes/simple/less/index.less+43 searx/static/themes/simple/less/ion.less+181 searx/static/themes/simple/less/mixins.less+62 searx/static/themes/simple/less/normalize.less+341 searx/static/themes/simple/less/preferences.less+120 searx/static/themes/simple/less/pygments.less+99 searx/static/themes/simple/less/search.less+264 searx/static/themes/simple/less/stats.less+8 searx/static/themes/simple/less/style-rtl.less+6 searx/static/themes/simple/less/style.less+757 searx/static/themes/simple/less/toolkit.less+468 searx/static/themes/simple/less/toolkit_loader.less+41 searx/static/themes/simple/magnet.svg+1 searx/static/themes/simple/package.json+20 searx/templates/__common__/about.html+102 searx/templates/__common__/opensearch.xml+22 searx/templates/legacy/opensearch_response_rss.xml → searx/templates/__common__/opensearch_response_rss.xml+32−2 searx/templates/courgette/404.html−9 searx/templates/courgette/about.html−66 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/opensearch.xml−28 searx/templates/courgette/opensearch_response_rss.xml−23 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/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/about.html−66 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/opensearch.xml−28 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/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/oscar/404.html+1−1 searx/templates/oscar/about.html+1−62 searx/templates/oscar/advanced.html+13−5 searx/templates/oscar/base.html+42−32 searx/templates/oscar/categories.html+9−9 searx/templates/oscar/index.html+8−9 searx/templates/oscar/infobox.html+32−18 searx/templates/oscar/languages.html+10 searx/templates/oscar/macros.html+146−88 searx/templates/oscar/messages/no_results.html+12−4 searx/templates/oscar/navbar.html+8−13 searx/templates/oscar/opensearch.xml−28 searx/templates/oscar/opensearch_response_rss.xml−23 searx/templates/oscar/preferences.html+164−79 searx/templates/oscar/result_templates/code.html+18−18 searx/templates/oscar/result_templates/default.html+31−31 searx/templates/oscar/result_templates/files.html+55 searx/templates/oscar/result_templates/images.html+36−39 searx/templates/oscar/result_templates/key-value.html+19 searx/templates/oscar/result_templates/map.html+76−72 searx/templates/oscar/result_templates/products.html+23 searx/templates/oscar/result_templates/torrent.html+17−17 searx/templates/oscar/result_templates/videos.html+29−27 searx/templates/oscar/results.html+187−146 searx/templates/oscar/search.html+25−12 searx/templates/oscar/search_full.html+19−18 searx/templates/oscar/time-range.html+13−11 searx/templates/pix-art/404.html−9 searx/templates/pix-art/about.html−65 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+2−2 searx/templates/simple/about.html+4 searx/templates/simple/base.html+64 searx/templates/simple/categories.html+8 searx/templates/simple/index.html+12 searx/templates/simple/infobox.html+50 searx/templates/simple/languages.html+8 searx/templates/simple/macros.html+85 searx/templates/simple/messages/no_results.html+17 searx/templates/simple/preferences.html+267 searx/templates/simple/result_templates/code.html+13 searx/templates/simple/result_templates/default.html+17 searx/templates/simple/result_templates/images.html+4 searx/templates/simple/result_templates/key-value.html+11 searx/templates/simple/result_templates/map.html+51 searx/templates/simple/result_templates/torrent.html+24 searx/templates/simple/result_templates/videos.html+15 searx/templates/simple/results.html+179 searx/templates/simple/search.html+18 searx/templates/simple/simple.spec.txt+40 searx/templates/simple/stats.html+4−1 searx/templates/simple/time-range.html+17 searx/testing.py+57−26 searx/translations/ar/LC_MESSAGES/messages.mo searx/translations/ar/LC_MESSAGES/messages.po+1084 searx/translations/bg/LC_MESSAGES/messages.mo searx/translations/bg/LC_MESSAGES/messages.po+518−211 searx/translations/bo/LC_MESSAGES/messages.mo searx/translations/bo/LC_MESSAGES/messages.po+1083 searx/translations/ca/LC_MESSAGES/messages.mo searx/translations/ca/LC_MESSAGES/messages.po+1084 searx/translations/cs/LC_MESSAGES/messages.mo searx/translations/cs/LC_MESSAGES/messages.po+1086 searx/translations/cy/LC_MESSAGES/messages.mo searx/translations/cy/LC_MESSAGES/messages.po+1082 searx/translations/da/LC_MESSAGES/messages.mo searx/translations/da/LC_MESSAGES/messages.po+1083 searx/translations/de/LC_MESSAGES/messages.mo searx/translations/de/LC_MESSAGES/messages.po+549−233 searx/translations/el_GR/LC_MESSAGES/messages.mo searx/translations/el_GR/LC_MESSAGES/messages.po+551−244 searx/translations/en/LC_MESSAGES/messages.mo searx/translations/eo/LC_MESSAGES/messages.mo searx/translations/eo/LC_MESSAGES/messages.po+613−304 searx/translations/es/LC_MESSAGES/messages.mo searx/translations/es/LC_MESSAGES/messages.po+534−223 searx/translations/et/LC_MESSAGES/messages.mo searx/translations/et/LC_MESSAGES/messages.po+1083 searx/translations/eu/LC_MESSAGES/messages.mo searx/translations/eu/LC_MESSAGES/messages.po+1085 searx/translations/fa_IR/LC_MESSAGES/messages.mo searx/translations/fa_IR/LC_MESSAGES/messages.po+1087 searx/translations/fi/LC_MESSAGES/messages.mo searx/translations/fi/LC_MESSAGES/messages.po+1082 searx/translations/fil/LC_MESSAGES/messages.mo searx/translations/fil/LC_MESSAGES/messages.po+1083 searx/translations/fr/LC_MESSAGES/messages.mo searx/translations/fr/LC_MESSAGES/messages.po+519−210 searx/translations/gl/LC_MESSAGES/messages.mo searx/translations/gl/LC_MESSAGES/messages.po+1083 searx/translations/he/LC_MESSAGES/messages.mo searx/translations/he/LC_MESSAGES/messages.po+522−215 searx/translations/hr/LC_MESSAGES/messages.mo searx/translations/hr/LC_MESSAGES/messages.po+1083 searx/translations/hu/LC_MESSAGES/messages.mo searx/translations/hu/LC_MESSAGES/messages.po+511−204 searx/translations/ia/LC_MESSAGES/messages.mo searx/translations/ia/LC_MESSAGES/messages.po+1082 searx/translations/it/LC_MESSAGES/messages.mo searx/translations/it/LC_MESSAGES/messages.po+619−307 searx/translations/ja/LC_MESSAGES/messages.mo searx/translations/ja/LC_MESSAGES/messages.po+548−240 searx/translations/lt/LC_MESSAGES/messages.mo searx/translations/lt/LC_MESSAGES/messages.po+1082 searx/translations/nl/LC_MESSAGES/messages.mo searx/translations/nl/LC_MESSAGES/messages.po+554−246 searx/translations/nl_BE/LC_MESSAGES/messages.mo searx/translations/nl_BE/LC_MESSAGES/messages.po+1083 searx/translations/oc/LC_MESSAGES/messages.mo searx/translations/oc/LC_MESSAGES/messages.po+1083 searx/translations/pl/LC_MESSAGES/messages.mo searx/translations/pl/LC_MESSAGES/messages.po+1014 searx/translations/pt/LC_MESSAGES/messages.mo searx/translations/pt/LC_MESSAGES/messages.po+664−287 searx/translations/pt_BR/LC_MESSAGES/messages.mo searx/translations/pt_BR/LC_MESSAGES/messages.po+544−231 searx/translations/ro/LC_MESSAGES/messages.mo searx/translations/ro/LC_MESSAGES/messages.po+554−245 searx/translations/ru/LC_MESSAGES/messages.mo searx/translations/ru/LC_MESSAGES/messages.po+583−273 searx/translations/sk/LC_MESSAGES/messages.mo searx/translations/sk/LC_MESSAGES/messages.po+1082 searx/translations/sl/LC_MESSAGES/messages.mo searx/translations/sl/LC_MESSAGES/messages.po+1082 searx/translations/sr/LC_MESSAGES/messages.mo searx/translations/sr/LC_MESSAGES/messages.po+1084 searx/translations/sv/LC_MESSAGES/messages.mo searx/translations/sv/LC_MESSAGES/messages.po+1084 searx/translations/ta/LC_MESSAGES/messages.mo searx/translations/ta/LC_MESSAGES/messages.po+1087 searx/translations/te/LC_MESSAGES/messages.mo searx/translations/te/LC_MESSAGES/messages.po+1082 searx/translations/tr/LC_MESSAGES/messages.mo searx/translations/tr/LC_MESSAGES/messages.po+590−282 searx/translations/uk/LC_MESSAGES/messages.mo searx/translations/uk/LC_MESSAGES/messages.po+1085 searx/translations/vi/LC_MESSAGES/messages.mo searx/translations/vi/LC_MESSAGES/messages.po+1082 searx/translations/zh_CN/LC_MESSAGES/messages.mo searx/translations/zh_CN/LC_MESSAGES/messages.po+563−251 searx/translations/zh_Hant_TW/LC_MESSAGES/messages.mo searx/translations/zh_Hant_TW/LC_MESSAGES/messages.po+1014 searx/translations/zh_TW/LC_MESSAGES/messages.mo searx/translations/zh_TW/LC_MESSAGES/messages.po+1086 searx/utils.py+488−173 searx/version.py+2−2 searx/webadapter.py+250 searx/webapp.py+668−247 searx/webutils.py+148 searx_extra/__init__.py searx_extra/google_search.py+2−3 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+68 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+3−3 searx_extra/update/update_wikidata_units.py+54 setup.py+16−12 tests/__init__.py+2 tests/robot/__init__.py+75 tests/robot/test_basic.robot−153 tests/test_robot.py−23 tests/unit/engines/seedpeer_fixture.html−110 tests/unit/engines/test_archlinux.py−106 tests/unit/engines/test_bing.py−88 tests/unit/engines/test_bing_images.py−123 tests/unit/engines/test_bing_news.py−146 tests/unit/engines/test_blekko_images.py−71 tests/unit/engines/test_btdigg.py−384 tests/unit/engines/test_command.py+240 tests/unit/engines/test_currency_convert.py−43 tests/unit/engines/test_dailymotion.py−74 tests/unit/engines/test_deezer.py−57 tests/unit/engines/test_deviantart.py−95 tests/unit/engines/test_digbt.py−61 tests/unit/engines/test_digg.py−101 tests/unit/engines/test_doku.py−79 tests/unit/engines/test_duckduckgo.py−75 tests/unit/engines/test_duckduckgo_definitions.py−250 tests/unit/engines/test_dummy.py−26 tests/unit/engines/test_faroo.py−116 tests/unit/engines/test_fdroid.py−49 tests/unit/engines/test_flickr.py−142 tests/unit/engines/test_flickr_noapi.py−329 tests/unit/engines/test_frinkiac.py−49 tests/unit/engines/test_gigablast.py−85 tests/unit/engines/test_github.py−61 tests/unit/engines/test_google.py−179 tests/unit/engines/test_google_images.py−42 tests/unit/engines/test_google_news.py−50 tests/unit/engines/test_ina.py−64 tests/unit/engines/test_kickass.py−397 tests/unit/engines/test_mediawiki.py−130 tests/unit/engines/test_mixcloud.py−67 tests/unit/engines/test_nyaa.py−66 tests/unit/engines/test_openstreetmap.py−199 tests/unit/engines/test_pdbe.py−109 tests/unit/engines/test_photon.py−166 tests/unit/engines/test_piratebay.py−166 tests/unit/engines/test_qwant.py−317 tests/unit/engines/test_reddit.py−71 tests/unit/engines/test_scanr_structures.py−175 tests/unit/engines/test_searchcode_code.py−75 tests/unit/engines/test_searchcode_doc.py−70 tests/unit/engines/test_seedpeer.py−51 tests/unit/engines/test_soundcloud.py−192 tests/unit/engines/test_spotify.py−124 tests/unit/engines/test_stackoverflow.py−106 tests/unit/engines/test_startpage.py−140 tests/unit/engines/test_subtitleseeker.py−169 tests/unit/engines/test_swisscows.py−128 tests/unit/engines/test_tokyotoshokan.py−110 tests/unit/engines/test_torrentz.py−91 tests/unit/engines/test_twitter.py−502 tests/unit/engines/test_vimeo.py−36 tests/unit/engines/test_wikidata.py−504 tests/unit/engines/test_wikipedia.py−160 tests/unit/engines/test_wolframalpha_api.py−166 tests/unit/engines/test_wolframalpha_noapi.py−224 tests/unit/engines/test_www1x.py−57 tests/unit/engines/test_www500px.py−34 tests/unit/engines/test_xpath.py+121 tests/unit/engines/test_yacy.py−96 tests/unit/engines/test_yahoo.py−149 tests/unit/engines/test_yahoo_news.py−149 tests/unit/engines/test_youtube_api.py−111 tests/unit/engines/test_youtube_noapi.py−174 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+78−28 tests/unit/test_preferences.py+62−25 tests/unit/test_query.py+290 tests/unit/test_results.py+4−4 tests/unit/test_search.py+93−3 tests/unit/test_settings_loader.py+122 tests/unit/test_standalone_searx.py+111 tests/unit/test_utils.py+173−46 tests/unit/test_webadapter.py+54 tests/unit/test_webapp.py+126−35 tests/unit/test_webutils.py+87 utils/brand.env+9 utils/build_env.py+38 utils/fabfile.py−117 utils/fetch_currencies.py−161 utils/filtron.sh+561 utils/lib.sh+1845 utils/lxc-searx.env+97 utils/lxc.sh+560 utils/makefile.include+103 utils/makefile.lxc+32 utils/morty.sh+546 utils/searx.sh+914 utils/templates/etc/apache2+1 utils/templates/etc/filtron/rules.json+129 utils/templates/etc/httpd/sites-available/morty.conf+28 utils/templates/etc/httpd/sites-available/searx.conf:filtron+33 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+88 utils/templates/etc/uwsgi/apps-archlinux/searx.ini:socket+85 utils/templates/etc/uwsgi/apps-available/searx.ini+87 utils/templates/etc/uwsgi/apps-available/searx.ini:socket+84 utils/templates/lib/systemd/system/filtron.service+29 utils/templates/lib/systemd/system/morty.service+29
.codecov.ymlnew file+31
@@ -0,0 +1,31 @@
1+comment: false
2+coverage:
3+ status:
4+ project:
5+ default:
6+ # basic
7+ target: auto
8+ threshold: null
9+ base: auto
10+ # advanced
11+ branches: null
12+ if_no_uploads: error
13+ if_not_found: success
14+ if_ci_failed: error
15+ only_pulls: false
16+ flags: null
17+ paths: null
18+ patch:
19+ default:
20+ # basic
21+ target: auto
22+ threshold: null
23+ base: auto
24+ # advanced
25+ branches: null
26+ if_no_uploads: error
27+ if_not_found: success
28+ if_ci_failed: error
29+ only_pulls: false
30+ flags: null
31+ paths: null
.config.shnew file+59
@@ -0,0 +1,59 @@
1+# -*- coding: utf-8; mode: sh -*-
2+# SPDX-License-Identifier: AGPL-3.0-or-later
3+# shellcheck shell=bash disable=SC2034
4+#
5+# This environment is used by ./utils scripts like filtron.sh or searx.sh. The
6+# default values are *most flexible* and *best maintained*, you normally not
7+# need to change the defaults (except PUBLIC_URL).
8+#
9+# Before you change any value here you have to uninstall any previous
10+# installation. Further is it recommended to backup your changes simply by
11+# adding them to you local brand (git branch)::
12+#
13+# git add .config
14+
15+# The public URL of the searx instance: PUBLIC_URL="https://mydomain.xy/searx"
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
24+
25+# searx.sh
26+# ---------
27+
28+# SEARX_INTERNAL_URL="127.0.0.1:8888"
29+# SEARX_SETTINGS_TEMPLATE="${REPO_ROOT}/utils/templates/etc/searx/use_default_settings.yml"
30+
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}"
36+
37+# filtron.sh
38+# ----------
39+
40+# FILTRON_API="127.0.0.1:4005"
41+# FILTRON_LISTEN="127.0.0.1:4004"
42+# FILTRON_TARGET="127.0.0.1:8888"
43+
44+# morty.sh
45+# --------
46+
47+# morty listen address
48+# MORTY_LISTEN="127.0.0.1:3000"
49+# PUBLIC_URL_PATH_MORTY="/morty/"
50+
51+# system services
52+# ---------------
53+
54+# Common $HOME folder of the service accounts
55+# SERVICE_HOME_BASE="/usr/local"
56+
57+# **experimental**: Set SERVICE_USER to run all services by one account, but be
58+# aware that removing discrete components might conflict!
59+# SERVICE_USER=searx
.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.elnew file+133
@@ -0,0 +1,133 @@
1+;;; .dir-locals.el
2+;;
3+;; If you get ``*** EPC Error ***`` (even after a jedi:install-server) in your
4+;; emacs session, mostly you have jedi-mode enabled but the python enviroment is
5+;; missed. The python environment has to be next to the
6+;; ``<repo>/.dir-locals.el`` in::
7+;;
8+;; ./local/py3
9+;;
10+;; In Emacs, some buffer locals are referencing the project environment:
11+;;
12+;; - prj-root --> <repo>/
13+;; - python-environment-directory --> <repo>/local
14+;; - python-environment-default-root-name --> py3
15+;; - python-shell-virtualenv-root --> <repo>/local/py3
16+;; When this variable is set with the path of the virtualenv to use,
17+;; `process-environment' and `exec-path' get proper values in order to run
18+;; shells inside the specified virtualenv, example::
19+;; (setq python-shell-virtualenv-root "/path/to/env/")
20+;;
21+;; To setup such an environment build target 'pyenv' or 'pyenvinstall'::
22+;;
23+;; $ make pyenvinstall
24+;;
25+;; Alternatively create the virtualenv, source it and install jedi + epc
26+;; (required by `emacs-jedi <https://tkf.github.io/emacs-jedi>`_)::
27+;;
28+;; $ python -m venv ./local/py3
29+;; ...
30+;; $ source ./local/py3/bin/activate
31+;; (py3)$ # now install into the activated 'py3' environment ..
32+;; (py3)$ pip install jedi epc
33+;; ...
34+;;
35+;; Here is what also I found useful to add to my .emacs::
36+;;
37+;; (global-set-key [f6] 'flycheck-mode)
38+;; (add-hook 'python-mode-hook 'my:python-mode-hook)
39+;;
40+;; (defun my:python-mode-hook ()
41+;; (add-to-list 'company-backends 'company-jedi)
42+;; (require 'jedi-core)
43+;; (jedi:setup)
44+;; (define-key python-mode-map (kbd "C-c C-d") 'jedi:show-doc)
45+;; (define-key python-mode-map (kbd "M-.") 'jedi:goto-definition)
46+;; (define-key python-mode-map (kbd "M-,") 'jedi:goto-definition-pop-marker)
47+;; )
48+;;
49+
50+((nil
51+ . ((fill-column . 80)
52+ ))
53+ (python-mode
54+ . ((indent-tabs-mode . nil)
55+
56+ ;; project root folder is where the `.dir-locals.el' is located
57+ (eval . (setq-local
58+ prj-root (locate-dominating-file default-directory ".dir-locals.el")))
59+
60+ (eval . (setq-local
61+ python-environment-directory (expand-file-name "./local" prj-root)))
62+
63+ ;; use 'py3' enviroment as default
64+ (eval . (setq-local
65+ python-environment-default-root-name "py3"))
66+
67+ (eval . (setq-local
68+ python-shell-virtualenv-root
69+ (concat python-environment-directory
70+ "/"
71+ python-environment-default-root-name)))
72+
73+ ;; python-shell-virtualenv-path is obsolete, use python-shell-virtualenv-root!
74+ ;; (eval . (setq-local
75+ ;; python-shell-virtualenv-path python-shell-virtualenv-root))
76+
77+ (eval . (setq-local
78+ python-shell-interpreter
79+ (expand-file-name "bin/python" python-shell-virtualenv-root)))
80+
81+ (eval . (setq-local
82+ python-environment-virtualenv
83+ (list (expand-file-name "bin/virtualenv" python-shell-virtualenv-root)
84+ ;;"--system-site-packages"
85+ "--quiet")))
86+
87+ (eval . (setq-local
88+ pylint-command
89+ (expand-file-name "bin/pylint" python-shell-virtualenv-root)))
90+
91+ ;; pylint will find the '.pylintrc' file next to the CWD
92+ ;; https://pylint.readthedocs.io/en/latest/user_guide/run.html#command-line-options
93+ (eval . (setq-local
94+ flycheck-pylintrc ".pylintrc"))
95+
96+ ;; flycheck & other python stuff should use the local py3 environment
97+ (eval . (setq-local
98+ flycheck-python-pylint-executable python-shell-interpreter))
99+
100+ ;; use 'M-x jedi:show-setup-info' and 'M-x epc:controller' to inspect jedi server
101+
102+ ;; https://tkf.github.io/emacs-jedi/latest/#jedi:environment-root -- You
103+ ;; can specify a full path instead of a name (relative path). In that case,
104+ ;; python-environment-directory is ignored and Python virtual environment
105+ ;; is created at the specified path.
106+ (eval . (setq-local jedi:environment-root python-shell-virtualenv-root))
107+
108+ ;; https://tkf.github.io/emacs-jedi/latest/#jedi:server-command
109+ (eval .(setq-local
110+ jedi:server-command
111+ (list python-shell-interpreter
112+ jedi:server-script)
113+ ))
114+
115+ ;; jedi:environment-virtualenv --> see above 'python-environment-virtualenv'
116+ ;; is set buffer local! No need to setup jedi:environment-virtualenv:
117+ ;;
118+ ;; Virtualenv command to use. A list of string. If it is nil,
119+ ;; python-environment-virtualenv is used instead. You must set non-nil
120+ ;; value to jedi:environment-root in order to make this setting work.
121+ ;;
122+ ;; https://tkf.github.io/emacs-jedi/latest/#jedi:environment-virtualenv
123+ ;;
124+ ;; (eval . (setq-local
125+ ;; jedi:environment-virtualenv
126+ ;; (list (expand-file-name "bin/virtualenv" python-shell-virtualenv-root)
127+ ;; ;;"--python"
128+ ;; ;;"/usr/bin/python3.4"
129+ ;; )))
130+
131+ ;; jedi:server-args
132+
133+ )))
.dockerignorenew file+56
@@ -0,0 +1,56 @@
1+*~
2+*/*~
3+*/*/*~
4+*/*/*/*~
5+*/*/*/*/*~
6+
7+#
8+local/
9+
10+# Git
11+.git
12+.gitignore
13+
14+# CI
15+.codeclimate.yml
16+.travis.yml
17+.taskcluster.yml
18+
19+# Byte-compiled / optimized / DLL files
20+__pycache__/
21+*/__pycache__/
22+*/*/__pycache__/
23+*/*/*/__pycache__/
24+*.py[cod]
25+*/*.py[cod]
26+*/*/*.py[cod]
27+*/*/*/*.py[cod]
28+
29+# to sync with .gitignore
30+.coverage
31+coverage/
32+.installed.cfg
33+engines.cfg
34+env
35+searx-ve
36+robot_log.html
37+robot_output.xml
38+robot_report.html
39+test_basic/
40+setup.cfg
41+
42+# node_modules
43+node_modules/
44+*/node_modules/
45+*/*/node_modules/
46+*/*/*/node_modules/
47+*/*/*/*/node_modules/
48+
49+.tx/
50+
51+#
52+build/
53+dist/
54+local/
55+gh-pages/
56+searx.egg-info/
.gitattributesnew file+10
@@ -0,0 +1,10 @@
1+searx/static/css/bootstrap.min.css -diff
2+searx/static/js/bootstrap.min.js -diff
3+searx/static/themes/oscar/css/logicodev.min.css -diff
4+searx/static/themes/oscar/css/leaflet.min.css -diff
5+searx/static/themes/oscar/css/pointhi.min.css -diff
6+searx/static/themes/oscar/js/searx.min.js -diff
7+searx/static/themes/simple/css/searx.min.css -diff
8+searx/static/themes/simple/css/searx-rtl.min.css -diff
9+searx/static/themes/simple/js/searx.min.js -diff
10+searx/static/themes/simple/js/searx.min.js.map -diff
.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+13−1
@@ -1,8 +1,11 @@
1+# to sync with .dockerignore
12.coverage
23coverage/
4+cache/
35.installed.cfg
46engines.cfg
57env
8+searx-ve
69robot_log.html
710robot_output.xml
811robot_report.html
@@ -12,7 +15,16 @@ setup.cfg
1215*.pyc
1316*/*.pyc
1417*~
18+*.swp
1519
16−node_modules/
20+/node_modules
1721
1822.tx/
23+
24+build/
25+dist/
26+local/
27+gh-pages/
28+searx.egg-info/
29+.env
30+geckodriver.log
.pylintrcnew file+444
@@ -0,0 +1,444 @@
1+# -*- coding: utf-8; mode: conf -*-
2+# lint Python modules using external checkers.
3+#
4+# This is the main checker controlling the other ones and the reports
5+# generation. It is itself both a raw checker and an astng checker in order
6+# to:
7+# * handle message activation / deactivation at the module level
8+# * handle some basic but necessary stats'data (number of classes, methods...)
9+#
10+[MASTER]
11+
12+# A comma-separated list of package or module names from where C extensions may
13+# be loaded. Extensions are loading into the active Python interpreter and may
14+# run arbitrary code
15+extension-pkg-whitelist=lxml.etree
16+
17+# Add files or directories to the blacklist. They should be base names, not
18+# paths.
19+ignore=CVS, .git, .svn
20+
21+# Add files or directories matching the regex patterns to the blacklist. The
22+# regex matches against base names, not paths.
23+ignore-patterns=
24+
25+# Python code to execute, usually for sys.path manipulation such as
26+# pygtk.require().
27+#init-hook=
28+
29+# Use multiple processes to speed up Pylint.
30+jobs=1
31+
32+# List of plugins (as comma separated values of python modules names) to load,
33+# usually to register additional checkers.
34+load-plugins=
35+
36+# Pickle collected data for later comparisons.
37+persistent=yes
38+
39+# Specify a configuration file.
40+#rcfile=
41+
42+# Allow loading of arbitrary C extensions. Extensions are imported into the
43+# active Python interpreter and may run arbitrary code.
44+unsafe-load-any-extension=no
45+
46+
47+[MESSAGES CONTROL]
48+
49+# Only show warnings with the listed confidence levels. Leave empty to show
50+# all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED
51+confidence=
52+
53+# Disable the message, report, category or checker with the given id(s). You
54+# can either give multiple identifiers separated by comma (,) or put this
55+# option multiple times (only on the command line, not in the configuration
56+# file where it should appear only once).You can also use "--disable=all" to
57+# disable everything first and then reenable specific checks. For example, if
58+# you want to run only the similarities checker, you can use "--disable=all
59+# --enable=similarities". If you want to run only the classes checker, but have
60+# no Warning level messages displayed, use"--disable=all --enable=classes
61+# --disable=W"
62+disable=bad-whitespace, duplicate-code, consider-using-f-string
63+
64+# Enable the message, report, category or checker with the given id(s). You can
65+# either give multiple identifier separated by comma (,) or put this option
66+# multiple time (only on the command line, not in the configuration file where
67+# it should appear only once). See also the "--disable" option for examples.
68+enable=
69+
70+
71+[REPORTS]
72+
73+# Python expression which should return a note less than 10 (10 is the highest
74+# note). You have access to the variables errors warning, statement which
75+# respectively contain the number of errors / warnings messages and the total
76+# number of statements analyzed. This is used by the global evaluation report
77+# (RP0004).
78+evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
79+
80+# Template used to display messages. This is a python new-style format string
81+# used to format the message information. See doc for all details
82+
83+# HINT: do not set this here, use argument --msg-template=...
84+#msg-template={path}:{line}: [{msg_id}({symbol}),{obj}] {msg}
85+
86+# Set the output format. Available formats are text, parseable, colorized, json
87+# and msvs (visual studio).You can also give a reporter class, eg
88+# mypackage.mymodule.MyReporterClass.
89+
90+# HINT: do not set this here, use argument --output-format=...
91+#output-format=text
92+
93+# Tells whether to display a full report or only the messages
94+reports=no
95+
96+# Activate the evaluation score.
97+score=yes
98+
99+
100+[REFACTORING]
101+
102+# Maximum number of nested blocks for function / method body
103+max-nested-blocks=5
104+
105+
106+[BASIC]
107+
108+# List of builtins function names that should not be used, separated by a comma
109+bad-functions=map,filter,apply,input
110+
111+# Naming hint for argument names
112+argument-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
113+
114+# Regular expression matching correct argument names
115+argument-rgx=(([a-z][a-zA-Z0-9_]{2,30})|(_[a-z0-9_]*))$
116+
117+# Naming hint for attribute names
118+attr-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
119+
120+# Regular expression matching correct attribute names
121+attr-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*)|([A-Z0-9_]*))$
122+
123+# Bad variable names which should always be refused, separated by a comma
124+bad-names=foo,bar,baz,toto,tutu,tata
125+
126+# Naming hint for class attribute names
127+class-attribute-name-hint=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
128+
129+# Regular expression matching correct class attribute names
130+class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
131+
132+# Naming hint for class names
133+class-name-hint=[A-Z_][a-zA-Z0-9]+$
134+
135+# Regular expression matching correct class names
136+class-rgx=[A-Z_][a-zA-Z0-9]+$
137+
138+# Naming hint for constant names
139+const-name-hint=(([A-Z_][A-Z0-9_]*)|(__.*__))$
140+
141+# Regular expression matching correct constant names
142+const-rgx=(([a-zA-Z_][a-zA-Z0-9_]*)|(__.*__))$
143+#const-rgx=[f]?[A-Z_][a-zA-Z0-9_]{2,30}$
144+
145+# Minimum line length for functions/classes that require docstrings, shorter
146+# ones are exempt.
147+docstring-min-length=-1
148+
149+# Naming hint for function names
150+function-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
151+
152+# Regular expression matching correct function names
153+function-rgx=(([a-z][a-zA-Z0-9_]{2,30})|(_[a-z0-9_]*))$
154+
155+# Good variable names which should always be accepted, separated by a comma
156+good-names=i,j,k,ex,Run,_,log,cfg,id
157+
158+# Include a hint for the correct naming format with invalid-name
159+include-naming-hint=no
160+
161+# Naming hint for inline iteration names
162+inlinevar-name-hint=[A-Za-z_][A-Za-z0-9_]*$
163+
164+# Regular expression matching correct inline iteration names
165+inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
166+
167+# Naming hint for method names
168+method-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
169+
170+# Regular expression matching correct method names
171+method-rgx=(([a-z][a-zA-Z0-9_]{2,30})|(_[a-z0-9_]*))$
172+
173+# Naming hint for module names
174+module-name-hint=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
175+
176+# Regular expression matching correct module names
177+#module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
178+module-rgx=([a-z_][a-z0-9_]*)$
179+
180+# Colon-delimited sets of names that determine each other's naming style when
181+# the name regexes allow several styles.
182+name-group=
183+
184+# Regular expression which should only match function or class names that do
185+# not require a docstring.
186+no-docstring-rgx=^_
187+
188+# List of decorators that produce properties, such as abc.abstractproperty. Add
189+# to this list to register other decorators that produce valid properties.
190+property-classes=abc.abstractproperty
191+
192+# Naming hint for variable names
193+variable-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
194+
195+# Regular expression matching correct variable names
196+variable-rgx=(([a-z][a-zA-Z0-9_]{2,30})|(_[a-z0-9_]*)|([a-z]))$
197+
198+
199+[FORMAT]
200+
201+# Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
202+expected-line-ending-format=
203+
204+# Regexp for a line that is allowed to be longer than the limit.
205+ignore-long-lines=^\s*(# )?<?https?://\S+>?$
206+
207+# Number of spaces of indent required inside a hanging or continued line.
208+indent-after-paren=4
209+
210+# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
211+# tab).
212+indent-string=' '
213+
214+# Maximum number of characters on a single line.
215+max-line-length=120
216+
217+# Maximum number of lines in a module
218+max-module-lines=2000
219+
220+# List of optional constructs for which whitespace checking is disabled. `dict-
221+# separator` is used to allow tabulation in dicts, etc.: {1 : 1,\n222: 2}.
222+# `trailing-comma` allows a space between comma and closing bracket: (a, ).
223+# `empty-line` allows space-only lines.
224+no-space-check=trailing-comma,dict-separator
225+
226+# Allow the body of a class to be on the same line as the declaration if body
227+# contains single statement.No config file found, using default configuration
228+
229+single-line-class-stmt=no
230+
231+# Allow the body of an if to be on the same line as the test if there is no
232+# else.
233+single-line-if-stmt=no
234+
235+
236+[LOGGING]
237+
238+# Logging modules to check that the string format arguments are in logging
239+# function parameter format
240+logging-modules=logging
241+
242+
243+[MISCELLANEOUS]
244+
245+# List of note tags to take in consideration, separated by a comma.
246+notes=FIXME,XXX,TODO
247+
248+
249+[SIMILARITIES]
250+
251+# Ignore comments when computing similarities.
252+ignore-comments=yes
253+
254+# Ignore docstrings when computing similarities.
255+ignore-docstrings=yes
256+
257+# Ignore imports when computing similarities.
258+ignore-imports=no
259+
260+# Minimum lines number of a similarity.
261+min-similarity-lines=4
262+
263+
264+[SPELLING]
265+
266+# Spelling dictionary name. Available dictionaries: none. To make it working
267+# install python-enchant package.
268+spelling-dict=
269+
270+# List of comma separated words that should not be checked.
271+spelling-ignore-words=
272+
273+# A path to a file that contains private dictionary; one word per line.
274+spelling-private-dict-file=
275+
276+# Tells whether to store unknown words to indicated private dictionary in
277+# --spelling-private-dict-file option instead of raising a message.
278+spelling-store-unknown-words=no
279+
280+
281+[TYPECHECK]
282+
283+# List of decorators that produce context managers, such as
284+# contextlib.contextmanager. Add to this list to register other decorators that
285+# produce valid context managers.
286+contextmanager-decorators=contextlib.contextmanager
287+
288+# List of members which are set dynamically and missed by pylint inference
289+# system, and so shouldn't trigger E1101 when accessed. Python regular
290+# expressions are accepted.
291+generated-members=
292+
293+# Tells whether missing members accessed in mixin class should be ignored. A
294+# mixin class is detected if its name ends with "mixin" (case insensitive).
295+ignore-mixin-members=yes
296+
297+# This flag controls whether pylint should warn about no-member and similar
298+# checks whenever an opaque object is returned when inferring. The inference
299+# can return multiple potential results while evaluating a Python object, but
300+# some branches might not be evaluated, which results in partial inference. In
301+# that case, it might be useful to still emit no-member and other checks for
302+# the rest of the inferred objects.
303+ignore-on-opaque-inference=yes
304+
305+# List of class names for which member attributes should not be checked (useful
306+# for classes with dynamically set attributes). This supports the use of
307+# qualified names.
308+ignored-classes=optparse.Values,thread._local,_thread._local
309+
310+# List of module names for which member attributes should not be checked
311+# (useful for modules/projects where namespaces are manipulated during runtime
312+# and thus existing member attributes cannot be deduced by static analysis. It
313+# supports qualified module names, as well as Unix pattern matching.
314+ignored-modules=
315+
316+# Show a hint with possible names when a member name was not found. The aspect
317+# of finding the hint is based on edit distance.
318+missing-member-hint=yes
319+
320+# The minimum edit distance a name should have in order to be considered a
321+# similar match for a missing member name.
322+missing-member-hint-distance=1
323+
324+# The total number of similar names that should be taken in consideration when
325+# showing a hint for a missing member.
326+missing-member-max-choices=1
327+
328+
329+[VARIABLES]
330+
331+# List of additional names supposed to be defined in builtins. Remember that
332+# you should avoid to define new builtins when possible.
333+additional-builtins=
334+
335+# Tells whether unused global variables should be treated as a violation.
336+allow-global-unused-variables=yes
337+
338+# List of strings which can identify a callback function by name. A callback
339+# name must start or end with one of those strings.
340+callbacks=cb_,_cb
341+
342+# A regular expression matching the name of dummy variables (i.e. expectedly
343+# not used).
344+dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_
345+
346+# Argument names that match this expression will be ignored. Default to name
347+# with leading underscore
348+ignored-argument-names=_.*|^ignored_|^unused_
349+
350+# Tells whether we should check for unused import in __init__ files.
351+init-import=no
352+
353+# List of qualified module names which can have objects that can redefine
354+# builtins.
355+redefining-builtins-modules=six.moves,future.builtins
356+
357+
358+[CLASSES]
359+
360+# List of method names used to declare (i.e. assign) instance attributes.
361+defining-attr-methods=__init__,__new__,setUp
362+
363+# List of member names, which should be excluded from the protected access
364+# warning.
365+exclude-protected=_asdict,_fields,_replace,_source,_make
366+
367+# List of valid names for the first argument in a class method.
368+valid-classmethod-first-arg=cls
369+
370+# List of valid names for the first argument in a metaclass class method.
371+valid-metaclass-classmethod-first-arg=mcs
372+
373+
374+[DESIGN]
375+
376+# Maximum number of arguments for function / method
377+max-args=8
378+
379+# Maximum number of attributes for a class (see R0902).
380+max-attributes=20
381+
382+# Maximum number of boolean expressions in a if statement
383+max-bool-expr=5
384+
385+# Maximum number of branch for function / method body
386+max-branches=12
387+
388+# Maximum number of locals for function / method body
389+max-locals=20
390+
391+# Maximum number of parents for a class (see R0901).
392+max-parents=7
393+
394+# Maximum number of public methods for a class (see R0904).
395+max-public-methods=20
396+
397+# Maximum number of return / yield for function / method body
398+max-returns=6
399+
400+# Maximum number of statements in function / method body
401+max-statements=50
402+
403+# Minimum number of public methods for a class (see R0903).
404+min-public-methods=2
405+
406+
407+[IMPORTS]
408+
409+# Allow wildcard imports from modules that define __all__.
410+allow-wildcard-with-all=no
411+
412+# Analyse import fallback blocks. This can be used to support both Python 2 and
413+# 3 compatible code, which means that the block might have code that exists
414+# only in one or another interpreter, leading to false positives when analysed.
415+analyse-fallback-blocks=no
416+
417+# Deprecated modules which should not be used, separated by a comma
418+deprecated-modules=optparse,tkinter.tix
419+
420+# Create a graph of external dependencies in the given file (report RP0402 must
421+# not be disabled)
422+ext-import-graph=
423+
424+# Create a graph of every (i.e. internal and external) dependencies in the
425+# given file (report RP0402 must not be disabled)
426+import-graph=
427+
428+# Create a graph of internal dependencies in the given file (report RP0402 must
429+# not be disabled)
430+int-import-graph=
431+
432+# Force import order to recognize a module as part of the standard
433+# compatibility libraries.
434+known-standard-library=
435+
436+# Force import order to recognize a module as part of a third party library.
437+known-third-party=enchant
438+
439+
440+[EXCEPTIONS]
441+
442+# Exceptions that will emit a warning when being caught. Defaults to
443+# "Exception"
444+overgeneral-exceptions=Exception
.travis.ymldeleted−36
@@ -1,36 +0,0 @@
1−sudo: false
2−cache:
3− - pip
4− - npm
5− - directories:
6− - $HOME/.cache/pip
7−addons:
8− firefox: "latest"
9−language: python
10−python:
11− - "2.7"
12−before_install:
13− - "export DISPLAY=:99.0"
14− - "sh -e /etc/init.d/xvfb start"
15− - npm install less grunt-cli
16− - ( cd searx/static/themes/oscar;npm install; cd - )
17− - mkdir -p ~/drivers; export PATH=~/drivers:$PATH;
18− - GECKODRIVER_URL="https://github.com/mozilla/geckodriver/releases/download/v0.11.1/geckodriver-v0.11.1-linux64.tar.gz";
19− - FILE=`mktemp`; wget "$GECKODRIVER_URL" -qO $FILE && tar xz -C ~/drivers -f $FILE geckodriver; rm $FILE; chmod 777 ~/drivers/geckodriver;
20−install:
21− - ./manage.sh update_dev_packages
22− - pip install coveralls
23−script:
24− - ./manage.sh styles
25− - ./manage.sh grunt_build
26− - ./manage.sh tests
27− - ./manage.sh py_test_coverage
28−after_success:
29− coveralls
30−notifications:
31− irc:
32− channels:
33− - "irc.freenode.org#searx"
34− template:
35− - "%{repository}/#%{build_number}/%{branch} (%{author}): %{message} %{build_url}"
36− on_success: change
AUTHORS.rst+109−4
@@ -1,4 +1,4 @@
1−Searx was created by Adam Tauber and is maintained by Adam Tauber, Alexandre Flament and Noémi Ványi.
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
@@ -8,8 +8,13 @@ Major contributing authors:
88- Alexandre Flament `@dalf <https://github.com/dalf>`_
99- @Cqoicebordel
1010- Noémi Ványi
11+- Marc Abonce Seguin @a01200356
12+- @pofilo
13+- Markus Heiser @return42
14+- Émilien Devos @unixfox
15+- Alexandre Flament
1116
12−People who have submitted patches/translates, reported bugs, consulted features or
17+People who have submitted patches/translations, reported bugs, consulted features or
1318generally made searx better:
1419
1520- Laszlo Hammerl
@@ -43,7 +48,6 @@ generally made searx better:
4348- Kang-min Liu
4449- Kirill Isakov
4550- Guilhem Bonnefille
46−- Marc Abonce Seguin
4751- @jibe-b
4852- Christian Pietsch @pietsch
4953- @Maxqia
@@ -55,9 +59,110 @@ generally made searx better:
5559- Ammar Najjar @ammarnajjar
5660- @stepshal
5761- François Revol @mmuman
58−- marc @a01200356
5962- Harry Wood @harry-wood
6063- Thomas Renard @threnard
6164- Pydo `<https://github.com/pydo>`_
6265- Athemis `<https://github.com/Athemis>`_
6366- Stefan Antoni `<http://stefan.antoni.io>`
67+- @firebovine
68+- Lorenzo J. Lucchini @luccoj
69+- @eig8phei
70+- @maxigas
71+- Jannik Winkel @kiney
72+- @juanitobananas
73+- Vache Asatryan @vachi
74+- Luca CPZ @lcpz
75+- @nikaiw
76+- Thirnearez
77+- Hypolite Petovan @MrPetovan
78+- @woorst
79+- @Apply55gx
80+- @pyrrh0n1c
81+- @cclauss
82+- QGW @moon2l
83+- Pierre-Alain Toret @daftaupe
84+- Matthew Olmsted @icegiant
85+- Michael Tran @trankmichael
86+- Joseph Nuthalapati @josephkiranbabu
87+- @maiki
88+- Richard Didier @zeph33
89+- Michael Vieria @Themimitoof
90+- Richard Nespithal @rndevfx
91+- Stanislas @angristan
92+- @rinpatch
93+- g. s. @usernameisntallowed
94+- Léo Bourrel @bourrel
95+- @cy8aer
96+- @Popolon
97+- Alice Ferrazzi @aliceinwire
98+- @LiquidLemon
99+- @dadosch
100+- Václav Zouzalík @Venca24
101+- @ZEROF
102+- Ivan Skytte Jørgensen @isj-privacore
103+- @miicha
104+- Étienne Deparis @milouse
105+- @pelag0s
106+- Denis Wernert @d-tux
107+- Robin Hallabro-Kokko @hallabro
108+- Jonas Zohren @jfowl
109+- Elias Ojala @theel0ja
110+- @brunob
111+- Nick Espig @nachtalb
112+- Rachmadani Haryono @rachmadaniHaryono
113+- Frank de Lange @yetangitu
114+- Nicolas Gelot @nfk
115+- @volth
116+- Mathieu Brunot @madmath03
117+- @lorddavidiii
118+- @x250
119+- Robby O'Connor @robbyoconnor
120+- Finn @0xhtml
121+- @tmikaeld
122+- @hobbestigrou
123+- Vipul @finn0
124+- @CaffeinatedTech
125+- 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+507−1
@@ -1,3 +1,509 @@
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+
334+0.16.0 2020.01.30
335+=================
336+
337+- New engines
338+
339+ - Splash
340+ - Apkmirror
341+ - NPM search
342+ - Invidious
343+ - Seedpeer
344+- New languages
345+
346+ - Estonian
347+ - Interlingua
348+ - Lithuanian
349+ - Tibetian
350+ - Occitan
351+ - Tamil
352+- Engine fixes (wolframalpha, google scholar, youtube, google images, seznam, google, soundcloud, google cloud, duden, btdigg, google play, bing images, flickr noapi, wikidata, dailymotion, google videos, arxiv, dictzone, fdroid, etymonline, bing, duckduckgo, startpage, voat, 1x, deviantart, digg, gigablast, mojeek, duckduckgo definitions, spotify, libgen, qwant, openstreetmap, wikipedia, ina, microsoft academic, scanr structures)
353+- Dependency updates
354+- Speed optimizations
355+- Initial support for offline engines
356+- Image format display
357+- Inline js scripts removed
358+- Infinite scroll plugin fix
359+- Simple theme bugfixes
360+- Docker image updates
361+- Bang expression fixes
362+- Result merging fixes
363+- New environment variable added: SEARX_BIND_ADDRESS
364+
365+
366+News
367+~~~~
368+
369+- @return42 joined the maintainer team
370+- This is the last release with Python2 support
371+
372+0.15.0 2019.01.06
373+=================
374+
375+- New engines
376+
377+ - Acgsou (files, images, videos, music)
378+ - Duden.de (general)
379+ - Seznam (general)
380+ - Mojeek (general)
381+- New languages
382+
383+ - Catalan
384+ - Welsh
385+ - Basque
386+ - Persian (Iran)
387+ - Galician
388+ - Dutch (Belgium)
389+ - Telugu
390+ - Vietnamese
391+- New random answerers
392+
393+ - sha256
394+ - uuidv4
395+- New DOI resolsvers
396+
397+ - sci-hub.tw
398+- Fix Vim mode on Firefox
399+- Fix custom select in Oscar theme
400+- Engine fixes (duckduckgo, google news, currency convert, gigablast, google scholar, wikidata image, etymonline, google videos, startpage, bing image)
401+- Minor simple theme fixes
402+
403+- New Youtube icon in Oscar theme
404+- Get DOI rewriters from settings.yml
405+- Hide page buttons when infinite scrolling is enabled
406+- Update user agent versions
407+- Make Oscar style configurable
408+- Make suspend times of errored engines configurable
409+
410+0.14.0 2018.02.19
411+=================
412+
413+- New theme: oscar-logicodev dark
414+- New engines
415+
416+ - AskSteem (general)
417+- Autocompleter fix for py3
418+- Engine fixes (pdbe, pubmed, gigablast, google, yacy, bing videos, microsoft academic)
419+- "All" option is removed from languages
420+- Minor UI changes
421+- Translation updates
422+
423+0.13.1 2017.11.23
424+=================
425+
426+- Bug fixes
427+
428+ - https://github.com/searx/searx/issues/1088
429+ - https://github.com/searx/searx/issues/1089
430+
431+- Dependency updates
432+
433+
434+0.13.0 2017.11.21
435+=================
436+
437+- New theme: simple
438+- New engines
439+
440+ - Google videos (video)
441+ - Bing videos (video)
442+ - Arxiv (science)
443+ - OpenAIRE (science)
444+ - Pubmed (science)
445+ - Genius (music/lyrics)
446+- Display engine errors
447+- Faster startup
448+- Lots of engine fixes (google images, dictzone, duckduckgo, duckduckgo images, torrentz, faroo, digg, tokyotoshokan, nyaa.si, google news, gitlab, gigablast, geektimes.ru, habrahabr.ru, voat.co, base, json engine, currency convert, google)
449+- Shorter saved preferences URL
450+- Fix engine duplications in results
451+- Py3 compatibility fixes
452+- Translation updates
453+
454+
455+0.12.0 2017.06.04
456+=================
457+
458+- Python3 compatibility
459+- New engines
460+
461+ - 1337x.to (files, music, video)
462+ - Semantic Scholar (science)
463+ - Library Genesis (general)
464+ - Framalibre (IT)
465+ - Free Software Directory (IT)
466+- More compact result UI (oscar theme)
467+- Configurable static content and template path
468+- Spelling suggestions
469+- Multiple engine fixes (duckduckgo, bing, swisscows, yahoo news, bing news, twitter, bing images)
470+- Reduced static image size
471+- Docker updates
472+- Translation updates
473+
474+
475+Special thanks to `NLNet <https://nlnet.nl>`__ for sponsoring multiple features of this release.
476+
477+
478+0.11.0 2017.01.10
479+=================
480+
481+- New engines
482+
483+ - Protein Data Bank Europe (science)
484+ - Voat.co (general, social media)
485+ - Online Etimology Dictionary (science)
486+ - CCC tv (video, it)
487+ - Searx (all categories - can rotate multiple other instances)
488+- Answerer functionality (see answerer section on /preferences)
489+- Local answerers
490+
491+ - Statistical functions
492+ - Random value generator
493+- Result proxy support (with `morty <https://github.com/asciimoo/morty>`__)
494+- Extended time range filter
495+- Improved search language support
496+- Multiple engine fixes (digbt, 500px, google news, ixquick, bing, kickass, google play movies, habrahabr, yandex)
497+- Minor UI improvements
498+- Suggestion support for JSON engine
499+- Result and query escaping fixes
500+- Configurable HTTP server version
501+- More robust search error handling
502+- Faster webapp initialization in debug mode
503+- Search module refactor
504+- Translation updates
505+
506+
15070.10.0 2016.09.06
2508=================
3509
@@ -89,7 +595,7 @@ News
89595News
90596~~~~
91597
92−New documentation page is available: https://asciimoo.github.io/searx
598+New documentation page is available: https://searx.github.io/searx
93599
94600
956010.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+78−38
@@ -1,54 +1,94 @@
1−FROM alpine:3.3
2−MAINTAINER searx <https://github.com/asciimoo/searx>
3−LABEL description "A privacy-respecting, hackable metasearch engine."
1+FROM alpine:3.15
2+ENTRYPOINT ["/sbin/tini","--","/usr/local/searx/dockerfiles/docker-entrypoint.sh"]
3+EXPOSE 8080
4+VOLUME /etc/searx
5+VOLUME /var/log/uwsgi
6+
7+ARG SEARX_GID=977
8+ARG SEARX_UID=977
9+
10+RUN addgroup -g ${SEARX_GID} searx && \
11+ adduser -u ${SEARX_UID} -D -h /usr/local/searx -s /bin/sh -G searx searx
12+
13+ENV INSTANCE_NAME=searx \
14+ AUTOCOMPLETE= \
15+ BASE_URL= \
16+ MORTY_KEY= \
17+ MORTY_URL= \
18+ SEARX_SETTINGS_PATH=/etc/searx/settings.yml \
19+ UWSGI_SETTINGS_PATH=/etc/searx/uwsgi.ini
420
5−ENV BASE_URL=False IMAGE_PROXY=False
6−EXPOSE 8888
721WORKDIR /usr/local/searx
8−CMD ["/usr/bin/tini","--","/usr/local/searx/run.sh"]
922
10−RUN adduser -D -h /usr/local/searx -s /bin/sh searx searx \
11− && echo '#!/bin/sh' >> run.sh \
12− && echo 'sed -i "s|base_url : False|base_url : $BASE_URL|g" searx/settings.yml' >> run.sh \
13− && echo 'sed -i "s/image_proxy : False/image_proxy : $IMAGE_PROXY/g" searx/settings.yml' >> run.sh \
14− && echo 'sed -i "s/ultrasecretkey/`openssl rand -hex 16`/g" searx/settings.yml' >> run.sh \
15− && echo 'python searx/webapp.py' >> run.sh \
16− && chmod +x run.sh
1723
1824COPY requirements.txt ./requirements.txt
1925
20−RUN echo "@commuedge http://nl.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories \
21− && apk -U add \
22− build-base \
23− python \
24− python-dev \
25− py-pip \
26− libxml2 \
27− libxml2-dev \
28− libxslt \
29− libxslt-dev \
30− libffi-dev \
31− openssl \
32− openssl-dev \
33− ca-certificates \
34− tini@commuedge \
35− && pip install --no-cache -r requirements.txt \
36− && apk del \
26+RUN apk upgrade --no-cache \
27+ && apk add --no-cache -t build-dependencies \
3728 build-base \
38− python-dev \
39− py-pip\
29+ py3-setuptools \
30+ python3-dev \
4031 libffi-dev \
41− openssl-dev \
4232 libxslt-dev \
4333 libxml2-dev \
4434 openssl-dev \
35+ tar \
36+ git \
37+ && apk add --no-cache \
4538 ca-certificates \
46− && rm -f /var/cache/apk/*
39+ su-exec \
40+ python3 \
41+ py3-pip \
42+ libxml2 \
43+ libxslt \
44+ openssl \
45+ tini \
46+ uwsgi \
47+ uwsgi-python3 \
48+ brotli \
49+ && pip3 install --upgrade pip wheel setuptools \
50+ && pip3 install --no-cache -r requirements.txt \
51+ && apk del build-dependencies \
52+ && rm -rf /root/.cache
4753
48−COPY . .
54+COPY searx ./searx
55+COPY dockerfiles ./dockerfiles
4956
50−RUN chown -R searx:searx *
57+ARG TIMESTAMP_SETTINGS=0
58+ARG TIMESTAMP_UWSGI=0
59+ARG VERSION_GITCOMMIT=unknown
5160
52−USER searx
61+RUN /usr/bin/python3 -m compileall -q searx; \
62+ touch -c --date=@${TIMESTAMP_SETTINGS} searx/settings.yml; \
63+ touch -c --date=@${TIMESTAMP_UWSGI} dockerfiles/uwsgi.ini; \
64+ if [ ! -z $VERSION_GITCOMMIT ]; then\
65+ echo "VERSION_STRING = VERSION_STRING + \"-$VERSION_GITCOMMIT\"" >> /usr/local/searx/searx/version.py; \
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 {} \+
5370
54−RUN sed -i "s/127.0.0.1/0.0.0.0/g" searx/settings.yml
71+# Keep these arguments at the end to prevent redundant layer rebuilds
72+ARG LABEL_DATE=
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}>" \
78+ description="A privacy-respecting, hackable metasearch engine." \
79+ version="${SEARX_GIT_VERSION}" \
80+ org.label-schema.schema-version="1.0" \
81+ org.label-schema.name="searx" \
82+ org.label-schema.version="${SEARX_GIT_VERSION}" \
83+ org.label-schema.url="${LABEL_VCS_URL}" \
84+ org.label-schema.vcs-ref=${LABEL_VCS_REF} \
85+ org.label-schema.vcs-url=${LABEL_VCS_URL} \
86+ org.label-schema.build-date="${LABEL_DATE}" \
87+ org.label-schema.usage="https://github.com/searx/searx-docker" \
88+ org.opencontainers.image.title="searx" \
89+ org.opencontainers.image.version="${SEARX_GIT_VERSION}" \
90+ org.opencontainers.image.url="${LABEL_VCS_URL}" \
91+ org.opencontainers.image.revision=${LABEL_VCS_REF} \
92+ org.opencontainers.image.source=${LABEL_VCS_URL} \
93+ org.opencontainers.image.created="${LABEL_DATE}" \
94+ org.opencontainers.image.documentation="https://github.com/searx/searx-docker"
Makefilenew file+107
@@ -0,0 +1,107 @@
1+# -*- coding: utf-8; mode: makefile-gmake -*-
2+# SPDX-License-Identifier: AGPL-3.0-or-later
3+
4+.DEFAULT_GOAL=help
5+export MTOOLS=./manage
6+
7+include utils/makefile.include
8+
9+all: clean install
10+
11+PHONY += help
12+
13+help:
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'
24+
25+
26+PHONY += run
27+run: install
28+ $(Q) ( \
29+ sleep 2 ; \
30+ xdg-open http://127.0.0.1:8888/ ; \
31+ ) &
32+ SEARX_DEBUG=1 ./manage pyenv.cmd python ./searx/webapp.py
33+
34+PHONY += install uninstall
35+install uninstall:
36+ $(Q)./manage pyenv.$@
37+
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"
68+
69+
70+# wrap ./manage script
71+
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
84+
85+PHONY += $(MANAGE)
86+
87+$(MANAGE):
88+ $(Q)$(MTOOLS) $@
89+
90+# deprecated
91+
92+PHONY += docs docs-clean docs-live docker themes
93+
94+docs: docs.html
95+ $(Q)./manage build_msg WARN $@ is deprecated use docs.html
96+
97+docs-clean: docs.clean
98+ $(Q)./manage build_msg WARN $@ is deprecated use docs.clean
99+
100+docs-live: docs.live
101+ $(Q)./manage build_msg WARN $@ is deprecated use docs.live
102+
103+docker: docker.build
104+ $(Q)./manage build_msg WARN $@ is deprecated use docker.build
105+
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+60−32
@@ -1,45 +1,73 @@
1−searx
2−=====
1+.. SPDX-License-Identifier: AGPL-3.0-or-later
32
4−A privacy-respecting, hackable `metasearch
5−engine <https://en.wikipedia.org/wiki/Metasearch_engine>`__.
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
68
7−List of `running
8−instances <https://github.com/asciimoo/searx/wiki/Searx-instances>`__.
9+-------
910
10−See the `documentation <https://asciimoo.github.io/searx>`__ and the `wiki <https://github.com/asciimoo/searx/wiki>`__ for more information.
11+|searx install|
12+|searx homepage|
13+|searx wiki|
14+|AGPL License|
15+|Issues|
16+|commits|
17+|OpenCollective searx backers|
18+|OpenCollective searx sponsors|
1119
12−|Flattr searx|
20+Privacy-respecting, hackable `metasearch engine`_ / *pronunciation* **sɜːks**.
1321
14−Installation
15−~~~~~~~~~~~~
22+.. _metasearch engine: https://en.wikipedia.org/wiki/Metasearch_engine
1623
17−- clone source:
18− ``git clone https://github.com/asciimoo/searx.git && cd searx``
19−- install dependencies: ``./manage.sh update_packages``
20−- edit your
21− `settings.yml <https://github.com/asciimoo/searx/blob/master/searx/settings.yml>`__
22− (set your ``secret_key``!)
23−- run ``python searx/webapp.py`` to start the application
24+.. |searx install| image:: https://img.shields.io/badge/-install-blue
25+ :target: https://searx.github.io/searx/admin/installation.html
2426
25−For all the details, follow this `step by step
26−installation <https://github.com/asciimoo/searx/wiki/Installation>`__
27+.. |searx homepage| image:: https://img.shields.io/badge/-homepage-blue
28+ :target: https://searx.github.io/searx
2729
28−Bugs
29−~~~~
30+.. |searx wiki| image:: https://img.shields.io/badge/-wiki-blue
31+ :target: https://github.com/searx/searx/wiki
3032
31−Bugs or suggestions? Visit the `issue
32−tracker <https://github.com/asciimoo/searx/issues>`__.
33+.. |AGPL License| image:: https://img.shields.io/badge/license-AGPL-blue.svg
34+ :target: https://github.com/searx/searx/blob/master/LICENSE
3335
34−`License <https://github.com/asciimoo/searx/blob/master/LICENSE>`__
35−~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
36+.. |Issues| image:: https://img.shields.io/github/issues/searx/searx?color=yellow&label=issues
37+ :target: https://github.com/searx/searx/issues
3638
37−More about searx
38−~~~~~~~~~~~~~~~~
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
3941
40−- `ohloh <https://www.ohloh.net/p/searx/>`__
41−- `twitter <https://twitter.com/Searx_engine>`__
42−- IRC: #searx @ freenode
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
4344
44−.. |Flattr searx| image:: http://api.flattr.com/button/flattr-badge-large.png
45− :target: https://flattr.com/submit/auto?user_id=asciimoo&url=https://github.com/asciimoo/searx&title=searx&language=&tags=github&category=software
45+.. |OpenCollective searx backers| image:: https://opencollective.com/searx/backers/badge.svg
46+ :target: https://opencollective.com/searx#backer
47+
48+.. |OpenCollective searx sponsors| image:: https://opencollective.com/searx/sponsors/badge.svg
49+ :target: https://opencollective.com/searx#sponsor
50+
51+
52+If you are looking for running instances, ready to use, then visit searx.space_.
53+
54+Otherwise jump to the user_, admin_ and developer_ handbooks you will find on
55+our homepage_.
56+
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
62+
63+contact:
64+ openhub_ // twitter_ // IRC: #searx @ Libera (irc.libera.chat)
65+
66+.. _openhub: https://www.openhub.net/p/searx
67+.. _twitter: https://twitter.com/Searx_engine
68+
69+-------
70+
71+|gluten free|
72+
73+.. |gluten free| image:: https://forthebadge.com/images/featured/featured-gluten-free.svg
dockerfiles/docker-entrypoint.shnew file+145
@@ -0,0 +1,145 @@
1+#!/bin/sh
2+
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+}
21+
22+export DEFAULT_BIND_ADDRESS="0.0.0.0:8080"
23+if [ -z "${BIND_ADDRESS}" ]; then
24+ export BIND_ADDRESS="${DEFAULT_BIND_ADDRESS}"
25+fi
26+
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+
38+# Parse command line
39+FORCE_CONF_UPDATE=0
40+DRY_RUN=0
41+while getopts "fdh" option
42+do
43+ case $option in
44+ f)
45+ FORCE_CONF_UPDATE=1
46+ ;;
47+ d)
48+ DRY_RUN=1
49+ ;;
50+ h)
51+ help
52+ esac
53+done
54+
55+# helpers to update the configuration files
56+patch_uwsgi_settings() {
57+ CONF="$1"
58+
59+ # Nothing
60+}
61+
62+patch_searx_settings() {
63+ CONF="$1"
64+
65+ # Make sure that there is trailing slash at the end of BASE_URL
66+ # see https://www.gnu.org/savannah-checkouts/gnu/bash/manual/bash.html#Shell-Parameter-Expansion
67+ export BASE_URL="${BASE_URL%/}/"
68+
69+ # update settings.yml
70+ sed -i -e "s|base_url : False|base_url : ${BASE_URL}|g" \
71+ -e "s/instance_name : \"searx\"/instance_name : \"${INSTANCE_NAME}\"/g" \
72+ -e "s/autocomplete : \"\"/autocomplete : \"${AUTOCOMPLETE}\"/g" \
73+ -e "s/ultrasecretkey/$(openssl rand -hex 32)/g" \
74+ "${CONF}"
75+
76+ # Morty configuration
77+ if [ ! -z "${MORTY_KEY}" -a ! -z "${MORTY_URL}" ]; then
78+ sed -i -e "s/image_proxy : False/image_proxy : True/g" \
79+ "${CONF}"
80+ cat >> "${CONF}" <<-EOF
81+
82+# Morty configuration
83+result_proxy:
84+ url : ${MORTY_URL}
85+ key : !!binary "${MORTY_KEY}"
86+EOF
87+ fi
88+}
89+
90+update_conf() {
91+ FORCE_CONF_UPDATE=$1
92+ CONF="$2"
93+ NEW_CONF="${2}.new"
94+ OLD_CONF="${2}.old"
95+ REF_CONF="$3"
96+ PATCH_REF_CONF="$4"
97+
98+ if [ -f "${CONF}" ]; then
99+ if [ "${REF_CONF}" -nt "${CONF}" ]; then
100+ # There is a new version
101+ if [ $FORCE_CONF_UPDATE -ne 0 ]; then
102+ # Replace the current configuration
103+ printf '⚠️ Automaticaly update %s to the new version\n' "${CONF}"
104+ if [ ! -f "${OLD_CONF}" ]; then
105+ printf 'The previous configuration is saved to %s\n' "${OLD_CONF}"
106+ mv "${CONF}" "${OLD_CONF}"
107+ fi
108+ cp "${REF_CONF}" "${CONF}"
109+ $PATCH_REF_CONF "${CONF}"
110+ else
111+ # Keep the current configuration
112+ printf '⚠️ Check new version %s to make sure searx is working properly\n' "${NEW_CONF}"
113+ cp "${REF_CONF}" "${NEW_CONF}"
114+ $PATCH_REF_CONF "${NEW_CONF}"
115+ fi
116+ else
117+ printf 'Use existing %s\n' "${CONF}"
118+ fi
119+ else
120+ printf 'Create %s\n' "${CONF}"
121+ cp "${REF_CONF}" "${CONF}"
122+ $PATCH_REF_CONF "${CONF}"
123+ fi
124+}
125+
126+# make sure there are uwsgi settings
127+update_conf ${FORCE_CONF_UPDATE} "${UWSGI_SETTINGS_PATH}" "/usr/local/searx/dockerfiles/uwsgi.ini" "patch_uwsgi_settings"
128+
129+# make sure there are searx settings
130+update_conf "${FORCE_CONF_UPDATE}" "${SEARX_SETTINGS_PATH}" "/usr/local/searx/searx/settings.yml" "patch_searx_settings"
131+
132+# dry run (to update configuration files, then inspect them)
133+if [ $DRY_RUN -eq 1 ]; then
134+ printf 'Dry run\n'
135+ exit
136+fi
137+
138+#
139+touch /var/run/uwsgi-logrotate
140+chown -R searx:searx /var/log/uwsgi /var/run/uwsgi-logrotate
141+unset MORTY_KEY
142+
143+# Start uwsgi
144+printf 'Listen on %s\n' "${BIND_ADDRESS}"
145+exec su-exec searx:searx uwsgi --master --http-socket "${BIND_ADDRESS}" "${UWSGI_SETTINGS_PATH}"
dockerfiles/uwsgi.ininew file+47
@@ -0,0 +1,47 @@
1+[uwsgi]
2+# Who will run the code
3+uid = searx
4+gid = searx
5+
6+# Number of workers (usually CPU count)
7+workers = 4
8+
9+# The right granted on the created socket
10+chmod-socket = 666
11+
12+# Plugin to use and interpretor config
13+single-interpreter = true
14+master = true
15+plugin = python3
16+lazy-apps = true
17+enable-threads = true
18+
19+# Module to import
20+module = searx.webapp
21+
22+# Virtualenv and python path
23+pythonpath = /usr/local/searx/
24+chdir = /usr/local/searx/searx/
25+
26+# Disable logging for privacy
27+disable-logging=True
28+
29+# But keep errors for 2 days
30+touch-logrotate = /run/uwsgi-logrotate
31+unique-cron = 15 0 -1 -1 -1 { touch /run/uwsgi-logrotate }
32+log-backupname = /var/log/uwsgi/uwsgi.log.1
33+logto = /var/log/uwsgi/uwsgi.log
34+
35+# No keep alive
36+# See https://github.com/searx/searx-docker/issues/24
37+add-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/_themes/searx/static/searx.cssnew file+140
@@ -0,0 +1,140 @@
1+@import url("pocoo.css");
2+
3+a, a.reference, a.footnote-reference {
4+ color: #004b6b;
5+ border-color: #004b6b;
6+}
7+
8+a:hover {
9+ color: #6d4100;
10+ border-color: #6d4100;
11+}
12+
13+p.version-warning {
14+ background-color: #004b6b;
15+}
16+
17+div.sidebar {
18+ background-color: whitesmoke;
19+ border-color: lightsteelblue;
20+ border-radius: 3pt;
21+}
22+
23+p.sidebar-title, .sidebar p {
24+ margin: 6pt;
25+}
26+
27+.sidebar li,
28+.hlist li {
29+ list-style-type: disclosure-closed;
30+}
31+
32+
33+/* admonitions
34+*/
35+
36+div.admonition, div.topic, div.toctree-wrapper {
37+ background-color: #fafafa;
38+ margin: 8px 0px;
39+ padding: 1em;
40+ border-radius: 3pt 0 0 3pt;
41+ border-top: none;
42+ border-right: none;
43+ border-bottom: none;
44+ border-left: 5pt solid #ccc;
45+ list-style-type: disclosure-closed;
46+}
47+
48+div.toctree-wrapper p.caption {
49+ font-weight: normal;
50+ font-size: 24px;
51+ margin: 0 0 10px 0;
52+ padding: 0;
53+ line-height: 1;
54+ display: inline;
55+}
56+
57+p.admonition-title:after {
58+ content: none;
59+}
60+
61+.admonition.hint { border-color: #416dc0b0; }
62+.admonition.note { border-color: #6c856cb0; }
63+.admonition.tip { border-color: #85c5c2b0; }
64+.admonition.attention { border-color: #ecec97b0; }
65+.admonition.caution { border-color: #a6c677b0; }
66+.admonition.danger { border-color: #d46262b0; }
67+.admonition.important { border-color: #dfa3a3b0; }
68+.admonition.error { border-color: red; }
69+.admonition.warning { border-color: darkred; }
70+
71+.admonition.admonition-generic-admonition-title {
72+ border-color: #416dc0b0;
73+}
74+
75+
76+/* admonitions with (rendered) reST markup examples (:class: rst-example)
77+ *
78+ * .. admonition:: title of the example
79+ * :class: rst-example
80+ * ....
81+*/
82+
83+div.rst-example {
84+ background-color: inherit;
85+ margin: 0;
86+ border-top: none;
87+ border-right: 1px solid #ccc;
88+ border-bottom: none;
89+ border-left: none;
90+ border-radius: none;
91+ padding: 0;
92+}
93+
94+div.rst-example > p.admonition-title {
95+ font-family: Sans Serif;
96+ font-style: italic;
97+ font-size: 0.8em;
98+ display: block;
99+ border-bottom: 1px solid #ccc;
100+ padding: 0.5em 1em;
101+ text-align: right;
102+}
103+
104+/* code block in figures
105+ */
106+
107+div.highlight pre {
108+ text-align: left;
109+}
110+
111+/* Table theme
112+*/
113+
114+thead, tfoot {
115+ background-color: #fff;
116+}
117+
118+th:hover, td:hover {
119+ background-color: #ffc;
120+}
121+
122+thead th, tfoot th, tfoot td, tbody th {
123+ background-color: #fffaef;
124+}
125+
126+tbody tr:nth-child(odd) {
127+ background-color: #fff;
128+}
129+
130+tbody tr:nth-child(even) {
131+ background-color: #fafafa;
132+}
133+
134+caption {
135+ font-family: Sans Serif;
136+ padding: 0.5em;
137+ margin: 0.5em 0 0.5em 0;
138+ caption-side: top;
139+ text-align: left;
140+}
docs/_themes/searx/theme.confnew file+6
@@ -0,0 +1,6 @@
1+[theme]
2+inherit = pocoo
3+stylesheet = searx.css
4+
5+[options]
6+touch_icon =
docs/admin/api.rstnew file+96
@@ -0,0 +1,96 @@
1+.. _adminapi:
2+
3+==================
4+Administration API
5+==================
6+
7+Get configuration data
8+======================
9+
10+.. code:: http
11+
12+ GET /config HTTP/1.1
13+
14+Sample response
15+---------------
16+
17+.. code:: json
18+
19+ {
20+ "autocomplete": "",
21+ "categories": [
22+ "map",
23+ "it",
24+ "images",
25+ ],
26+ "default_locale": "",
27+ "default_theme": "oscar",
28+ "engines": [
29+ {
30+ "categories": [
31+ "map"
32+ ],
33+ "enabled": true,
34+ "name": "openstreetmap",
35+ "shortcut": "osm"
36+ },
37+ {
38+ "categories": [
39+ "it"
40+ ],
41+ "enabled": true,
42+ "name": "arch linux wiki",
43+ "shortcut": "al"
44+ },
45+ {
46+ "categories": [
47+ "images"
48+ ],
49+ "enabled": true,
50+ "name": "google images",
51+ "shortcut": "goi"
52+ },
53+ {
54+ "categories": [
55+ "it"
56+ ],
57+ "enabled": false,
58+ "name": "bitbucket",
59+ "shortcut": "bb"
60+ },
61+ ],
62+ "instance_name": "searx",
63+ "locales": {
64+ "de": "Deutsch (German)",
65+ "en": "English",
66+ "eo": "Esperanto (Esperanto)",
67+ },
68+ "plugins": [
69+ {
70+ "enabled": true,
71+ "name": "HTTPS rewrite"
72+ },
73+ {
74+ "enabled": false,
75+ "name": "Vim-like hotkeys"
76+ }
77+ ],
78+ "safe_search": 0
79+ }
80+
81+
82+Embed search bar
83+================
84+
85+The search bar can be embedded into websites. Just paste the example into the
86+HTML of the site. URL of the searx instance and values are customizable.
87+
88+.. code:: html
89+
90+ <form method="post" action="https://searx.me/">
91+ <!-- search --> <input type="text" name="q" />
92+ <!-- categories --> <input type="hidden" name="categories" value="general,social media" />
93+ <!-- language --> <input type="hidden" name="lang" value="all" />
94+ <!-- locale --> <input type="hidden" name="locale" value="en" />
95+ <!-- date filter --> <input type="hidden" name="time_range" value="month" />
96+ </form>
docs/admin/arch_public.dotnew file+33
@@ -0,0 +1,33 @@
1+digraph G {
2+
3+ node [style=filled, shape=box, fillcolor="#ffffcc", fontname="Sans"];
4+ edge [fontname="Sans"];
5+
6+ browser [label="Browser", shape=Mdiamond];
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"];
10+ static [label="Static files", href="url to configure static files"];
11+ uwsgi [label="uwsgi", href="https://searx.github.io/searx/utils/searx.sh.html"]
12+ searx1 [label="Searx #1"];
13+ searx2 [label="Searx #2"];
14+ searx3 [label="Searx #3"];
15+ searx4 [label="Searx #4"];
16+
17+ browser -> rp [label="HTTPS"]
18+
19+ subgraph cluster_searx {
20+ label = "Searx instance" fontname="Sans";
21+ bgcolor="#fafafa";
22+ { rank=same; static rp };
23+ rp -> morty [label="optional: images and HTML pages proxy"];
24+ rp -> static [label="optional: reverse proxy serves directly static files"];
25+ rp -> filtron [label="HTTP"];
26+ filtron -> uwsgi [label="HTTP"];
27+ uwsgi -> searx1;
28+ uwsgi -> searx2;
29+ uwsgi -> searx3;
30+ uwsgi -> searx4;
31+ }
32+
33+}
docs/admin/architecture.rstnew file+28
@@ -0,0 +1,28 @@
1+.. _architecture:
2+
3+============
4+Architecture
5+============
6+
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`
15+
16+Herein you will find some hints and suggestions about typical architectures of
17+searx infrastructures.
18+
19+We start with a contribution from :pull:`@dalf <1776#issuecomment-567917320>`.
20+It shows a *reference* setup for public searx instances which can build up and
21+maintained by the scripts from our :ref:`toolboxing`.
22+
23+.. _arch public:
24+
25+.. kernel-figure:: arch_public.dot
26+ :alt: arch_public.dot
27+
28+ Reference architecture of a public searx setup.
docs/admin/buildhosts.rstnew file+155
@@ -0,0 +1,155 @@
1+.. _buildhosts:
2+
3+==========
4+Buildhosts
5+==========
6+
7+.. sidebar:: This article needs some work
8+
9+ If you have any contribution send us your :pull:`PR <../pulls>`, see
10+ :ref:`how to contribute`.
11+
12+.. contents:: Contents
13+ :depth: 2
14+ :local:
15+ :backlinks: entry
16+
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+
34+.. _docs build:
35+
36+Build docs
37+==========
38+
39+.. _Graphviz: https://graphviz.gitlab.io
40+.. _ImageMagick: https://www.imagemagick.org
41+.. _XeTeX: https://tug.org/xetex/
42+.. _dvisvgm: https://dvisvgm.de/
43+
44+.. sidebar:: Sphinx build needs
45+
46+ - ImageMagick_
47+ - Graphviz_
48+ - XeTeX_
49+ - dvisvgm_
50+
51+Most of the sphinx requirements are installed from :origin:`setup.py` and the
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.
55+
56+To be able to do :ref:`sphinx:math-support` without CDNs, the math are rendered
57+as images (``sphinx.ext.imgmath`` extension).
58+
59+Here is the extract from the :origin:`docs/conf.py` file, setting math renderer
60+to ``imgmath``:
61+
62+.. literalinclude:: ../conf.py
63+ :language: python
64+ :start-after: # sphinx.ext.imgmath setup
65+ :end-before: # sphinx.ext.imgmath setup END
66+
67+If your docs build (``make docs.html``) shows warnings like this::
68+
69+ WARNING: dot(1) not found, for better output quality install \
70+ graphviz from https://www.graphviz.org
71+ ..
72+ WARNING: LaTeX command 'latex' cannot be run (needed for math \
73+ display), check the imgmath_latex setting
74+
75+you need to install additional packages on your build host, to get better HTML
76+output.
77+
78+.. tabs::
79+
80+ .. group-tab:: Ubuntu / debian
81+
82+ .. code-block:: sh
83+
84+ $ sudo apt install graphviz imagemagick texlive-xetex librsvg2-bin
85+
86+ .. group-tab:: Arch Linux
87+
88+ .. code-block:: sh
89+
90+ $ sudo pacman -S graphviz imagemagick texlive-bin extra/librsvg
91+
92+ .. group-tab:: Fedora / RHEL
93+
94+ .. code-block:: sh
95+
96+ $ sudo dnf install graphviz graphviz-gd texlive-xetex-bin librsvg2-tools
97+
98+
99+For PDF output you also need:
100+
101+.. tabs::
102+
103+ .. group-tab:: Ubuntu / debian
104+
105+ .. code:: sh
106+
107+ $ sudo apt texlive-latex-recommended texlive-extra-utils ttf-dejavu
108+
109+ .. group-tab:: Arch Linux
110+
111+ .. code:: sh
112+
113+ $ sudo pacman -S texlive-core texlive-latexextra ttf-dejavu
114+
115+ .. group-tab:: Fedora / RHEL
116+
117+ .. code:: sh
118+
119+ $ sudo dnf install \
120+ texlive-collection-fontsrecommended texlive-collection-latex \
121+ dejavu-sans-fonts dejavu-serif-fonts dejavu-sans-mono-fonts \
122+ ImageMagick
123+
124+.. _sh lint:
125+
126+Lint shell scripts
127+==================
128+
129+.. _ShellCheck: https://github.com/koalaman/shellcheck
130+
131+To lint shell scripts, we use ShellCheck_ - A shell script static analysis tool.
132+
133+.. SNIP sh lint requirements
134+
135+.. tabs::
136+
137+ .. group-tab:: Ubuntu / debian
138+
139+ .. code-block:: sh
140+
141+ $ sudo apt install shellcheck
142+
143+ .. group-tab:: Arch Linux
144+
145+ .. code-block:: sh
146+
147+ $ sudo pacman -S shellcheck
148+
149+ .. group-tab:: Fedora / RHEL
150+
151+ .. code-block:: sh
152+
153+ $ sudo dnf install ShellCheck
154+
155+.. SNAP sh lint requirements
docs/admin/engines.rstnew file+88
@@ -0,0 +1,88 @@
1+=======
2+Engines
3+=======
4+
5+Special Engine Settings
6+=======================
7+
8+.. sidebar:: Further reading ..
9+
10+ - :ref:`settings engine`
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`.
26+
27+============= =========== ==================== ============
28+:ref:`engine settings` :ref:`engine file`
29+------------------------- ---------------------------------
30+Name (cfg) Categories
31+------------------------- ---------------------------------
32+Engine .. Paging support **P**
33+------------------------- -------------------- ------------
34+Shortcut **S** Language support **L**
35+Timeout **TO** Time range support **TR**
36+Disabled **D** Engine type **ET**
37+------------- ----------- -------------------- ------------
38+Safe search **SS**
39+------------- ----------- ---------------------------------
40+Weigth **W**
41+------------- ----------- ---------------------------------
42+Disabled **D**
43+------------- ----------- ---------------------------------
44+Show errors **DE**
45+============= =========== =================================
46+
47+.. _configured engines:
48+
49+.. jinja:: searx
50+
51+ .. flat-table:: Engines configured at built time (defaults)
52+ :header-rows: 1
53+ :stub-columns: 2
54+
55+ * - Name (cfg)
56+ - S
57+ - Engine
58+ - TO
59+ - Categories
60+ - P
61+ - L
62+ - SS
63+ - D
64+ - TR
65+ - ET
66+ - W
67+ - D
68+ - DE
69+
70+ {% for name, mod in engines.items() %}
71+
72+ * - {{name}}
73+ - !{{mod.shortcut}}
74+ - {{mod.__name__}}
75+ - {{mod.timeout}}
76+ - {{", ".join(mod.categories)}}
77+ - {{(mod.paging and "y") or ""}}
78+ - {{(mod.language_support and "y") or ""}}
79+ - {{(mod.safesearch and "y") or ""}}
80+ - {{(mod.disabled and "y") or ""}}
81+ - {{(mod.time_range_support and "y") or ""}}
82+ - {{mod.engine_type or ""}}
83+ - {{mod.weight or 1 }}
84+ - {{(mod.disabled and "y") or ""}}
85+ - {{(mod.display_error_messages and "y") or ""}}
86+
87+ {% 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.rstnew file+191
@@ -0,0 +1,191 @@
1+
2+.. _searx filtron:
3+
4+==========================
5+How to protect an instance
6+==========================
7+
8+.. sidebar:: further reading
9+
10+ - :ref:`filtron.sh`
11+ - :ref:`nginx searx site`
12+
13+
14+.. contents:: Contents
15+ :depth: 2
16+ :local:
17+ :backlinks: entry
18+
19+.. _filtron: https://github.com/asciimoo/filtron
20+
21+Searx depends on external search services. To avoid the abuse of these services
22+it is advised to limit the number of requests processed by searx.
23+
24+An application firewall, filtron_ solves exactly this problem. Filtron is just
25+a middleware between your web server (nginx, apache, ...) and searx, we describe
26+such infratructures in chapter: :ref:`architecture`.
27+
28+
29+filtron & go
30+============
31+
32+.. _Go: https://golang.org/
33+.. _filtron README: https://github.com/asciimoo/filtron/blob/master/README.md
34+
35+Filtron needs Go_ installed. If Go_ is preinstalled, filtron_ is simply
36+installed by ``go get`` package management (see `filtron README`_). If you use
37+filtron as middleware, a more isolated setup is recommended. To simplify such
38+an installation and the maintenance of, use our script :ref:`filtron.sh`.
39+
40+.. _Sample configuration of filtron:
41+
42+Sample configuration of filtron
43+===============================
44+
45+.. sidebar:: Tooling box
46+
47+ - :origin:`/etc/filtron/rules.json <utils/templates/etc/filtron/rules.json>`
48+
49+An example configuration can be find below. This configuration limits the access
50+of:
51+
52+- scripts or applications (roboagent limit)
53+- webcrawlers (botlimit)
54+- IPs which send too many requests (IP limit)
55+- too many json, csv, etc. requests (rss/json limit)
56+- the same UserAgent of if too many requests (useragent limit)
57+
58+.. code:: json
59+
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+ ]
145+
146+
147+.. _filtron route request:
148+
149+Route request through filtron
150+=============================
151+
152+.. sidebar:: further reading
153+
154+ - :ref:`filtron.sh overview`
155+ - :ref:`installation nginx`
156+ - :ref:`installation apache`
157+
158+Filtron can be started using the following command:
159+
160+.. code:: sh
161+
162+ $ filtron -rules rules.json
163+
164+It listens on ``127.0.0.1:4004`` and forwards filtered requests to
165+``127.0.0.1:8888`` by default.
166+
167+Use it along with ``nginx`` with the following example configuration.
168+
169+.. code:: nginx
170+
171+ # https://example.org/searx
172+
173+ location /searx {
174+ proxy_pass http://127.0.0.1:4004/;
175+
176+ proxy_set_header Host $host;
177+ proxy_set_header Connection $http_connection;
178+ proxy_set_header X-Real-IP $remote_addr;
179+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
180+ proxy_set_header X-Scheme $scheme;
181+ proxy_set_header X-Script-Name /searx;
182+ }
183+
184+ location /searx/static {
185+ /usr/local/searx/searx-src/searx/static;
186+ }
187+
188+
189+Requests are coming from port 4004 going through filtron and then forwarded to
190+port 8888 where a searx is being run. For a complete setup see: :ref:`nginx
191+searx site`.
docs/admin/index.rstnew file+23
@@ -0,0 +1,23 @@
1+===========================
2+Administrator documentation
3+===========================
4+
5+.. toctree::
6+ :maxdepth: 2
7+ :caption: Contents
8+
9+ installation
10+ installation-searx
11+ installation-uwsgi
12+ installation-nginx
13+ installation-apache
14+ installation-docker
15+ update-searx
16+ settings
17+ api
18+ architecture
19+ filtron
20+ morty
21+ engines
22+ plugins
23+ buildhosts
docs/admin/installation-apache.rstnew file+515
@@ -0,0 +1,515 @@
1+.. _installation apache:
2+
3+===================
4+Install with apache
5+===================
6+
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`_
42+
43+.. contents:: Contents
44+ :depth: 2
45+ :local:
46+ :backlinks: entry
47+
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`_).
99+
100+.. tabs::
101+
102+ .. group-tab:: Ubuntu / debian
103+
104+ .. code:: sh
105+
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
121+
122+ In this file, there is a line setting the `DocumentRoot`_ directive:
123+
124+ .. code:: apache
125+
126+ DocumentRoot "/srv/http"
127+ <Directory "/srv/http">
128+ Options Indexes FollowSymLinks
129+ AllowOverride None
130+ Require all granted
131+ </Directory>
132+
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>`_:
136+
137+ .. code:: apache
138+
139+ LoadModule autoindex_module modules/mod_autoindex.so
140+ ...
141+ Include conf/extra/httpd-autoindex.conf
142+
143+ .. group-tab:: Fedora / RHEL
144+
145+ .. code:: sh
146+
147+ less /etc/httpd/conf/httpd.conf
148+
149+ In this file, there is a line setting the ``DocumentRoot`` directive:
150+
151+ .. code:: apache
152+
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`.
182+
183+.. tabs::
184+
185+ .. group-tab:: Ubuntu / debian
186+
187+ In the Apache setup, enable headers and proxy modules:
188+
189+ .. code:: sh
190+
191+ sudo -H a2enmod headers
192+ sudo -H a2enmod proxy
193+ sudo -H a2enmod proxy_http
194+
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
201+
202+ sudo -H a2ensite searx.conf
203+
204+ .. group-tab:: Arch Linux
205+
206+ In the ``/etc/httpd/conf/httpd.conf`` file, activate headers and proxy
207+ modules (LoadModule_):
208+
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+===============
463+
464+.. tabs::
465+
466+ .. group-tab:: Ubuntu / debian
467+
468+ .. code:: sh
469+
470+ 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+=================
506+
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:
511+
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.rstnew file+60
@@ -0,0 +1,60 @@
1+.. _installation docker:
2+
3+===================
4+Docker installation
5+===================
6+
7+.. contents:: Contents
8+ :depth: 2
9+ :local:
10+ :backlinks: entry
11+
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:
21+
22+.. code:: sh
23+
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
27+
28+Go to ``http://localhost:$PORT``.
29+
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+
37+
38+.. code:: sh
39+
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
53+ cd 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.rstnew file+383
@@ -0,0 +1,383 @@
1+.. _installation nginx:
2+
3+==================
4+Install with nginx
5+==================
6+
7+.. _nginx:
8+ https://docs.nginx.com/nginx/admin-guide/
9+.. _nginx server configuration:
10+ https://docs.nginx.com/nginx/admin-guide/web-server/web-server/#setting-up-virtual-servers
11+.. _nginx beginners guide:
12+ https://nginx.org/en/docs/beginners_guide.html
13+.. _Getting Started wiki:
14+ https://www.nginx.com/resources/wiki/start/
15+.. _uWSGI support from nginx:
16+ https://uwsgi-docs.readthedocs.io/en/latest/Nginx.html
17+.. _uwsgi_params:
18+ https://uwsgi-docs.readthedocs.io/en/latest/Nginx.html#configuring-nginx
19+.. _SCRIPT_NAME:
20+ https://werkzeug.palletsprojects.com/en/1.0.x/wsgi/#werkzeug.wsgi.get_script_name
21+
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+
30+.. contents:: Contents
31+ :depth: 2
32+ :local:
33+ :backlinks: entry
34+
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+
51+
52+The nginx HTTP server
53+=====================
54+
55+If nginx_ is not installed (uwsgi will not work with the package nginx-light),
56+install it now.
57+
58+.. tabs::
59+
60+ .. group-tab:: Ubuntu / debian
61+
62+ .. code:: sh
63+
64+ sudo -H apt-get install nginx
65+
66+ .. group-tab:: Arch Linux
67+
68+ .. code-block:: sh
69+
70+ sudo -H pacman -S nginx-mainline
71+ sudo -H systemctl enable nginx
72+ sudo -H systemctl start nginx
73+
74+ .. group-tab:: Fedora / RHEL
75+
76+ .. code-block:: sh
77+
78+ sudo -H dnf install nginx
79+ sudo -H systemctl enable nginx
80+ sudo -H systemctl start nginx
81+
82+Now at http://localhost you should see a *Welcome to nginx!* page, on Fedora you
83+see a *Fedora Webserver - Test Page*. The test page comes from the default
84+`nginx server configuration`_. How this default intro site is configured,
85+depends on the linux distribution:
86+
87+.. tabs::
88+
89+ .. group-tab:: Ubuntu / debian
90+
91+ .. code:: sh
92+
93+ less /etc/nginx/nginx.conf
94+
95+ there is a line including site configurations from:
96+
97+ .. code:: nginx
98+
99+ include /etc/nginx/sites-enabled/*;
100+
101+ .. group-tab:: Arch Linux
102+
103+ .. code-block:: sh
104+
105+ less /etc/nginx/nginx.conf
106+
107+ in there is a configuration section named ``server``:
108+
109+ .. code-block:: nginx
110+
111+ server {
112+ listen 80;
113+ server_name localhost;
114+ # ...
115+ }
116+
117+ .. group-tab:: Fedora / RHEL
118+
119+ .. code-block:: sh
120+
121+ less /etc/nginx/nginx.conf
122+
123+ there is a line including site configurations from:
124+
125+ .. code:: nginx
126+
127+ include /etc/nginx/conf.d/*.conf;
128+
129+.. _nginx searx site:
130+
131+A nginx searx site
132+==================
133+
134+.. sidebar:: public to the internet?
135+
136+ If your searx instance is public, stop here and first install :ref:`filtron
137+ reverse proxy <filtron.sh>` and :ref:`result proxy morty <morty.sh>`, see
138+ :ref:`installation scripts`. If already done, follow setup: *searx via
139+ filtron plus morty*.
140+
141+Now you have to create a configuration for the searx site. If nginx_ is new to
142+you, the `nginx beginners guide`_ is a good starting point and the `Getting
143+Started wiki`_ is always a good resource *to keep in the pocket*.
144+
145+.. tabs::
146+
147+ .. group-tab:: Ubuntu / debian
148+
149+ Create configuration at ``/etc/nginx/sites-available/searx`` and place a
150+ symlink to sites-enabled:
151+
152+ .. code:: sh
153+
154+ sudo -H ln -s /etc/nginx/sites-available/searx /etc/nginx/sites-enabled/searx
155+
156+ .. group-tab:: Arch Linux
157+
158+ In the ``/etc/nginx/nginx.conf`` file, replace the configuration section
159+ named ``server``.
160+
161+ .. group-tab:: Fedora / RHEL
162+
163+ Create configuration at ``/etc/nginx/conf.d/searx`` and place a
164+ symlink to sites-enabled:
165+
166+.. _nginx searx via filtron plus morty:
167+
168+.. tabs::
169+
170+ .. group-tab:: searx via filtron plus morty
171+
172+ Use this setup, if your instance is public to the internet, compare
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`):
177+
178+ .. code:: nginx
179+
180+ # https://example.org/searx
181+
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+ }
192+
193+ location /searx/static/ {
194+ alias /usr/local/searx/searx-src/searx/static/;
195+ }
196+
197+
198+ 2. Configure reverse proxy for :ref:`morty <searx morty>`, listening on
199+ *localhost 3000*:
200+
201+ .. code:: nginx
202+
203+ # https://example.org/morty
204+
205+ location /morty {
206+ proxy_pass http://127.0.0.1:3000/;
207+
208+ proxy_set_header Host $host;
209+ proxy_set_header Connection $http_connection;
210+ proxy_set_header X-Real-IP $remote_addr;
211+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
212+ proxy_set_header X-Scheme $scheme;
213+ }
214+
215+ For a fully result proxification add :ref:`morty's <searx morty>` **public
216+ URL** to your :origin:`searx/settings.yml`:
217+
218+ .. code:: yaml
219+
220+ result_proxy:
221+ # replace example.org with your server's public name
222+ url : https://example.org/morty
223+ key : !!binary "insert_your_morty_proxy_key_here"
224+
225+ server:
226+ image_proxy : True
227+
228+
229+ .. group-tab:: proxy or uWSGI
230+
231+ Be warned, with this setup, your instance isn't :ref:`protected <searx
232+ filtron>`. Nevertheless it is good enough for intranet usage and it is a
233+ excellent example of; *how different services can be set up*. The next
234+ example shows a reverse proxy configuration wrapping the :ref:`searx-uWSGI
235+ application <uwsgi configuration>`, listening on ``http =
236+ 127.0.0.1:8888``.
237+
238+ .. code:: nginx
239+
240+ # https://hostname.local/
241+
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+ }
251+
252+ Alternatively you can use the `uWSGI support from nginx`_ via unix
253+ sockets. For socket communication, you have to activate ``socket =
254+ /run/uwsgi/app/searx/socket`` and comment out the ``http =
255+ 127.0.0.1:8888`` configuration in your :ref:`uwsgi ini file <uwsgi
256+ configuration>`.
257+
258+ The example shows a nginx virtual ``server`` configuration, listening on
259+ port 80 (IPv4 and IPv6 http://[::]:80). The uWSGI app is configured at
260+ location ``/`` by importing the `uwsgi_params`_ and passing requests to
261+ the uWSGI socket (``uwsgi_pass``). The ``server``\'s root points to the
262+ :ref:`searx-src clone <searx-src>` and wraps directly the
263+ :origin:`searx/static/` content at ``location /static``.
264+
265+ .. code:: nginx
266+
267+ server {
268+ # replace hostname.local with your server's name
269+ server_name hostname.local;
270+
271+ listen 80;
272+ listen [::]:80;
273+
274+ location / {
275+ include uwsgi_params;
276+ uwsgi_pass unix:/run/uwsgi/app/searx/socket;
277+ }
278+
279+ root /usr/local/searx/searx-src/searx;
280+ location /static { }
281+ }
282+
283+ If not already exists, create a folder for the unix sockets, which can be
284+ used by the searx account:
285+
286+ .. code:: bash
287+
288+ mkdir -p /run/uwsgi/app/searx/
289+ sudo -H chown -R searx:searx /run/uwsgi/app/searx/
290+
291+ .. group-tab:: \.\. at subdir URL
292+
293+ Be warned, with these setups, your instance isn't :ref:`protected <searx
294+ filtron>`. The examples are just here to demonstrate how to export the
295+ searx application from a subdirectory URL ``https://example.org/searx/``.
296+
297+ .. code:: nginx
298+
299+ # https://hostname.local/searx
300+
301+ location /searx {
302+ proxy_pass http://127.0.0.1:8888;
303+
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+ }
311+
312+ location /searx/static/ {
313+ alias /usr/local/searx/searx-src/searx/static/;
314+ }
315+
316+ The ``X-Script-Name /searx`` is needed by the searx implementation to
317+ calculate relative URLs correct. The next example shows a uWSGI
318+ configuration. Since there are no HTTP headers in a (u)WSGI protocol, the
319+ value is shipped via the SCRIPT_NAME_ in the WSGI environment.
320+
321+ .. code:: nginx
322+
323+ # https://hostname.local/searx
324+
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+ }
334+
335+ For searx to work correctly the ``base_url`` must be set in the
336+ :origin:`searx/settings.yml`.
337+
338+ .. code:: yaml
339+
340+ server:
341+ # replace example.org with your server's public name
342+ base_url : https://example.org/searx/
343+
344+
345+Restart service:
346+
347+.. tabs::
348+
349+ .. group-tab:: Ubuntu / debian
350+
351+ .. code:: sh
352+
353+ sudo -H systemctl restart nginx
354+ sudo -H service uwsgi restart searx
355+
356+ .. group-tab:: Arch Linux
357+
358+ .. code:: sh
359+
360+ sudo -H systemctl restart nginx
361+ sudo -H systemctl restart uwsgi@searx
362+
363+ .. group-tab:: Fedora
364+
365+ .. code:: sh
366+
367+ sudo -H systemctl restart nginx
368+ sudo -H touch /etc/uwsgi.d/searx.ini
369+
370+
371+Disable logs
372+============
373+
374+For better privacy you can disable nginx logs in ``/etc/nginx/nginx.conf``.
375+
376+.. code:: nginx
377+
378+ http {
379+ # ...
380+ access_log /dev/null;
381+ error_log /dev/null;
382+ # ...
383+ }
docs/admin/installation-searx.rstnew file+120
@@ -0,0 +1,120 @@
1+.. _installation basic:
2+
3+=========================
4+Step by step installation
5+=========================
6+
7+.. contents:: Contents
8+ :depth: 2
9+ :local:
10+ :backlinks: entry
11+
12+Step by step installation with virtualenv. For Ubuntu, be sure to have enable
13+universe repository.
14+
15+.. _install packages:
16+
17+Install packages
18+================
19+
20+.. kernel-include:: $DOCS_BUILD/includes/searx.rst
21+ :start-after: START distro-packages
22+ :end-before: END distro-packages
23+
24+.. hint::
25+
26+ This installs also the packages needed by :ref:`searx uwsgi`
27+
28+.. _create searx user:
29+
30+Create user
31+===========
32+
33+.. kernel-include:: $DOCS_BUILD/includes/searx.rst
34+ :start-after: START create user
35+ :end-before: END create user
36+
37+.. _searx-src:
38+
39+install searx & dependencies
40+============================
41+
42+Start a interactive shell from new created user and clone searx:
43+
44+.. kernel-include:: $DOCS_BUILD/includes/searx.rst
45+ :start-after: START clone searx
46+ :end-before: END clone searx
47+
48+In the same shell create *virtualenv*:
49+
50+.. kernel-include:: $DOCS_BUILD/includes/searx.rst
51+ :start-after: START create virtualenv
52+ :end-before: END create virtualenv
53+
54+To install searx's dependencies, exit the searx *bash* session you opened above
55+and restart a new. Before install, first check if your *virtualenv* was sourced
56+from the login (*~/.profile*):
57+
58+.. kernel-include:: $DOCS_BUILD/includes/searx.rst
59+ :start-after: START manage.sh update_packages
60+ :end-before: END manage.sh update_packages
61+
62+.. tip::
63+
64+ Open a second terminal for the configuration tasks and leave the ``(searx)$``
65+ terminal open for the tasks below.
66+
67+
68+.. _use_default_settings.yml:
69+
70+Configuration
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.
84+
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.
88+
89+.. kernel-include:: $DOCS_BUILD/includes/searx.rst
90+ :start-after: START searx config
91+ :end-before: END searx config
92+
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+
106+Check
107+=====
108+
109+To check your searx setup, optional enable debugging and start the *webapp*.
110+Searx looks at the exported environment ``$SEARX_SETTINGS_PATH`` for a
111+configuration file.
112+
113+.. kernel-include:: $DOCS_BUILD/includes/searx.rst
114+ :start-after: START check searx installation
115+ :end-before: END check searx installation
116+
117+If everything works fine, hit ``[CTRL-C]`` to stop the *webapp* and disable the
118+debug option in ``settings.yml``. You can now exit searx user bash (enter exit
119+command twice). At this point searx is not demonized; uwsgi allows this.
120+
docs/admin/installation-uwsgi.rstnew file+150
@@ -0,0 +1,150 @@
1+.. _searx uwsgi:
2+
3+=====
4+uwsgi
5+=====
6+
7+.. sidebar:: further reading
8+
9+ - `systemd.unit`_
10+ - `uWSGI Emperor`_
11+
12+.. contents:: Contents
13+ :depth: 2
14+ :local:
15+ :backlinks: entry
16+
17+
18+.. _systemd.unit: https://www.freedesktop.org/software/systemd/man/systemd.unit.html
19+.. _One service per app in systemd:
20+ https://uwsgi-docs.readthedocs.io/en/latest/Systemd.html#one-service-per-app-in-systemd
21+.. _uWSGI Emperor:
22+ https://uwsgi-docs.readthedocs.io/en/latest/Emperor.html
23+.. _uwsgi ini file:
24+ https://uwsgi-docs.readthedocs.io/en/latest/Configuration.html#ini-files
25+.. _systemd unit template:
26+ http://0pointer.de/blog/projects/instances.html
27+
28+
29+Origin uWSGI
30+============
31+
32+How uWSGI is implemented by distributors is different. uWSGI itself
33+recommend two methods
34+
35+`systemd.unit`_ template files as described here `One service per app in systemd`_.
36+
37+ There is one `systemd unit template`_ and one `uwsgi ini file`_ per uWSGI-app
38+ placed at dedicated locations. Take archlinux and a searx.ini as example::
39+
40+ unit template --> /usr/lib/systemd/system/uwsgi@.service
41+ uwsgi ini files --> /etc/uwsgi/searx.ini
42+
43+ The searx app can be maintained as know from common systemd units::
44+
45+ systemctl enable uwsgi@searx
46+ systemctl start uwsgi@searx
47+ systemctl restart uwsgi@searx
48+ systemctl stop uwsgi@searx
49+
50+The `uWSGI Emperor`_ mode which fits for maintaining a large range of uwsgi apps.
51+
52+ The Emperor mode is a special uWSGI instance that will monitor specific
53+ events. The Emperor mode (service) is started by a (common, not template)
54+ systemd unit. The Emperor service will scan specific directories for `uwsgi
55+ ini file`_\s (also know as *vassals*). If a *vassal* is added, removed or the
56+ timestamp is modified, a corresponding action takes place: a new uWSGI
57+ instance is started, reload or stopped. Take Fedora and a searx.ini as
58+ example::
59+
60+ to start a new searx instance create --> /etc/uwsgi.d/searx.ini
61+ to reload the instance edit timestamp --> touch /etc/uwsgi.d/searx.ini
62+ to stop instance remove ini --> rm /etc/uwsgi.d/searx.ini
63+
64+Distributors
65+============
66+
67+The `uWSGI Emperor`_ mode and `systemd unit template`_ is what the distributors
68+mostly offer their users, even if they differ in the way they implement both
69+modes and their defaults. Another point they might differ is the packaging of
70+plugins (if so, compare :ref:`install packages`) and what the default python
71+interpreter is (python2 vs. python3).
72+
73+Fedora starts a Emperor by default, while archlinux does not start any uwsgi
74+service by default. Worth to know; debian (ubuntu) follow a complete different
75+approach. *debian*: your are familiar with the apache infrastructure? .. they
76+do similar for the uWSGI infrastructure (with less comfort), the folders are::
77+
78+ /etc/uwsgi/apps-available/
79+ /etc/uwsgi/apps-enabled/
80+
81+The `uwsgi ini file`_ is enabled by a symbolic link::
82+
83+ ln -s /etc/uwsgi/apps-available/searx.ini /etc/uwsgi/apps-enabled/
84+
85+From debian's documentation (``/usr/share/doc/uwsgi/README.Debian.gz``): You
86+could control specific instance(s) by issuing::
87+
88+ service uwsgi <command> <confname> <confname> ...
89+
90+ sudo -H service uwsgi start searx
91+ sudo -H service uwsgi stop searx
92+
93+My experience is, that this command is a bit buggy.
94+
95+.. _uwsgi configuration:
96+
97+Alltogether
98+===========
99+
100+Create the configuration ini-file according to your distribution (see below) and
101+restart the uwsgi application.
102+
103+.. tabs::
104+
105+ .. group-tab:: Ubuntu / debian
106+
107+ .. kernel-include:: $DOCS_BUILD/includes/searx.rst
108+ :start-after: START searx uwsgi-description ubuntu-20.04
109+ :end-before: END searx uwsgi-description ubuntu-20.04
110+
111+ .. hotfix: a bug group-tab need this comment
112+
113+ .. group-tab:: Arch Linux
114+
115+ .. kernel-include:: $DOCS_BUILD/includes/searx.rst
116+ :start-after: START searx uwsgi-description arch
117+ :end-before: END searx uwsgi-description arch
118+
119+ .. hotfix: a bug group-tab need this comment
120+
121+ .. group-tab:: Fedora / RHEL
122+
123+ .. kernel-include:: $DOCS_BUILD/includes/searx.rst
124+ :start-after: START searx uwsgi-description fedora
125+ :end-before: END searx uwsgi-description fedora
126+
127+
128+.. tabs::
129+
130+ .. group-tab:: Ubuntu / debian
131+
132+ .. kernel-include:: $DOCS_BUILD/includes/searx.rst
133+ :start-after: START searx uwsgi-appini ubuntu-20.04
134+ :end-before: END searx uwsgi-appini ubuntu-20.04
135+
136+ .. hotfix: a bug group-tab need this comment
137+
138+ .. group-tab:: Arch Linux
139+
140+ .. kernel-include:: $DOCS_BUILD/includes/searx.rst
141+ :start-after: START searx uwsgi-appini arch
142+ :end-before: END searx uwsgi-appini arch
143+
144+ .. hotfix: a bug group-tab need this comment
145+
146+ .. group-tab:: Fedora / RHEL
147+
148+ .. kernel-include:: $DOCS_BUILD/includes/searx.rst
149+ :start-after: START searx uwsgi-appini fedora
150+ :end-before: END searx uwsgi-appini fedora
docs/admin/installation.rstnew file+86
@@ -0,0 +1,86 @@
1+.. _installation:
2+
3+============
4+Installation
5+============
6+
7+*You're spoilt for choice*, choose your preferred method of installation.
8+
9+- :ref:`installation docker`
10+- :ref:`installation scripts`
11+- :ref:`installation basic`
12+
13+The :ref:`installation basic` is good enough for intranet usage and it is a
14+excellent illustration of *how a searx instance is build up*. If you place your
15+instance public to the internet you should really consider to install a
16+:ref:`filtron reverse proxy <filtron.sh>` and for privacy a :ref:`result proxy
17+<morty.sh>` is mandatory.
18+
19+Therefore, if you do not have any special preferences, its recommend to use the
20+:ref:`installation docker` or the `Installation scripts`_ from our :ref:`tooling
21+box <toolboxing>` as described below.
22+
23+.. _installation scripts:
24+
25+Installation scripts
26+====================
27+
28+.. sidebar:: Update OS first!
29+
30+ To avoid unwanted side effects, update your OS before installing searx.
31+
32+The following will install a setup as shown in :ref:`architecture`. First you
33+need to get a clone. The clone is only needed for the installation procedure
34+and some maintenance tasks (alternatively you can create your own fork).
35+
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+
42+.. code:: bash
43+
44+ $ cd ~/Downloads
45+ $ git clone https://github.com/searx/searx searx
46+ $ cd searx
47+
48+.. sidebar:: further read
49+
50+ - :ref:`toolboxing`
51+ - :ref:`update searx`
52+ - :ref:`inspect searx`
53+
54+**Install** :ref:`searx service <searx.sh>`
55+
56+This installs searx as described in :ref:`installation basic`.
57+
58+.. code:: bash
59+
60+ $ sudo -H ./utils/searx.sh install all
61+
62+**Install** :ref:`filtron reverse proxy <filtron.sh>`
63+
64+.. code:: bash
65+
66+ $ sudo -H ./utils/filtron.sh install all
67+
68+**Install** :ref:`result proxy <morty.sh>`
69+
70+.. code:: bash
71+
72+ $ 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.rstnew file+40
@@ -0,0 +1,40 @@
1+
2+.. _searx morty:
3+
4+=========================
5+How to setup result proxy
6+=========================
7+
8+.. sidebar:: further reading
9+
10+ - :ref:`morty.sh`
11+
12+.. _morty: https://github.com/asciimoo/morty
13+.. _morty's README: https://github.com/asciimoo/morty
14+
15+By default searx can only act as an image proxy for result images, but it is
16+possible to proxify all the result URLs with an external service, morty_.
17+
18+To use this feature, morty has to be installed and activated in searx's
19+``settings.yml``. Add the following snippet to your ``settings.yml`` and
20+restart searx:
21+
22+.. code:: yaml
23+
24+ result_proxy:
25+ url : http://127.0.0.1:3000/
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.
35+
36+``url``
37+ Is the address of the running morty service.
38+
39+``key``
40+ Is an optional argument, see `morty's README`_ for more information.
docs/admin/plugins.rstnew file+39
@@ -0,0 +1,39 @@
1+.. _plugins generic:
2+
3+===============
4+Plugins builtin
5+===============
6+
7+.. sidebar:: Further reading ..
8+
9+ - :ref:`dev plugin`
10+
11+Configuration defaults (at built time):
12+
13+:DO: Default on
14+
15+.. _configured plugins:
16+
17+.. jinja:: searx
18+
19+ .. flat-table:: Plugins configured at built time (defaults)
20+ :header-rows: 1
21+ :stub-columns: 1
22+ :widths: 3 1 9
23+
24+ * - Name
25+ - DO
26+ - Description
27+
28+ JS & CSS dependencies
29+
30+ {% for plgin in plugins %}
31+
32+ * - {{plgin.name}}
33+ - {{(plgin.default_on and "y") or ""}}
34+ - {{plgin.description}}
35+
36+ {% for dep in (plgin.js_dependencies + plgin.css_dependencies) %}
37+ | ``{{dep}}`` {% endfor %}
38+
39+ {% endfor %}
docs/admin/settings.rstnew file+394
@@ -0,0 +1,394 @@
1+.. _settings.yml:
2+
3+================
4+``settings.yml``
5+================
6+
7+This page describe the options possibilities of the :origin:`searx/settings.yml`
8+file.
9+
10+.. sidebar:: Further reading ..
11+
12+ - :ref:`use_default_settings.yml`
13+ - :ref:`search API`
14+
15+.. contents:: Contents
16+ :depth: 2
17+ :local:
18+ :backlinks: entry
19+
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+
34+.. _settings global:
35+
36+Global Settings
37+===============
38+
39+``general:``
40+------------
41+
42+.. code:: yaml
43+
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
55+
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.
59+
60+``contact_url``:
61+ Contact ``mailto:`` address or WEB form.
62+
63+``git_url`` and ``git_branch``:
64+ Changes this, to point to your searx fork (branch).
65+
66+``docs_url``
67+ If you host your own documentation, change this URL.
68+
69+``wiki_url``:
70+ Link to your wiki (or ``False``)
71+
72+``twitter_url``:
73+ Link to your tweets (or ``False``)
74+
75+
76+``server:``
77+-----------
78+
79+.. code:: yaml
80+
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.
103+
104+``base_url`` :
105+ The base URL where searx is deployed. Used to create correct inbound links.
106+
107+``image_proxy`` :
108+ Allow your instance of searx of being able to proxy images. Uses memory space.
109+
110+``default_locale`` :
111+ Searx interface language. If blank, the locale is detected by using the
112+ browser language. If it doesn't work, or you are deploying a language
113+ specific instance of searx, a locale can be defined using an ISO language
114+ code, like ``fr``, ``en``, ``de``.
115+
116+``default_theme`` :
117+ Name of the theme you want to use by default on your searx instance.
118+
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.
168+
169+``source_ips`` :
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
219+
220+``locales`` :
221+ Locales codes and their names. Available translations of searx interface.
222+
223+
224+.. _settings engine:
225+
226+Engine settings
227+===============
228+
229+.. sidebar:: Further reading ..
230+
231+ - :ref:`engines-dev`
232+
233+.. code:: yaml
234+
235+ - name : bing
236+ engine : bing
237+ shortcut : bi
238+ base_url : 'https://{language}.wikipedia.org/'
239+ categories : general
240+ timeout : 3.0
241+ api_key : 'apikey'
242+ disabled : True
243+ 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
260+
261+``name`` :
262+ Name that will be used across searx to define this engine. In settings, on
263+ the result page...
264+
265+``engine`` :
266+ Name of the python file used to handle requests and responses to and from this
267+ search engine.
268+
269+``shortcut`` :
270+ Code used to execute bang requests (in this case using ``!bi`` or ``?bi``)
271+
272+``base_url`` : optional
273+ Part of the URL that should be stable across every request. Can be useful to
274+ use multiple sites using only one engine, or updating the site URL without
275+ touching at the code.
276+
277+``categories`` : optional
278+ Define in which categories this engine will be active. Most of the time, it is
279+ defined in the code of the engine, but in a few cases it is useful, like when
280+ describing multiple search engine using the same code.
281+
282+``timeout`` : optional
283+ Timeout of the search with the current search engine. **Be careful, it will
284+ modify the global timeout of searx.**
285+
286+``api_key`` : optional
287+ In a few cases, using an API needs the use of a secret key. How to obtain them
288+ is described in the file.
289+
290+``disabled`` : optional
291+ To disable by default the engine, but not deleting it. It will allow the user
292+ to manually activate it in the settings.
293+
294+``language`` : optional
295+ If you want to use another language for a specific engine, you can define it
296+ by using the full ISO code of language and country, like ``fr_FR``, ``en_US``,
297+ ``de_DE``.
298+
299+``weigth`` : default ``1``
300+ Weighting of the results of this engine.
301+
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+
311+.. note::
312+
313+ A few more options are possible, but they are pretty specific to some
314+ 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.rstnew file+59
@@ -0,0 +1,59 @@
1+.. _update searx:
2+
3+=============
4+How to update
5+=============
6+
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+
18+.. code:: sh
19+
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
51+
52+ sudo -H ./utils/filtron.sh inspect service
53+
54+**Inspect** :ref:`result proxy <morty.sh>`
55+
56+.. code:: bash
57+
58+ sudo -H ./utils/morty.sh inspect service
59+
docs/blog/admin.rstnew file+43
@@ -0,0 +1,43 @@
1+=============================================================
2+Searx admin interface
3+=============================================================
4+
5+.. _searx-admin: https://github.com/kvch/searx-admin#searx-admin
6+.. _NLnet Foundation: https://nlnet.nl/
7+
8+ manage your instance from your browser
9+
10+.. sidebar:: Installation
11+
12+ Installation guide can be found in the repository of searx-admin_.
13+
14+One of the biggest advantages of searx is being extremely customizable. But at
15+first it can be daunting to newcomers. A barrier of taking advantage of this
16+feature is our ugly settings file which is sometimes hard to understand and
17+edit.
18+
19+To make self-hosting searx more accessible a new tool is introduced, called
20+``searx-admin``. It is a web application which is capable of managing your
21+instance and manipulating its settings via a web UI. It aims to replace editing
22+of ``settings.yml`` for less experienced administrators or people who prefer
23+graphical admin interfaces.
24+
25+.. figure:: searx-admin-engines.png
26+ :alt: Screenshot of engine list
27+
28+ Configuration page of engines
29+
30+Since ``searx-admin`` acts as a supervisor for searx, we have decided to
31+implement it as a standalone tool instead of part of searx. Another reason for
32+making it a standalone tool is that the codebase and dependencies of searx
33+should not grow because of a fully optional feature, which does not affect
34+existing instances.
35+
36+
37+Acknowledgements
38+================
39+
40+This development was sponsored by `NLnet Foundation`_.
41+
42+| Happy hacking.
43+| kvch // 2017.08.22 21:25
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.rstnew file+17
@@ -0,0 +1,17 @@
1+====
2+Blog
3+====
4+
5+.. toctree::
6+ :titlesonly:
7+ :reversed:
8+
9+ python3
10+ admin
11+ intro-offline
12+ private-engines
13+ lxcdev-202006
14+ command-line-engines
15+ search-indexer-engines
16+ sql-engines
17+ search-database-engines
docs/blog/intro-offline.rstnew file+77
@@ -0,0 +1,77 @@
1+===============================
2+Preparation for offline engines
3+===============================
4+
5+Offline engines
6+===============
7+
8+To extend the functionality of searx, offline engines are going to be
9+introduced. An offline engine is an engine which does not need Internet
10+connection to perform a search and does not use HTTP to communicate.
11+
12+Offline engines can be configured as online engines, by adding those to the
13+`engines` list of :origin:`settings.yml <searx/settings.yml>`. Thus, searx
14+finds the engine file and imports it.
15+
16+Example skeleton for the new engines:
17+
18+.. code:: python
19+
20+ from subprocess import PIPE, Popen
21+
22+ categories = ['general']
23+ offline = True
24+
25+ def init(settings):
26+ pass
27+
28+ def search(query, params):
29+ process = Popen(['ls', query], stdout=PIPE)
30+ return_code = process.wait()
31+ if return_code != 0:
32+ raise RuntimeError('non-zero return code', return_code)
33+
34+ results = []
35+ line = process.stdout.readline()
36+ while line:
37+ result = parse_line(line)
38+ results.append(results)
39+
40+ line = process.stdout.readline()
41+
42+ return results
43+
44+
45+Development progress
46+====================
47+
48+First, a proposal has been created as a Github issue. Then it was moved to the
49+wiki as a design document. You can read it here: :wiki:`Offline-engines`.
50+
51+In this development step, searx core was prepared to accept and perform offline
52+searches. Offline search requests are scheduled together with regular offline
53+requests.
54+
55+As offline searches can return arbitrary results depending on the engine, the
56+current result templates were insufficient to present such results. Thus, a new
57+template is introduced which is caplable of presenting arbitrary key value pairs
58+as a table. You can check out the pull request for more details see
59+:pull:`1700`.
60+
61+Next steps
62+==========
63+
64+Today, it is possible to create/run an offline engine. However, it is going to be publicly available for everyone who knows the searx instance. So the next step is to introduce token based access for engines. This way administrators are able to limit the access to private engines.
65+
66+Acknowledgement
67+===============
68+
69+This development was sponsored by `Search and Discovery Fund`_ of `NLnet Foundation`_ .
70+
71+.. _Search and Discovery Fund: https://nlnet.nl/discovery
72+.. _NLnet Foundation: https://nlnet.nl/
73+
74+
75+| Happy hacking.
76+| kvch // 2019.10.21 17:03
77+
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.rstnew file+65
@@ -0,0 +1,65 @@
1+==================================
2+Limit access to your searx engines
3+==================================
4+
5+Administrators might find themselves wanting to limit access to some of the
6+enabled engines on their instances. It might be because they do not want to
7+expose some private information through an offline engine. Or they
8+would rather share engines only with their trusted friends or colleagues.
9+
10+.. _private engines:
11+
12+Private engines
13+===============
14+
15+To solve this issue private engines were introduced in :pull:`1823`.
16+A new option was added to engines named `tokens`. It expects a list
17+of strings. If the user making a request presents one of the tokens
18+of an engine, they can access information about the engine
19+and make search requests.
20+
21+Example configuration to restrict access to the Arch Linux Wiki engine:
22+
23+.. code:: yaml
24+
25+ - name : arch linux wiki
26+ engine : archlinux
27+ shortcut : al
28+ tokens : [ 'my-secret-token' ]
29+
30+
31+Unless a user has configured the right token, the engine is going
32+to be hidden from him/her. It is not going to be included in the
33+list of engines on the Preferences page and in the output of
34+`/config` REST API call.
35+
36+Tokens can be added to one's configuration on the Preferences page
37+under "Engine tokens". The input expects a comma separated list of
38+strings.
39+
40+The distribution of the tokens from the administrator to the users
41+is not carved in stone. As providing access to such engines
42+implies that the admin knows and trusts the user, we do not see
43+necessary to come up with a strict process. Instead,
44+we would like to add guidelines to the documentation of the feature.
45+
46+Next steps
47+==========
48+
49+Now that searx has support for both offline engines and private engines,
50+it is possible to add concrete engines which benefit from these features.
51+For example engines which search on the local host running the instance.
52+Be it searching your file system or querying a private database. Be creative
53+and come up with new solutions which fit your use case.
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.02.28 22:26
docs/blog/python3.rstnew file+68
@@ -0,0 +1,68 @@
1+============================
2+Introducing Python 3 support
3+============================
4+
5+.. _Python 2.7 clock: https://pythonclock.org/
6+
7+.. sidebar:: Python 2.7 to 3 upgrade
8+
9+ This chapter exists of historical reasons. Python 2.7 release schedule ends
10+ (`Python 2.7 clock`_) after 11 years Python 3 exists
11+
12+As most operation systems are coming with Python3 installed by default. So it is
13+time for searx to support Python3. But don't worry support of Python2.7 won't be
14+dropped.
15+
16+.. image:: searxpy3.png
17+ :scale: 50 %
18+ :alt: hurray
19+ :align: center
20+
21+
22+How to run searx using Python 3
23+===============================
24+
25+Please make sure that you run at least Python 3.5.
26+
27+To run searx, first a Python3 virtualenv should be created. After entering the
28+virtualenv, dependencies must be installed. Then run searx with python3 instead
29+of the usual python command.
30+
31+.. code:: sh
32+
33+ virtualenv -p python3 venv3
34+ source venv3/bin/activate
35+ pip3 install -r requirements.txt
36+ python3 searx/webapp.py
37+
38+
39+If you want to run searx using Python2.7, you don't have to do anything
40+differently as before.
41+
42+Fun facts
43+=========
44+
45+- 115 files were changed when implementing the support for both Python versions.
46+
47+- All of the dependencies was compatible except for the robotframework used for
48+ browser tests. Thus, these tests were migrated to splinter. So from now on
49+ both versions are being tested on Travis and can be tested locally.
50+
51+If you found bugs
52+=================
53+
54+Please open an issue on `GitHub`_. Make sure that you mention your Python
55+version in your issue, so we can investigate it properly.
56+
57+.. _GitHub: https://github.com/searx/searx/issues
58+
59+Acknowledgment
60+==============
61+
62+This development was sponsored by `NLnet Foundation`_.
63+
64+.. _NLnet Foundation: https://nlnet.nl/
65+
66+
67+| Happy hacking.
68+| kvch // 2017.05.13 22:57
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/searx-admin-engines.pngnew file

Binary file not shown.

docs/blog/searxpy3.pngnew file

Binary file not shown.

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.rstnew file+210
@@ -0,0 +1,210 @@
1+.. template evaluated by: ./utils/searx.sh docs
2+.. hint: all dollar-names are variables, dollar sign itself is quoted by: \\$
3+
4+.. START distro-packages
5+
6+.. tabs::
7+
8+ .. group-tab:: Ubuntu / debian
9+
10+ .. code-block:: sh
11+
12+ $ sudo -H apt-get install -y \\
13+${debian}
14+
15+ .. group-tab:: Arch Linux
16+
17+ .. code-block:: sh
18+
19+ $ sudo -H pacman -S --noconfirm \\
20+${arch}
21+
22+ .. group-tab:: Fedora / RHEL
23+
24+ .. code-block:: sh
25+
26+ $ sudo -H dnf install -y \\
27+${fedora}
28+
29+.. END distro-packages
30+
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
57+
58+.. START create user
59+
60+.. tabs::
61+
62+ .. group-tab:: bash
63+
64+ .. code-block:: sh
65+
66+ $ sudo -H useradd --shell /bin/bash --system \\
67+ --home-dir \"$SERVICE_HOME\" \\
68+ --comment 'Privacy-respecting metasearch engine' $SERVICE_USER
69+
70+ $ sudo -H mkdir \"$SERVICE_HOME\"
71+ $ sudo -H chown -R \"$SERVICE_GROUP:$SERVICE_GROUP\" \"$SERVICE_HOME\"
72+
73+.. END create user
74+
75+.. START clone searx
76+
77+.. tabs::
78+
79+ .. group-tab:: bash
80+
81+ .. code-block:: sh
82+
83+ $ sudo -H -u ${SERVICE_USER} -i
84+ (${SERVICE_USER})$ git clone \"https://github.com/searx/searx.git\" \"$SEARX_SRC\"
85+
86+.. END clone searx
87+
88+.. START create virtualenv
89+
90+.. tabs::
91+
92+ .. group-tab:: bash
93+
94+ .. code-block:: sh
95+
96+ (${SERVICE_USER})$ python3 -m venv \"${SEARX_PYENV}\"
97+ (${SERVICE_USER})$ echo \". ${SEARX_PYENV}/bin/activate\" >> \"$SERVICE_HOME/.profile\"
98+
99+.. END create virtualenv
100+
101+.. START manage.sh update_packages
102+
103+.. tabs::
104+
105+ .. group-tab:: bash
106+
107+ .. code-block:: sh
108+
109+ $ sudo -H -u ${SERVICE_USER} -i
110+
111+ (${SERVICE_USER})$ command -v python && python --version
112+ $SEARX_PYENV/bin/python
113+ Python 3.8.1
114+
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+
125+
126+.. END manage.sh update_packages
127+
128+.. START searx config
129+
130+.. tabs::
131+
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
151+
152+ .. code-block:: sh
153+
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\"
156+
157+.. END searx config
158+
159+.. START check searx installation
160+
161+.. tabs::
162+
163+ .. group-tab:: bash
164+
165+ .. code-block:: sh
166+
167+ # enable debug ..
168+ $ sudo -H sed -i -e \"s/debug : False/debug : True/g\" \"$SEARX_SETTINGS_PATH\"
169+
170+ # start webapp
171+ $ sudo -H -u ${SERVICE_USER} -i
172+ (${SERVICE_USER})$ cd ${SEARX_SRC}
173+ (${SERVICE_USER})$ export SEARX_SETTINGS_PATH=\"${SEARX_SETTINGS_PATH}\"
174+ (${SERVICE_USER})$ python searx/webapp.py
175+
176+ # disable debug
177+ $ sudo -H sed -i -e \"s/debug : True/debug : False/g\" \"$SEARX_SETTINGS_PATH\"
178+
179+Open WEB browser and visit http://$SEARX_INTERNAL_URL . If you are inside a
180+container or in a script, test with curl:
181+
182+.. tabs::
183+
184+ .. group-tab:: WEB browser
185+
186+ .. code-block:: sh
187+
188+ $ xdg-open http://$SEARX_INTERNAL_URL
189+
190+ .. group-tab:: curl
191+
192+ .. code-block:: none
193+
194+ $ curl --location --verbose --head --insecure $SEARX_INTERNAL_URL
195+
196+ * Trying 127.0.0.1:8888...
197+ * TCP_NODELAY set
198+ * Connected to 127.0.0.1 (127.0.0.1) port 8888 (#0)
199+ > HEAD / HTTP/1.1
200+ > Host: 127.0.0.1:8888
201+ > User-Agent: curl/7.68.0
202+ > Accept: */*
203+ >
204+ * Mark bundle as not supporting multiuse
205+ * HTTP 1.0, assume close after body
206+ < HTTP/1.0 200 OK
207+ HTTP/1.0 200 OK
208+ ...
209+
210+.. END check searx installation
docs/conf.pynew file+131
@@ -0,0 +1,131 @@
1+# -*- coding: utf-8 -*-
2+# SPDX-License-Identifier: AGPL-3.0-or-later
3+
4+import sys, os
5+from pallets_sphinx_themes import ProjectLink
6+
7+from searx import brand
8+from searx.version import VERSION_STRING
9+
10+# Project --------------------------------------------------------------
11+
12+project = u'searx'
13+copyright = u'2015-2021, Adam Tauber, Noémi Ványi'
14+author = u'Adam Tauber'
15+release, version = VERSION_STRING, VERSION_STRING
16+highlight_language = 'none'
17+
18+# General --------------------------------------------------------------
19+
20+master_doc = "index"
21+source_suffix = '.rst'
22+numfig = True
23+
24+exclude_patterns = ['build-templates/*.rst']
25+
26+import searx.search
27+import searx.engines
28+import searx.plugins
29+searx.search.initialize()
30+jinja_contexts = {
31+ 'searx': {
32+ 'engines': searx.engines.engines,
33+ 'plugins': searx.plugins.plugins
34+ },
35+}
36+
37+# usage:: lorem :patch:`f373169` ipsum
38+extlinks = {}
39+
40+# upstream links
41+extlinks['wiki'] = ('https://github.com/searx/searx/wiki/%s', ' ')
42+extlinks['pull'] = ('https://github.com/searx/searx/pull/%s', 'PR ')
43+
44+# links to custom brand
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: ')
49+extlinks['pypi'] = ('https://pypi.org/project/%s', 'PyPi: ')
50+extlinks['man'] = ('https://manpages.debian.org/jump?q=%s', '')
51+#extlinks['role'] = (
52+# 'https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-%s', '')
53+extlinks['duref'] = (
54+ 'https://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#%s', '')
55+extlinks['durole'] = (
56+ 'https://docutils.sourceforge.net/docs/ref/rst/roles.html#%s', '')
57+extlinks['dudir'] = (
58+ 'https://docutils.sourceforge.net/docs/ref/rst/directives.html#%s', '')
59+extlinks['ctan'] = (
60+ 'https://ctan.org/pkg/%s', 'CTAN: ')
61+
62+extensions = [
63+ 'sphinx.ext.imgmath',
64+ 'sphinx.ext.extlinks',
65+ 'sphinx.ext.viewcode',
66+ "sphinx.ext.autodoc",
67+ "sphinx.ext.intersphinx",
68+ "pallets_sphinx_themes",
69+ "sphinx_issues", # https://github.com/sloria/sphinx-issues/blob/master/README.rst
70+ "sphinxcontrib.jinja", # https://github.com/tardyp/sphinx-jinja
71+ "sphinxcontrib.programoutput", # https://github.com/NextThought/sphinxcontrib-programoutput
72+ 'linuxdoc.kernel_include', # Implementation of the 'kernel-include' reST-directive.
73+ 'linuxdoc.rstFlatTable', # Implementation of the 'flat-table' reST-directive.
74+ 'linuxdoc.kfigure', # Sphinx extension which implements scalable image handling.
75+ "sphinx_tabs.tabs", # https://github.com/djungelorm/sphinx-tabs
76+]
77+
78+intersphinx_mapping = {
79+ "python": ("https://docs.python.org/3/", None),
80+ "flask": ("https://flask.palletsprojects.com/", None),
81+ # "werkzeug": ("https://werkzeug.palletsprojects.com/", None),
82+ "jinja": ("https://jinja.palletsprojects.com/", None),
83+ "linuxdoc" : ("https://return42.github.io/linuxdoc/", None),
84+ "sphinx" : ("https://www.sphinx-doc.org/en/master/", None),
85+}
86+
87+issues_github_path = "searx/searx"
88+
89+# HTML -----------------------------------------------------------------
90+
91+sys.path.append(os.path.abspath('_themes'))
92+sys.path.insert(0, os.path.abspath("../utils/"))
93+html_theme_path = ['_themes']
94+html_theme = "searx"
95+
96+# sphinx.ext.imgmath setup
97+html_math_renderer = 'imgmath'
98+imgmath_image_format = 'svg'
99+imgmath_font_size = 14
100+# sphinx.ext.imgmath setup END
101+
102+html_theme_options = {"index_sidebar_logo": True}
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+
118+html_sidebars = {
119+ "**": ["project.html", "relations.html", "searchbox.html"],
120+}
121+singlehtml_sidebars = {"index": ["project.html", "localtoc.html"]}
122+html_static_path = ["static"]
123+html_logo = "static/img/searx_logo_small.png"
124+html_title = "Searx Documentation ({})".format("Searx-{}.tex".format(VERSION_STRING))
125+html_show_sourcelink = False
126+
127+# LaTeX ----------------------------------------------------------------
128+
129+latex_documents = [
130+ (master_doc, "searx-{}.tex".format(VERSION_STRING), html_title, author, "manual")
131+]
docs/dev/contribution_guide.rstnew file+189
@@ -0,0 +1,189 @@
1+.. _how to contribute:
2+
3+=================
4+How to contribute
5+=================
6+
7+.. contents:: Contents
8+ :depth: 2
9+ :local:
10+ :backlinks: entry
11+
12+Prime directives: Privacy, Hackability
13+======================================
14+
15+Searx has two prime directives, **privacy-by-design and hackability** . The
16+hackability comes in three levels:
17+
18+- support of search engines
19+- plugins to alter search behaviour
20+- hacking searx itself
21+
22+Note the lack of "world domination" among the directives. Searx has no
23+intention of wide mass-adoption, rounded corners, etc. The prime directive
24+"privacy" deserves a separate chapter, as it's quite uncommon unfortunately.
25+
26+Privacy-by-design
27+-----------------
28+
29+Searx was born out of the need for a **privacy-respecting** search tool which
30+can be extended easily to maximize both, its search and its privacy protecting
31+capabilities.
32+
33+A few widely used features work differently or turned off by default or not
34+implemented at all **as a consequence of privacy-by-design**.
35+
36+If a feature reduces the privacy preserving aspects of searx, it should be
37+switched off by default or should not implemented at all. There are plenty of
38+search engines already providing such features. If a feature reduces the
39+protection of searx, users must be informed about the effect of choosing to
40+enable it. Features that protect privacy but differ from the expectations of
41+the user should also be explained.
42+
43+Also, if you think that something works weird with searx, it's might be because
44+of the tool you use is designed in a way to interfere with the privacy respect.
45+Submitting a bugreport to the vendor of the tool that misbehaves might be a good
46+feedback to reconsider the disrespect to its customers (e.g. ``GET`` vs ``POST``
47+requests in various browsers).
48+
49+Remember the other prime directive of searx is to be hackable, so if the above
50+privacy concerns do not fancy you, simply fork it.
51+
52+ *Happy hacking.*
53+
54+Code
55+====
56+
57+.. _PEP8: https://www.python.org/dev/peps/pep-0008/
58+.. _Conventional Commits: https://www.conventionalcommits.org/
59+.. _Git Commit Good Practice: https://wiki.openstack.org/wiki/GitCommitMessages
60+.. _Structural split of changes:
61+ https://wiki.openstack.org/wiki/GitCommitMessages#Structural_split_of_changes
62+.. _gitmoji: https://gitmoji.carloscuesta.me/
63+.. _Semantic PR: https://github.com/zeke/semantic-pull-requests
64+
65+.. sidebar:: Create good commits!
66+
67+ - `Structural split of changes`_
68+ - `Conventional Commits`_
69+ - `Git Commit Good Practice`_
70+ - some like to use: gitmoji_
71+ - not yet active: `Semantic PR`_
72+
73+In order to submit a patch, please follow the steps below:
74+
75+- Follow coding conventions.
76+
77+ - PEP8_ standards apply, except the convention of line length
78+ - Maximum line length is 120 characters
79+
80+- The cardinal rule for creating good commits is to ensure there is only one
81+ *logical change* per commit / read `Structural split of changes`_
82+
83+- Check if your code breaks existing tests. If so, update the tests or fix your
84+ code.
85+
86+- If your code can be unit-tested, add unit tests.
87+
88+- Add yourself to the :origin:`AUTHORS.rst` file.
89+
90+- Choose meaningful commit messages, read `Conventional Commits`_
91+
92+ .. code::
93+
94+ <type>[optional scope]: <description>
95+
96+ [optional body]
97+
98+ [optional footer(s)]
99+
100+- Create a pull request.
101+
102+For more help on getting started with searx development, see :ref:`devquickstart`.
103+
104+
105+Translation
106+===========
107+
108+Translation currently takes place on :ref:`transifex <translation>`.
109+
110+.. caution::
111+
112+ Please, do not update translation files in the repo.
113+
114+
115+.. _contrib docs:
116+
117+Documentation
118+=============
119+
120+.. _Sphinx: https://www.sphinx-doc.org
121+.. _reST: https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html
122+
123+.. sidebar:: The reST sources
124+
125+ has been moved from ``gh-branch`` into ``master`` (:origin:`docs`).
126+
127+The documentation is built using Sphinx_. So in order to be able to generate
128+the required files, you have to install it on your system. Much easier, use
129+our :ref:`makefile`.
130+
131+Here is an example which makes a complete rebuild:
132+
133+.. code:: sh
134+
135+ $ make docs.clean docs.html
136+ ...
137+ The HTML pages are in dist/docs.
138+
139+.. _make docs.live:
140+
141+live build
142+----------
143+
144+.. _sphinx-autobuild:
145+ https://github.com/executablebooks/sphinx-autobuild/blob/master/README.md
146+
147+.. sidebar:: docs.clean
148+
149+ It is recommended to assert a complete rebuild before deploying (use
150+ ``docs.clean``).
151+
152+Live build is like WYSIWYG. If you want to edit the documentation, its
153+recommended to use. The Makefile target ``docs.live`` builds the docs, opens
154+URL in your favorite browser and rebuilds every time a reST file has been
155+changed.
156+
157+.. code:: sh
158+
159+ $ make docs.live
160+ ...
161+ The HTML pages are in dist/docs.
162+ ... Serving on http://0.0.0.0:8000
163+ ... Start watching changes
164+
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+
177+
178+.. _deploy on github.io:
179+
180+deploy on github.io
181+-------------------
182+
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:
186+
187+.. code:: sh
188+
189+ $ make docs.clean docs.gh-pages
docs/dev/csv_table.txtnew file+6
@@ -0,0 +1,6 @@
1+stub col row 1, column, "loremLorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
2+eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
3+voluptua."
4+stub col row 1, "At vero eos et accusam et justo duo dolores et ea rebum. Stet clita
5+kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.", column
6+stub col row 1, column, column
docs/dev/engine_overview.rstnew file+306
@@ -0,0 +1,306 @@
1+
2+.. _engines-dev:
3+
4+===============
5+Engine overview
6+===============
7+
8+.. _metasearch-engine: https://en.wikipedia.org/wiki/Metasearch_engine
9+
10+searx is a metasearch-engine_, so it uses different search engines to provide
11+better results.
12+
13+Because there is no general search API which could be used for every search
14+engine, an adapter has to be built between searx and the external search
15+engines. Adapters are stored under the folder :origin:`searx/engines`.
16+
17+.. contents::
18+ :depth: 3
19+ :backlinks: entry
20+
21+
22+.. _general engine configuration:
23+
24+general engine configuration
25+============================
26+
27+It is required to tell searx the type of results the engine provides. The
28+arguments can be set in the engine file or in the settings file
29+(normally ``settings.yml``). The arguments in the settings file override
30+the ones in the engine file.
31+
32+It does not matter if an option is stored in the engine file or in the
33+settings. However, the standard way is the following:
34+
35+.. _engine file:
36+
37+engine file
38+-----------
39+
40+======================= =========== ========================================================
41+argument type information
42+======================= =========== ========================================================
43+categories list pages, in which the engine is working
44+paging boolean support multible pages
45+time_range_support boolean support search time range
46+engine_type str ``online`` by default, other possibles values are
47+ ``offline``, ``online_dictionnary``, ``online_currency``
48+======================= =========== ========================================================
49+
50+.. _engine settings:
51+
52+settings.yml
53+------------
54+
55+======================= =========== =============================================
56+argument type information
57+======================= =========== =============================================
58+name string name of search-engine
59+engine string name of searx-engine
60+ (filename without ``.py``)
61+enable_http bool enable HTTP
62+ (by default only HTTPS is enabled).
63+shortcut string shortcut of search-engine
64+timeout string specific timeout for search-engine
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+======================= =========== =============================================
70+
71+
72+overrides
73+---------
74+
75+A few of the options have default values in the engine, but are often
76+overwritten by the settings. If ``None`` is assigned to an option in the engine
77+file, it has to be redefined in the settings, otherwise searx will not start
78+with that engine.
79+
80+The naming of overrides is arbitrary. But the recommended overrides are the
81+following:
82+
83+======================= =========== ===========================================
84+argument type information
85+======================= =========== ===========================================
86+base_url string base-url, can be overwritten to use same
87+ engine on other URL
88+number_of_results int maximum number of results per request
89+language string ISO code of language and country like en_US
90+api_key string api-key if required by engine
91+======================= =========== ===========================================
92+
93+example code
94+------------
95+
96+.. code:: python
97+
98+ # engine dependent config
99+ categories = ['general']
100+ paging = True
101+
102+
103+making a request
104+================
105+
106+To perform a search an URL have to be specified. In addition to specifying an
107+URL, arguments can be passed to the query.
108+
109+passed arguments
110+----------------
111+
112+These arguments can be used to construct the search query. Furthermore,
113+parameters with default value can be redefined for special purposes.
114+
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+
137+====================== ============ ========================================================================
138+argument type default-value, information
139+====================== ============ ========================================================================
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+
147+====================== ============ ========================================================================
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+
157+
158+parsed arguments
159+----------------
160+
161+The function ``def request(query, params):`` always returns the ``params``
162+variable. Inside searx, the following paramters can be used to specify a search
163+request:
164+
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+=================== =========== ==========================================================================
179+
180+
181+example code
182+------------
183+
184+.. code:: python
185+
186+ # search-url
187+ base_url = 'https://example.com/'
188+ search_string = 'search?{query}&page={page}'
189+
190+ # do search-request
191+ def request(query, params):
192+ search_path = search_string.format(
193+ query=urlencode({'q': query}),
194+ page=params['pageno'])
195+
196+ params['url'] = base_url + search_path
197+
198+ return params
199+
200+
201+returned results
202+================
203+
204+Searx is able to return results of different media-types. Currently the
205+following media-types are supported:
206+
207+- default_
208+- images_
209+- videos_
210+- torrent_
211+- map_
212+
213+To set another media-type as default, the parameter ``template`` must be set to
214+the desired type.
215+
216+default
217+-------
218+
219+========================= =====================================================
220+result-parameter information
221+========================= =====================================================
222+url string, url of the result
223+title string, title of the result
224+content string, general result-text
225+publishedDate :py:class:`datetime.datetime`, time of publish
226+========================= =====================================================
227+
228+images
229+------
230+
231+To use this template, the parameter:
232+
233+========================= =====================================================
234+result-parameter information
235+========================= =====================================================
236+template is set to ``images.html``
237+url string, url to the result site
238+title string, title of the result *(partly implemented)*
239+content *(partly implemented)*
240+publishedDate :py:class:`datetime.datetime`,
241+ time of publish *(partly implemented)*
242+img\_src string, url to the result image
243+thumbnail\_src string, url to a small-preview image
244+========================= =====================================================
245+
246+videos
247+------
248+
249+========================= =====================================================
250+result-parameter information
251+========================= =====================================================
252+template is set to ``videos.html``
253+url string, url of the result
254+title string, title of the result
255+content *(not implemented yet)*
256+publishedDate :py:class:`datetime.datetime`, time of publish
257+thumbnail string, url to a small-preview image
258+========================= =====================================================
259+
260+torrent
261+-------
262+
263+.. _magnetlink: https://en.wikipedia.org/wiki/Magnet_URI_scheme
264+
265+========================= =====================================================
266+result-parameter information
267+========================= =====================================================
268+template is set to ``torrent.html``
269+url string, url of the result
270+title string, title of the result
271+content string, general result-text
272+publishedDate :py:class:`datetime.datetime`,
273+ time of publish *(not implemented yet)*
274+seed int, number of seeder
275+leech int, number of leecher
276+filesize int, size of file in bytes
277+files int, number of files
278+magnetlink string, magnetlink_ of the result
279+torrentfile string, torrentfile of the result
280+========================= =====================================================
281+
282+
283+map
284+---
285+
286+========================= =====================================================
287+result-parameter information
288+========================= =====================================================
289+url string, url of the result
290+title string, title of the result
291+content string, general result-text
292+publishedDate :py:class:`datetime.datetime`, time of publish
293+latitude latitude of result (in decimal format)
294+longitude longitude of result (in decimal format)
295+boundingbox boundingbox of result (array of 4. values
296+ ``[lat-min, lat-max, lon-min, lon-max]``)
297+geojson geojson of result (https://geojson.org/)
298+osm.type type of osm-object (if OSM-Result)
299+osm.id id of osm-object (if OSM-Result)
300+address.name name of object
301+address.road street name of object
302+address.house_number house number of object
303+address.locality city, place of object
304+address.postcode postcode of object
305+address.country country of object
306+========================= =====================================================
docs/dev/hello.dotnew file+3
@@ -0,0 +1,3 @@
1+graph G {
2+ Hello -- World
3+}
docs/dev/index.rstnew file+16
@@ -0,0 +1,16 @@
1+=======================
2+Developer documentation
3+=======================
4+
5+.. toctree::
6+ :maxdepth: 2
7+ :caption: Contents
8+
9+ quickstart
10+ contribution_guide
11+ engine_overview
12+ search_api
13+ plugins
14+ translation
15+ makefile
16+ reST
docs/dev/makefile.rstnew file+222
@@ -0,0 +1,222 @@
1+.. _makefile:
2+
3+========
4+Makefile
5+========
6+
7+.. _gnu-make: https://www.gnu.org/software/make/manual/make.html#Introduction
8+
9+.. sidebar:: build environment
10+
11+ Before looking deeper at the targets, first read about :ref:`make
12+ install`.
13+
14+ To install system requirements follow :ref:`buildhosts`.
15+
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.
19+
20+The usage is simple, just type ``make {target-name}`` to *build* a target.
21+Calling the ``help`` target gives a first overview (``make help``):
22+
23+.. program-output:: bash -c "cd ..; make --no-print-directory help"
24+
25+.. contents:: Contents
26+ :depth: 2
27+ :local:
28+ :backlinks: entry
29+
30+.. _make install:
31+
32+Python environment
33+==================
34+
35+.. sidebar:: activate environment
36+
37+ ``source ./local/py3/bin/activate``
38+
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`). ::
42+
43+ $ cd ~/searx-clone
44+ $ make install
45+ PYENV [virtualenv] installing ./requirements*.txt into local/py3
46+ ...
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
54+
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`). ::
59+
60+ $ make install
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
75+
76+.. sidebar:: drop environment
77+
78+ To get rid of the existing environment before re-build use :ref:`clean target
79+ <make clean>` first.
80+
81+If you think, something goes wrong with your ./local environment or you change
82+the :origin:`setup.py` file, you have to call :ref:`make clean`.
83+
84+.. _make run:
85+
86+``make run``
87+============
88+
89+To get up a running a developer instance simply call ``make run``. This enables
90+*debug* option in :origin:`searx/settings.yml`, starts a ``./searx/webapp.py``
91+instance, disables *debug* option again and opens the URL in your favorite WEB
92+browser (:man:`xdg-open`)::
93+
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)
99+
100+.. _make clean:
101+
102+``make clean``
103+==============
104+
105+Drop all intermediate files, all builds, but keep sources untouched. Before
106+calling ``make clean`` stop all processes using :ref:`make install`. ::
107+
108+ $ make 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
115+
116+.. _make docs:
117+
118+``make docs docs.autobuild docs.clean``
119+=======================================
120+
121+We describe the usage of the ``doc.*`` targets in the :ref:`How to contribute /
122+Documentation <contrib docs>` section. If you want to edit the documentation
123+read our :ref:`make docs.live` section. If you are working in your own brand,
124+adjust your :ref:`settings global`.
125+
126+.. _make docs.gh-pages:
127+
128+``make docs.gh-pages``
129+======================
130+
131+To deploy on github.io first adjust your :ref:`settings global`. For any
132+further read :ref:`deploy on github.io`.
133+
134+.. _make test:
135+
136+``make test``
137+=============
138+
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.::
141+
142+ $ make test.pep8 test.unit test.sh
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.
156+
157+.. _make test.pylint:
158+
159+``make test.pylint``
160+====================
161+
162+.. _Pylint: https://www.pylint.org/
163+
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`.
167+
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+ --
199+
200+
201+``make pybuild``
202+================
203+
204+.. _PyPi: https://pypi.org/
205+.. _twine: https://twine.readthedocs.io/en/latest/
206+
207+Build Python packages in ``./dist/py``::
208+
209+ $ make pybuild
210+ ...
211+ BUILD pybuild
212+ running sdist
213+ running egg_info
214+ ...
215+ running bdist_wheel
216+
217+ $ ls ./dist
218+ searx-0.18.0-py3-none-any.whl searx-0.18.0.tar.gz
219+
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.rstnew file+69
@@ -0,0 +1,69 @@
1+.. _dev plugin:
2+
3+=======
4+Plugins
5+=======
6+
7+.. sidebar:: Further reading ..
8+
9+ - :ref:`plugins generic`
10+
11+Plugins can extend or replace functionality of various components of searx.
12+
13+Example plugin
14+==============
15+
16+.. code:: python
17+
18+ name = 'Example plugin'
19+ description = 'This plugin extends the suggestions with the word "example"'
20+ default_on = False # disabled by default
21+
22+ js_dependencies = tuple() # optional, list of static js files
23+ css_dependencies = tuple() # optional, list of static css files
24+
25+
26+ # attach callback to the post search hook
27+ # request: flask request object
28+ # ctx: the whole local context of the post search hook
29+ def post_search(request, ctx):
30+ ctx['search'].suggestions.add('example')
31+ return True
32+
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+
48+Plugin entry points
49+===================
50+
51+Entry points (hooks) define when a plugin runs. Right now only three hooks are
52+implemented. So feel free to implement a hook if it fits the behaviour of your
53+plugin.
54+
55+Pre search hook
56+---------------
57+
58+Runs BEFORE the search request. Function to implement: ``pre_search``
59+
60+Post search hook
61+----------------
62+
63+Runs AFTER the search request. Function to implement: ``post_search``
64+
65+Result hook
66+-----------
67+
68+Runs when a new result is added to the result list. Function to implement:
69+``on_result``
docs/dev/quickstart.rstnew file+55
@@ -0,0 +1,55 @@
1+.. _devquickstart:
2+
3+======================
4+Development Quickstart
5+======================
6+
7+.. _npm: https://www.npmjs.com/
8+
9+Searx loves developers, just clone and start hacking. All the rest is done for
10+you simply by using :ref:`make <makefile>`.
11+
12+.. code:: sh
13+
14+ git clone https://github.com/searx/searx.git
15+
16+Here is how a minimal workflow looks like:
17+
18+1. *start* hacking
19+2. *run* your code: :ref:`make run`
20+3. *test* your code: :ref:`make test`
21+
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.
26+
27+If you implement themes, you will need to compile styles and JavaScript before
28+*run*.
29+
30+.. code:: sh
31+
32+ make themes
33+
34+Don't forget to install npm_ first.
35+
36+.. tabs::
37+
38+ .. group-tab:: Ubuntu / debian
39+
40+ .. code:: sh
41+
42+ sudo -H apt-get install npm
43+
44+ .. group-tab:: Arch Linux
45+
46+ .. code-block:: sh
47+
48+ sudo -H pacman -S npm
49+
50+ .. group-tab:: Fedora / RHEL
51+
52+ .. code-block:: sh
53+
54+ sudo -H dnf install npm
55+
docs/dev/reST.rstnew file+1436
@@ -0,0 +1,1436 @@
1+.. _reST primer:
2+
3+===========
4+reST primer
5+===========
6+
7+.. sidebar:: KISS_ and readability_
8+
9+ Instead of defining more and more roles, we at searx encourage our
10+ contributors to follow principles like KISS_ and readability_.
11+
12+We at searx are using reStructuredText (aka reST_) markup for all kind of
13+documentation, with the builders from the Sphinx_ project a HTML output is
14+generated and deployed at :docs:`github.io <.>`. For build prerequisites read
15+:ref:`docs build`.
16+
17+The 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.
20+
21+.. sidebar:: Further reading
22+
23+ - Sphinx-Primer_
24+ - `Sphinx markup constructs`_
25+ - reST_, docutils_, `docutils FAQ`_
26+ - Sphinx_, `sphinx-doc FAQ`_
27+ - `sphinx config`_, doctree_
28+ - `sphinx cross references`_
29+ - linuxdoc_
30+ - intersphinx_
31+ - sphinx-jinja_
32+ - `Sphinx's autodoc`_
33+ - `Sphinx's Python domain`_, `Sphinx's C domain`_
34+ - SVG_, ImageMagick_
35+ - DOT_, `Graphviz's dot`_, Graphviz_
36+
37+
38+.. contents:: Contents
39+ :depth: 3
40+ :local:
41+ :backlinks: entry
42+
43+Sphinx_ and reST_ have their place in the python ecosystem. Over that reST is
44+used in popular projects, e.g the Linux kernel documentation `[kernel doc]`_.
45+
46+.. _[kernel doc]: https://www.kernel.org/doc/html/latest/doc-guide/sphinx.html
47+
48+.. sidebar:: Content matters
49+
50+ The readability_ of the reST sources has its value, therefore we recommend to
51+ make sparse usage of reST markup / .. content matters!
52+
53+**reST** is a plaintext markup language, its markup is *mostly* intuitive and
54+you will not need to learn much to produce well formed articles with. I use the
55+word *mostly*: like everything in live, reST has its advantages and
56+disadvantages, some markups feel a bit grumpy (especially if you are used to
57+other plaintext markups).
58+
59+Soft skills
60+===========
61+
62+Before going any deeper into the markup let's face on some **soft skills** a
63+trained author brings with, to reach a well feedback from readers:
64+
65+- Documentation is dedicated to an audience and answers questions from the
66+ audience point of view.
67+- Don't detail things which are general knowledge from the audience point of
68+ view.
69+- Limit the subject, use cross links for any further reading.
70+
71+To be more concrete what a *point of view* means. In the (:origin:`docs`)
72+folder we have three sections (and the *blog* folder), each dedicate to a
73+different group of audience.
74+
75+User's POV: :origin:`docs/user`
76+ A typical user knows about search engines and might have heard about
77+ meta crawlers and privacy.
78+
79+Admin's POV: :origin:`docs/admin`
80+ A typical Admin knows about setting up services on a linux system, but he does
81+ not know all the pros and cons of a searx setup.
82+
83+Developer's POV: :origin:`docs/dev`
84+ Depending on the readability_ of code, a typical developer is able to read and
85+ understand source code. Describe what a item aims to do (e.g. a function).
86+ If the chronological order matters, describe it. Name the *out-of-limits
87+ conditions* and all the side effects a external developer will not know.
88+
89+.. _reST inline markup:
90+
91+Basic inline markup
92+===================
93+
94+.. sidebar:: Inline markup
95+
96+ - :ref:`reST roles`
97+ - :ref:`reST smart ref`
98+
99+Basic inline markup is done with asterisks and backquotes. If asterisks or
100+backquotes appear in running text and could be confused with inline markup
101+delimiters, they have to be escaped with a backslash (``\*pointer``).
102+
103+.. table:: basic inline markup
104+ :widths: 4 3 7
105+
106+ ================================================ ==================== ========================
107+ description rendered markup
108+ ================================================ ==================== ========================
109+ one asterisk for emphasis *italics* ``*italics*``
110+ two asterisks for strong emphasis **boldface** ``**boldface**``
111+ backquotes for code samples and literals ``foo()`` ````foo()````
112+ quote asterisks or backquotes \*foo is a pointer ``\*foo is a pointer``
113+ ================================================ ==================== ========================
114+
115+.. _reST basic structure:
116+
117+Basic article structure
118+=======================
119+
120+The basic structure of an article makes use of heading adornments to markup
121+chapter, sections and subsections.
122+
123+.. _reST template:
124+
125+reST template
126+-------------
127+
128+reST template for an simple article:
129+
130+.. code:: reST
131+
132+ .. _doc refname:
133+
134+ ==============
135+ Document title
136+ ==============
137+
138+ Lorem ipsum dolor sit amet, consectetur adipisici elit .. Further read
139+ :ref:`chapter refname`.
140+
141+ .. _chapter refname:
142+
143+ Chapter
144+ =======
145+
146+ Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
147+ aliquid ex ea commodi consequat ...
148+
149+ .. _section refname:
150+
151+ Section
152+ -------
153+
154+ lorem ..
155+
156+ .. _subsection refname:
157+
158+ Subsection
159+ ~~~~~~~~~~
160+
161+ lorem ..
162+
163+
164+Headings
165+--------
166+
167+#. title - with overline for document title:
168+
169+ .. code:: reST
170+
171+ ==============
172+ Document title
173+ ==============
174+
175+
176+#. chapter - with anchor named ``anchor name``:
177+
178+ .. code:: reST
179+
180+ .. _anchor name:
181+
182+ Chapter
183+ =======
184+
185+#. section
186+
187+ .. code:: reST
188+
189+ Section
190+ -------
191+
192+#. subsection
193+
194+ .. code:: reST
195+
196+ Subsection
197+ ~~~~~~~~~~
198+
199+
200+
201+Anchors & Links
202+===============
203+
204+.. _reST anchor:
205+
206+Anchors
207+-------
208+
209+.. _ref role:
210+ https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-ref
211+
212+To refer a point in the documentation a anchor is needed. The :ref:`reST
213+template <reST template>` shows an example where a chapter titled *"Chapters"*
214+gets an anchor named ``chapter title``. Another example from *this* document,
215+where the anchor named ``reST anchor``:
216+
217+.. code:: reST
218+
219+ .. _reST anchor:
220+
221+ Anchors
222+ -------
223+
224+ To refer a point in the documentation a anchor is needed ...
225+
226+To refer anchors use the `ref role`_ markup:
227+
228+.. code:: reST
229+
230+ Visit chapter :ref:`reST anchor`. Or set hyperlink text manualy :ref:`foo
231+ bar <reST anchor>`.
232+
233+.. admonition:: ``:ref:`` role
234+ :class: rst-example
235+
236+ Visist chapter :ref:`reST anchor`. Or set hyperlink text manualy :ref:`foo
237+ bar <reST anchor>`.
238+
239+.. _reST ordinary ref:
240+
241+Link ordinary URL
242+-----------------
243+
244+If you need to reference external URLs use *named* hyperlinks to maintain
245+readability of reST sources. Here is a example taken from *this* article:
246+
247+.. code:: reST
248+
249+ .. _Sphinx Field Lists:
250+ https://www.sphinx-doc.org/en/master/usage/restructuredtext/field-lists.html
251+
252+ With the *named* hyperlink `Sphinx Field Lists`_, the raw text is much more
253+ readable.
254+
255+ And this shows the alternative (less readable) hyperlink markup `Sphinx Field
256+ Lists
257+ <https://www.sphinx-doc.org/en/master/usage/restructuredtext/field-lists.html>`__.
258+
259+.. admonition:: Named hyperlink
260+ :class: rst-example
261+
262+ With the *named* hyperlink `Sphinx Field Lists`_, the raw text is much more
263+ readable.
264+
265+ And this shows the alternative (less readable) hyperlink markup `Sphinx Field
266+ Lists
267+ <https://www.sphinx-doc.org/en/master/usage/restructuredtext/field-lists.html>`__.
268+
269+
270+.. _reST smart ref:
271+
272+Smart refs
273+----------
274+
275+With the power of sphinx.ext.extlinks_ and intersphinx_ referencing external
276+content becomes smart.
277+
278+.. table:: smart refs with sphinx.ext.extlinks_ and intersphinx_
279+ :widths: 4 3 7
280+
281+ ========================== ================================== ====================================
282+ refer ... rendered example markup
283+ ========================== ================================== ====================================
284+ :rst:role:`rfc` :rfc:`822` ``:rfc:`822```
285+ :rst:role:`pep` :pep:`8` ``:pep:`8```
286+ sphinx.ext.extlinks_
287+ --------------------------------------------------------------------------------------------------
288+ project's wiki article :wiki:`Offline-engines` ``:wiki:`Offline-engines```
289+ to docs public URL :docs:`dev/reST.html` ``:docs:`dev/reST.html```
290+ files & folders origin :origin:`docs/dev/reST.rst` ``:origin:`docs/dev/reST.rst```
291+ pull request :pull:`1756` ``:pull:`1756```
292+ patch :patch:`af2cae6` ``:patch:`af2cae6```
293+ PyPi package :pypi:`searx` ``:pypi:`searx```
294+ manual page man :man:`bash` ``:man:`bash```
295+ intersphinx_
296+ --------------------------------------------------------------------------------------------------
297+ external anchor :ref:`python:and` ``:ref:`python:and```
298+ external doc anchor :doc:`jinja:templates` ``:doc:`jinja:templates```
299+ python code object :py:obj:`datetime.datetime` ``:py:obj:`datetime.datetime```
300+ flask code object :py:obj:`flask.Flask` ``:py:obj:`flask.Flask```
301+ ========================== ================================== ====================================
302+
303+
304+Intersphinx is configured in :origin:`docs/conf.py`:
305+
306+.. code:: python
307+
308+ intersphinx_mapping = {
309+ "python": ("https://docs.python.org/3/", None),
310+ "flask": ("https://flask.palletsprojects.com/", None),
311+ "jinja": ("https://jinja.palletsprojects.com/", None),
312+ "linuxdoc" : ("https://return42.github.io/linuxdoc/", None),
313+ "sphinx" : ("https://www.sphinx-doc.org/en/master/", None),
314+ }
315+
316+
317+To list all anchors of the inventory (e.g. ``python``) use:
318+
319+.. code:: sh
320+
321+ $ 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+ ...
325+
326+Literal blocks
327+==============
328+
329+The simplest form of :duref:`literal-blocks` is a indented block introduced by
330+two colons (``::``). For highlighting use :dudir:`highlight` or :ref:`reST
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).
334+
335+.. _reST literal:
336+
337+``::``
338+------
339+
340+.. code:: reST
341+
342+ ::
343+
344+ Literal block
345+
346+ Lorem ipsum dolor::
347+
348+ Literal block
349+
350+ Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
351+ eirmod tempor invidunt ut labore ::
352+
353+ Literal block
354+
355+.. admonition:: Literal block
356+ :class: rst-example
357+
358+ ::
359+
360+ Literal block
361+
362+ Lorem ipsum dolor::
363+
364+ Literal block
365+
366+ Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
367+ eirmod tempor invidunt ut labore ::
368+
369+ Literal block
370+
371+
372+.. _reST code:
373+
374+``code-block``
375+--------------
376+
377+.. _pygments: https://pygments.org/languages/
378+
379+.. sidebar:: Syntax highlighting
380+
381+ is handled by pygments_.
382+
383+The :rst:dir:`code-block` directive is a variant of the :dudir:`code` directive
384+with additional options. To learn more about code literals visit
385+:ref:`sphinx:code-examples`.
386+
387+.. code-block:: reST
388+
389+ The URL ``/stats`` handle is shown in :ref:`stats-handle`
390+
391+ .. code-block:: Python
392+ :caption: python code block
393+ :name: stats-handle
394+
395+ @app.route('/stats', methods=['GET'])
396+ def stats():
397+ """Render engine statistics page."""
398+ stats = get_engines_stats()
399+ return render(
400+ 'stats.html'
401+ , stats = stats )
402+
403+.. code-block:: reST
404+
405+.. admonition:: Code block
406+ :class: rst-example
407+
408+ The URL ``/stats`` handle is shown in :ref:`stats-handle`
409+
410+ .. code-block:: Python
411+ :caption: python code block
412+ :name: stats-handle
413+
414+ @app.route('/stats', methods=['GET'])
415+ def stats():
416+ """Render engine statistics page."""
417+ stats = get_engines_stats()
418+ return render(
419+ 'stats.html'
420+ , stats = stats )
421+
422+Unicode substitution
423+====================
424+
425+The :dudir:`unicode directive <unicode-character-codes>` converts Unicode
426+character codes (numerical values) to characters. This directive can only be
427+used within a substitution definition.
428+
429+.. code-block:: reST
430+
431+ .. |copy| unicode:: 0xA9 .. copyright sign
432+ .. |(TM)| unicode:: U+2122
433+
434+ Trademark |(TM)| and copyright |copy| glyphs.
435+
436+.. admonition:: Unicode
437+ :class: rst-example
438+
439+ .. |copy| unicode:: 0xA9 .. copyright sign
440+ .. |(TM)| unicode:: U+2122
441+
442+ Trademark |(TM)| and copyright |copy| glyphs.
443+
444+
445+.. _reST roles:
446+
447+Roles
448+=====
449+
450+.. sidebar:: Further reading
451+
452+ - `Sphinx Roles`_
453+ - :doc:`sphinx:usage/restructuredtext/domains`
454+
455+
456+A *custom interpreted text role* (:duref:`ref <roles>`) is an inline piece of
457+explicit markup. It signifies that that the enclosed text should be interpreted
458+in a specific way.
459+
460+The general markup is one of:
461+
462+.. code:: reST
463+
464+ :rolename:`ref-name`
465+ :rolename:`ref text <ref-name>`
466+
467+.. table:: smart refs with sphinx.ext.extlinks_ and intersphinx_
468+ :widths: 4 3 7
469+
470+ ========================== ================================== ====================================
471+ role rendered example markup
472+ ========================== ================================== ====================================
473+ :rst:role:`guilabel` :guilabel:`&Cancel` ``:guilabel:`&Cancel```
474+ :rst:role:`kbd` :kbd:`C-x C-f` ``:kbd:`C-x C-f```
475+ :rst:role:`menuselection` :menuselection:`Open --> File` ``:menuselection:`Open --> File```
476+ :rst:role:`download` :download:`this file <reST.rst>` ``:download:`this file <reST.rst>```
477+ math_ :math:`a^2 + b^2 = c^2` ``:math:`a^2 + b^2 = c^2```
478+ :rst:role:`ref` :ref:`svg image example` ``:ref:`svg image example```
479+ :rst:role:`command` :command:`ls -la` ``:command:`ls -la```
480+ :durole:`emphasis` :emphasis:`italic` ``:emphasis:`italic```
481+ :durole:`strong` :strong:`bold` ``:strong:`bold```
482+ :durole:`literal` :literal:`foo()` ``:literal:`foo()```
483+ :durole:`subscript` H\ :sub:`2`\ O ``H\ :sub:`2`\ O``
484+ :durole:`superscript` E = mc\ :sup:`2` ``E = mc\ :sup:`2```
485+ :durole:`title-reference` :title:`Time` ``:title:`Time```
486+ ========================== ================================== ====================================
487+
488+Figures & Images
489+================
490+
491+.. sidebar:: Image processing
492+
493+ With the directives from :ref:`linuxdoc <linuxdoc:kfigure>` the build process
494+ is flexible. To get best results in the generated output format, install
495+ ImageMagick_ and Graphviz_.
496+
497+Searx's sphinx setup includes: :ref:`linuxdoc:kfigure`. Scaleable here means;
498+scaleable in sense of the build process. Normally in absence of a converter
499+tool, the build process will break. From the authors POV it’s annoying to care
500+about the build process when handling with images, especially since he has no
501+access to the build process. With :ref:`linuxdoc:kfigure` the build process
502+continues and scales output quality in dependence of installed image processors.
503+
504+If you want to add an image, you should use the ``kernel-figure`` (inheritance
505+of :dudir:`figure`) and ``kernel-image`` (inheritance of :dudir:`image`)
506+directives. E.g. to insert a figure with a scaleable image format use SVG
507+(:ref:`svg image example`):
508+
509+.. code:: reST
510+
511+ .. _svg image example:
512+
513+ .. kernel-figure:: svg_image.svg
514+ :alt: SVG image example
515+
516+ Simple SVG image
517+
518+ To refer the figure, a caption block is needed: :ref:`svg image example`.
519+
520+.. _svg image example:
521+
522+.. kernel-figure:: svg_image.svg
523+ :alt: SVG image example
524+
525+ Simple SVG image.
526+
527+To refer the figure, a caption block is needed: :ref:`svg image example`.
528+
529+DOT files (aka Graphviz)
530+------------------------
531+
532+With :ref:`linuxdoc:kernel-figure` reST support for **DOT** formatted files is
533+given.
534+
535+- `Graphviz's dot`_
536+- DOT_
537+- Graphviz_
538+
539+A simple example is shown in :ref:`dot file example`:
540+
541+.. code:: reST
542+
543+ .. _dot file example:
544+
545+ .. kernel-figure:: hello.dot
546+ :alt: hello world
547+
548+ DOT's hello world example
549+
550+.. admonition:: hello.dot
551+ :class: rst-example
552+
553+ .. _dot file example:
554+
555+ .. kernel-figure:: hello.dot
556+ :alt: hello world
557+
558+ DOT's hello world example
559+
560+``kernel-render`` DOT
561+---------------------
562+
563+Embed *render* markups (or languages) like Graphviz's **DOT** is provided by the
564+:ref:`linuxdoc:kernel-render` directive. A simple example of embedded DOT_ is
565+shown in figure :ref:`dot render example`:
566+
567+.. code:: reST
568+
569+ .. _dot render example:
570+
571+ .. kernel-render:: DOT
572+ :alt: digraph
573+ :caption: Embedded DOT (Graphviz) code
574+
575+ digraph foo {
576+ "bar" -> "baz";
577+ }
578+
579+ Attribute ``caption`` is needed, if you want to refer the figure: :ref:`dot
580+ render example`.
581+
582+Please note :ref:`build tools <linuxdoc:kfigure_build_tools>`. If Graphviz_ is
583+installed, you will see an vector image. If not, the raw markup is inserted as
584+*literal-block*.
585+
586+.. admonition:: kernel-render DOT
587+ :class: rst-example
588+
589+ .. _dot render example:
590+
591+ .. kernel-render:: DOT
592+ :alt: digraph
593+ :caption: Embedded DOT (Graphviz) code
594+
595+ digraph foo {
596+ "bar" -> "baz";
597+ }
598+
599+ Attribute ``caption`` is needed, if you want to refer the figure: :ref:`dot
600+ render example`.
601+
602+``kernel-render`` SVG
603+---------------------
604+
605+A simple example of embedded SVG_ is shown in figure :ref:`svg render example`:
606+
607+.. code:: reST
608+
609+ .. _svg render example:
610+
611+ .. kernel-render:: SVG
612+ :caption: Embedded **SVG** markup
613+ :alt: so-nw-arrow
614+..
615+
616+ .. code:: xml
617+
618+ <?xml version="1.0" encoding="UTF-8"?>
619+ <svg xmlns="http://www.w3.org/2000/svg" version="1.1"
620+ baseProfile="full" width="70px" height="40px"
621+ viewBox="0 0 700 400"
622+ >
623+ <line x1="180" y1="370"
624+ x2="500" y2="50"
625+ stroke="black" stroke-width="15px"
626+ />
627+ <polygon points="585 0 525 25 585 50"
628+ transform="rotate(135 525 25)"
629+ />
630+ </svg>
631+
632+.. admonition:: kernel-render SVG
633+ :class: rst-example
634+
635+ .. _svg render example:
636+
637+ .. kernel-render:: SVG
638+ :caption: Embedded **SVG** markup
639+ :alt: so-nw-arrow
640+
641+ <?xml version="1.0" encoding="UTF-8"?>
642+ <svg xmlns="http://www.w3.org/2000/svg" version="1.1"
643+ baseProfile="full" width="70px" height="40px"
644+ viewBox="0 0 700 400"
645+ >
646+ <line x1="180" y1="370"
647+ x2="500" y2="50"
648+ stroke="black" stroke-width="15px"
649+ />
650+ <polygon points="585 0 525 25 585 50"
651+ transform="rotate(135 525 25)"
652+ />
653+ </svg>
654+
655+
656+
657+
658+.. _reST lists:
659+
660+List markups
661+============
662+
663+Bullet list
664+-----------
665+
666+List markup (:duref:`ref <bullet-lists>`) is simple:
667+
668+.. code:: reST
669+
670+ - This is a bulleted list.
671+
672+ 1. Nested lists are possible, but be aware that they must be separated from
673+ the parent list items by blank line
674+ 2. Second item of nested list
675+
676+ - It has two items, the second
677+ item uses two lines.
678+
679+ #. This is a numbered list.
680+ #. It has two items too.
681+
682+.. admonition:: bullet list
683+ :class: rst-example
684+
685+ - This is a bulleted list.
686+
687+ 1. Nested lists are possible, but be aware that they must be separated from
688+ the parent list items by blank line
689+ 2. Second item of nested list
690+
691+ - It has two items, the second
692+ item uses two lines.
693+
694+ #. This is a numbered list.
695+ #. It has two items too.
696+
697+
698+Horizontal list
699+---------------
700+
701+The :rst:dir:`.. hlist:: <hlist>` transforms a bullet list into a more compact
702+list.
703+
704+.. code:: reST
705+
706+ .. hlist::
707+
708+ - first list item
709+ - second list item
710+ - third list item
711+ ...
712+
713+.. admonition:: hlist
714+ :class: rst-example
715+
716+ .. hlist::
717+
718+ - first list item
719+ - second list item
720+ - third list item
721+ - next list item
722+ - next list item xxxx
723+ - next list item yyyy
724+ - next list item zzzz
725+
726+
727+Definition list
728+---------------
729+
730+.. sidebar:: Note ..
731+
732+ - the term cannot have more than one line of text
733+
734+ - there is **no blank line between term and definition block** // this
735+ distinguishes definition lists (:duref:`ref <definition-lists>`) from block
736+ quotes (:duref:`ref <block-quotes>`).
737+
738+Each definition list (:duref:`ref <definition-lists>`) item contains a term,
739+optional classifiers and a definition. A term is a simple one-line word or
740+phrase. Optional classifiers may follow the term on the same line, each after
741+an inline ' : ' (**space, colon, space**). A definition is a block indented
742+relative to the term, and may contain multiple paragraphs and other body
743+elements. There may be no blank line between a term line and a definition block
744+(*this distinguishes definition lists from block quotes*). Blank lines are
745+required before the first and after the last definition list item, but are
746+optional in-between.
747+
748+Definition lists are created as follows:
749+
750+.. code:: reST
751+
752+ term 1 (up to a line of text)
753+ Definition 1.
754+
755+ See the typo : this line is not a term!
756+
757+ And this is not term's definition. **There is a blank line** in between
758+ the line above and this paragraph. That's why this paragraph is taken as
759+ **block quote** (:duref:`ref <block-quotes>`) and not as term's definition!
760+
761+ term 2
762+ Definition 2, paragraph 1.
763+
764+ Definition 2, paragraph 2.
765+
766+ term 3 : classifier
767+ Definition 3.
768+
769+ term 4 : classifier one : classifier two
770+ Definition 4.
771+
772+.. admonition:: definition list
773+ :class: rst-example
774+
775+ term 1 (up to a line of text)
776+ Definition 1.
777+
778+ See the typo : this line is not a term!
779+
780+ And this is not term's definition. **There is a blank line** in between
781+ the line above and this paragraph. That's why this paragraph is taken as
782+ **block quote** (:duref:`ref <block-quotes>`) and not as term's definition!
783+
784+
785+ term 2
786+ Definition 2, paragraph 1.
787+
788+ Definition 2, paragraph 2.
789+
790+ term 3 : classifier
791+ Definition 3.
792+
793+ term 4 : classifier one : classifier two
794+
795+
796+Quoted paragraphs
797+-----------------
798+
799+Quoted paragraphs (:duref:`ref <block-quotes>`) are created by just indenting
800+them more than the surrounding paragraphs. Line blocks (:duref:`ref
801+<line-blocks>`) are a way of preserving line breaks:
802+
803+.. code:: reST
804+
805+ normal paragraph ...
806+ lorem ipsum.
807+
808+ Quoted paragraph ...
809+ lorem ipsum.
810+
811+ | These lines are
812+ | broken exactly like in
813+ | the source file.
814+
815+
816+.. admonition:: Quoted paragraph and line block
817+ :class: rst-example
818+
819+ normal paragraph ...
820+ lorem ipsum.
821+
822+ Quoted paragraph ...
823+ lorem ipsum.
824+
825+ | These lines are
826+ | broken exactly like in
827+ | the source file.
828+
829+
830+.. _reST field list:
831+
832+Field Lists
833+-----------
834+
835+.. _Sphinx Field Lists:
836+ https://www.sphinx-doc.org/en/master/usage/restructuredtext/field-lists.html
837+
838+.. sidebar:: bibliographic fields
839+
840+ First lines fields are bibliographic fields, see `Sphinx Field Lists`_.
841+
842+Field lists are used as part of an extension syntax, such as options for
843+directives, or database-like records meant for further processing. Field lists
844+are mappings from field names to field bodies. They marked up like this:
845+
846+.. code:: reST
847+
848+ :fieldname: Field content
849+ :foo: first paragraph in field foo
850+
851+ second paragraph in field foo
852+
853+ :bar: Field content
854+
855+.. admonition:: Field List
856+ :class: rst-example
857+
858+ :fieldname: Field content
859+ :foo: first paragraph in field foo
860+
861+ second paragraph in field foo
862+
863+ :bar: Field content
864+
865+
866+They are commonly used in Python documentation:
867+
868+.. code:: python
869+
870+ def my_function(my_arg, my_other_arg):
871+ """A function just for me.
872+
873+ :param my_arg: The first of my arguments.
874+ :param my_other_arg: The second of my arguments.
875+
876+ :returns: A message (just for me, of course).
877+ """
878+
879+Further list blocks
880+-------------------
881+
882+- field lists (:duref:`ref <field-lists>`, with caveats noted in
883+ :ref:`reST field list`)
884+- option lists (:duref:`ref <option-lists>`)
885+- quoted literal blocks (:duref:`ref <quoted-literal-blocks>`)
886+- doctest blocks (:duref:`ref <doctest-blocks>`)
887+
888+
889+Admonitions
890+===========
891+
892+Sidebar
893+-------
894+
895+Sidebar is an eye catcher, often used for admonitions pointing further stuff or
896+site effects. Here is the source of the sidebar :ref:`on top of this page <reST
897+primer>`.
898+
899+.. code:: reST
900+
901+ .. sidebar:: KISS_ and readability_
902+
903+ Instead of defining more and more roles, we at searx encourage our
904+ contributors to follow principles like KISS_ and readability_.
905+
906+Generic admonition
907+------------------
908+
909+The generic :dudir:`admonition <admonitions>` needs a title:
910+
911+.. code:: reST
912+
913+ .. admonition:: generic admonition title
914+
915+ lorem ipsum ..
916+
917+
918+.. admonition:: generic admonition title
919+
920+ lorem ipsum ..
921+
922+
923+Specific admonitions
924+--------------------
925+
926+Specific admonitions: :dudir:`hint`, :dudir:`note`, :dudir:`tip` :dudir:`attention`,
927+:dudir:`caution`, :dudir:`danger`, :dudir:`error`, , :dudir:`important`, and
928+:dudir:`warning` .
929+
930+.. code:: reST
931+
932+ .. hint::
933+
934+ lorem ipsum ..
935+
936+ .. note::
937+
938+ lorem ipsum ..
939+
940+ .. warning::
941+
942+ lorem ipsum ..
943+
944+
945+.. hint::
946+
947+ lorem ipsum ..
948+
949+.. note::
950+
951+ lorem ipsum ..
952+
953+.. tip::
954+
955+ lorem ipsum ..
956+
957+.. attention::
958+
959+ lorem ipsum ..
960+
961+.. caution::
962+
963+ lorem ipsum ..
964+
965+.. danger::
966+
967+ lorem ipsum ..
968+
969+.. important::
970+
971+ lorem ipsum ..
972+
973+.. error::
974+
975+ lorem ipsum ..
976+
977+.. warning::
978+
979+ lorem ipsum ..
980+
981+
982+Tables
983+======
984+
985+.. sidebar:: Nested tables
986+
987+ Nested tables are ugly! Not all builder support nested tables, don't use
988+ them!
989+
990+ASCII-art tables like :ref:`reST simple table` and :ref:`reST grid table` might
991+be comfortable for readers of the text-files, but they have huge disadvantages
992+in the creation and modifying. First, they are hard to edit. Think about
993+adding a row or a column to a ASCII-art table or adding a paragraph in a cell,
994+it is a nightmare on big tables.
995+
996+
997+.. sidebar:: List tables
998+
999+ For meaningful patch and diff use :ref:`reST flat table`.
1000+
1001+Second the diff of modifying ASCII-art tables is not meaningful, e.g. widening a
1002+cell generates a diff in which also changes are included, which are only
1003+ascribable to the ASCII-art. Anyway, if you prefer ASCII-art for any reason,
1004+here are some helpers:
1005+
1006+* `Emacs Table Mode`_
1007+* `Online Tables Generator`_
1008+
1009+.. _reST simple table:
1010+
1011+Simple tables
1012+-------------
1013+
1014+:duref:`Simple tables <simple-tables>` allow *colspan* but not *rowspan*. If
1015+your table need some metadata (e.g. a title) you need to add the ``.. table::
1016+directive`` :dudir:`(ref) <table>` in front and place the table in its body:
1017+
1018+.. code:: reST
1019+
1020+ .. table:: foo gate truth table
1021+ :widths: grid
1022+ :align: left
1023+
1024+ ====== ====== ======
1025+ Inputs Output
1026+ ------------- ------
1027+ A B A or B
1028+ ====== ====== ======
1029+ False
1030+ --------------------
1031+ True
1032+ --------------------
1033+ True False True
1034+ (foo)
1035+ ------ ------ ------
1036+ False True
1037+ (foo)
1038+ ====== =============
1039+
1040+.. admonition:: Simple ASCII table
1041+ :class: rst-example
1042+
1043+ .. table:: foo gate truth table
1044+ :widths: grid
1045+ :align: left
1046+
1047+ ====== ====== ======
1048+ Inputs Output
1049+ ------------- ------
1050+ A B A or B
1051+ ====== ====== ======
1052+ False
1053+ --------------------
1054+ True
1055+ --------------------
1056+ True False True
1057+ (foo)
1058+ ------ ------ ------
1059+ False True
1060+ (foo)
1061+ ====== =============
1062+
1063+
1064+
1065+.. _reST grid table:
1066+
1067+Grid tables
1068+-----------
1069+
1070+:duref:`Grid tables <grid-tables>` allow colspan *colspan* and *rowspan*:
1071+
1072+.. code:: reST
1073+
1074+ .. table:: grid table example
1075+ :widths: 1 1 5
1076+
1077+ +------------+------------+-----------+
1078+ | Header 1 | Header 2 | Header 3 |
1079+ +============+============+===========+
1080+ | body row 1 | column 2 | column 3 |
1081+ +------------+------------+-----------+
1082+ | body row 2 | Cells may span columns.|
1083+ +------------+------------+-----------+
1084+ | body row 3 | Cells may | - Cells |
1085+ +------------+ span rows. | - contain |
1086+ | body row 4 | | - blocks. |
1087+ +------------+------------+-----------+
1088+
1089+.. admonition:: ASCII grid table
1090+ :class: rst-example
1091+
1092+ .. table:: grid table example
1093+ :widths: 1 1 5
1094+
1095+ +------------+------------+-----------+
1096+ | Header 1 | Header 2 | Header 3 |
1097+ +============+============+===========+
1098+ | body row 1 | column 2 | column 3 |
1099+ +------------+------------+-----------+
1100+ | body row 2 | Cells may span columns.|
1101+ +------------+------------+-----------+
1102+ | body row 3 | Cells may | - Cells |
1103+ +------------+ span rows. | - contain |
1104+ | body row 4 | | - blocks. |
1105+ +------------+------------+-----------+
1106+
1107+
1108+.. _reST flat table:
1109+
1110+flat-table
1111+----------
1112+
1113+The ``flat-table`` is a further developed variant of the :ref:`list tables
1114+<linuxdoc:list-table-directives>`. It is a double-stage list similar to the
1115+:dudir:`list-table` with some additional features:
1116+
1117+column-span: ``cspan``
1118+ with the role ``cspan`` a cell can be extended through additional columns
1119+
1120+row-span: ``rspan``
1121+ with the role ``rspan`` a cell can be extended through additional rows
1122+
1123+auto-span:
1124+ spans rightmost cell of a table row over the missing cells on the right side
1125+ of that table-row. With Option ``:fill-cells:`` this behavior can changed
1126+ from *auto span* to *auto fill*, which automatically inserts (empty) cells
1127+ instead of spanning the last cell.
1128+
1129+options:
1130+ :header-rows: [int] count of header rows
1131+ :stub-columns: [int] count of stub columns
1132+ :widths: [[int] [int] ... ] widths of columns
1133+ :fill-cells: instead of auto-span missing cells, insert missing cells
1134+
1135+roles:
1136+ :cspan: [int] additional columns (*morecols*)
1137+ :rspan: [int] additional rows (*morerows*)
1138+
1139+The example below shows how to use this markup. The first level of the staged
1140+list is the *table-row*. In the *table-row* there is only one markup allowed,
1141+the list of the cells in this *table-row*. Exception are *comments* ( ``..`` )
1142+and *targets* (e.g. a ref to :ref:`row 2 of table's body <row body 2>`).
1143+
1144+.. code:: reST
1145+
1146+ .. flat-table:: ``flat-table`` example
1147+ :header-rows: 2
1148+ :stub-columns: 1
1149+ :widths: 1 1 1 1 2
1150+
1151+ * - :rspan:`1` head / stub
1152+ - :cspan:`3` head 1.1-4
1153+
1154+ * - head 2.1
1155+ - head 2.2
1156+ - head 2.3
1157+ - head 2.4
1158+
1159+ * .. row body 1 / this is a comment
1160+
1161+ - row 1
1162+ - :rspan:`2` cell 1-3.1
1163+ - cell 1.2
1164+ - cell 1.3
1165+ - cell 1.4
1166+
1167+ * .. Comments and targets are allowed on *table-row* stage.
1168+ .. _`row body 2`:
1169+
1170+ - row 2
1171+ - cell 2.2
1172+ - :rspan:`1` :cspan:`1`
1173+ cell 2.3 with a span over
1174+
1175+ * col 3-4 &
1176+ * row 2-3
1177+
1178+ * - row 3
1179+ - cell 3.2
1180+
1181+ * - row 4
1182+ - cell 4.1
1183+ - cell 4.2
1184+ - cell 4.3
1185+ - cell 4.4
1186+
1187+ * - row 5
1188+ - cell 5.1 with automatic span to rigth end
1189+
1190+ * - row 6
1191+ - cell 6.1
1192+ - ..
1193+
1194+
1195+.. admonition:: List table
1196+ :class: rst-example
1197+
1198+ .. flat-table:: ``flat-table`` example
1199+ :header-rows: 2
1200+ :stub-columns: 1
1201+ :widths: 1 1 1 1 2
1202+
1203+ * - :rspan:`1` head / stub
1204+ - :cspan:`3` head 1.1-4
1205+
1206+ * - head 2.1
1207+ - head 2.2
1208+ - head 2.3
1209+ - head 2.4
1210+
1211+ * .. row body 1 / this is a comment
1212+
1213+ - row 1
1214+ - :rspan:`2` cell 1-3.1
1215+ - cell 1.2
1216+ - cell 1.3
1217+ - cell 1.4
1218+
1219+ * .. Comments and targets are allowed on *table-row* stage.
1220+ .. _`row body 2`:
1221+
1222+ - row 2
1223+ - cell 2.2
1224+ - :rspan:`1` :cspan:`1`
1225+ cell 2.3 with a span over
1226+
1227+ * col 3-4 &
1228+ * row 2-3
1229+
1230+ * - row 3
1231+ - cell 3.2
1232+
1233+ * - row 4
1234+ - cell 4.1
1235+ - cell 4.2
1236+ - cell 4.3
1237+ - cell 4.4
1238+
1239+ * - row 5
1240+ - cell 5.1 with automatic span to rigth end
1241+
1242+ * - row 6
1243+ - cell 6.1
1244+ - ..
1245+
1246+
1247+CSV table
1248+---------
1249+
1250+CSV table might be the choice if you want to include CSV-data from a outstanding
1251+(build) process into your documentation.
1252+
1253+.. code:: reST
1254+
1255+ .. csv-table:: CSV table example
1256+ :header: .. , Column 1, Column 2
1257+ :widths: 2 5 5
1258+ :stub-columns: 1
1259+ :file: csv_table.txt
1260+
1261+Content of file ``csv_table.txt``:
1262+
1263+.. literalinclude:: csv_table.txt
1264+
1265+.. admonition:: CSV table
1266+ :class: rst-example
1267+
1268+ .. csv-table:: CSV table example
1269+ :header: .. , Column 1, Column 2
1270+ :widths: 3 5 5
1271+ :stub-columns: 1
1272+ :file: csv_table.txt
1273+
1274+Templating
1275+==========
1276+
1277+.. sidebar:: Build environment
1278+
1279+ All *generic-doc* tasks are running in the :ref:`make install`.
1280+
1281+Templating is suitable for documentation which is created generic at the build
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
1285+:origin:`docs/admin/engines.rst` is shown:
1286+
1287+.. literalinclude:: ../admin/engines.rst
1288+ :language: reST
1289+ :start-after: .. _configured engines:
1290+
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``.
1294+
1295+.. code:: py
1296+
1297+ import searx.search
1298+ import searx.engines
1299+ import searx.plugins
1300+ searx.search.initialize()
1301+ jinja_contexts = {
1302+ 'searx': {
1303+ 'engines': searx.engines.engines,
1304+ 'plugins': searx.plugins.plugins
1305+ },
1306+ }
1307+
1308+
1309+Tabbed views
1310+============
1311+
1312+.. _sphinx-tabs: https://github.com/djungelorm/sphinx-tabs
1313+.. _basic-tabs: https://github.com/djungelorm/sphinx-tabs#basic-tabs
1314+.. _group-tabs: https://github.com/djungelorm/sphinx-tabs#group-tabs
1315+.. _code-tabs: https://github.com/djungelorm/sphinx-tabs#code-tabs
1316+
1317+With `sphinx-tabs`_ extension we have *tabbed views*. To provide installation
1318+instructions with one tab per distribution we use the `group-tabs`_ directive,
1319+others are basic-tabs_ and code-tabs_. Below a *group-tab* example from
1320+:ref:`docs build` is shown:
1321+
1322+.. literalinclude:: ../admin/buildhosts.rst
1323+ :language: reST
1324+ :start-after: .. SNIP sh lint requirements
1325+ :end-before: .. SNAP sh lint requirements
1326+
1327+.. _math:
1328+
1329+Math equations
1330+==============
1331+
1332+.. _Mathematics: https://en.wikibooks.org/wiki/LaTeX/Mathematics
1333+.. _amsmath user guide:
1334+ http://vesta.informatik.rwth-aachen.de/ftp/pub/mirror/ctan/macros/latex/required/amsmath/amsldoc.pdf
1335+
1336+.. sidebar:: About LaTeX
1337+
1338+ - `amsmath user guide`_
1339+ - Mathematics_
1340+ - :ref:`docs build`
1341+
1342+The input language for mathematics is LaTeX markup using the :ctan:`amsmath`
1343+package.
1344+
1345+To embed LaTeX markup in reST documents, use role :rst:role:`:math: <math>` for
1346+inline and directive :rst:dir:`.. math:: <math>` for block markup.
1347+
1348+.. code:: reST
1349+
1350+ In :math:numref:`schroedinger general` the time-dependent Schrödinger equation
1351+ is shown.
1352+
1353+ .. math::
1354+ :label: schroedinger general
1355+
1356+ \mathrm{i}\hbar\dfrac{\partial}{\partial t} |\,\psi (t) \rangle =
1357+ \hat{H} |\,\psi (t) \rangle.
1358+
1359+.. admonition:: LaTeX math equation
1360+ :class: rst-example
1361+
1362+ In :math:numref:`schroedinger general` the time-dependent Schrödinger equation
1363+ is shown.
1364+
1365+ .. math::
1366+ :label: schroedinger general
1367+
1368+ \mathrm{i}\hbar\dfrac{\partial}{\partial t} |\,\psi (t) \rangle =
1369+ \hat{H} |\,\psi (t) \rangle.
1370+
1371+
1372+The next example shows the difference of ``\tfrac`` (*textstyle*) and ``\dfrac``
1373+(*displaystyle*) used in a inline markup or another fraction.
1374+
1375+.. code:: reST
1376+
1377+ ``\tfrac`` **inline example** :math:`\tfrac{\tfrac{1}{x}+\tfrac{1}{y}}{y-z}`
1378+ ``\dfrac`` **inline example** :math:`\dfrac{\dfrac{1}{x}+\dfrac{1}{y}}{y-z}`
1379+
1380+.. admonition:: Line spacing
1381+ :class: rst-example
1382+
1383+ Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
1384+ eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
1385+ voluptua. ...
1386+ ``\tfrac`` **inline example** :math:`\tfrac{\tfrac{1}{x}+\tfrac{1}{y}}{y-z}`
1387+ At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd
1388+ gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
1389+
1390+ Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
1391+ eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
1392+ voluptua. ...
1393+ ``\tfrac`` **inline example** :math:`\dfrac{\dfrac{1}{x}+\dfrac{1}{y}}{y-z}`
1394+ At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd
1395+ gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
1396+
1397+
1398+.. _KISS: https://en.wikipedia.org/wiki/KISS_principle
1399+
1400+.. _readability: https://docs.python-guide.org/writing/style/
1401+.. _Sphinx-Primer:
1402+ https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html
1403+.. _reST: https://docutils.sourceforge.io/rst.html
1404+.. _Sphinx Roles:
1405+ https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html
1406+.. _Sphinx: https://www.sphinx-doc.org
1407+.. _`sphinx-doc FAQ`: https://www.sphinx-doc.org/en/stable/faq.html
1408+.. _Sphinx markup constructs:
1409+ https://www.sphinx-doc.org/en/stable/markup/index.html
1410+.. _`sphinx cross references`:
1411+ https://www.sphinx-doc.org/en/stable/markup/inline.html#cross-referencing-arbitrary-locations
1412+.. _sphinx.ext.extlinks:
1413+ https://www.sphinx-doc.org/en/master/usage/extensions/extlinks.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
1417+.. _Sphinx's Python domain:
1418+ https://www.sphinx-doc.org/en/stable/domains.html#the-python-domain
1419+.. _Sphinx's C domain:
1420+ https://www.sphinx-doc.org/en/stable/domains.html#cross-referencing-c-constructs
1421+.. _doctree:
1422+ https://www.sphinx-doc.org/en/master/extdev/tutorial.html?highlight=doctree#build-phases
1423+.. _docutils: http://docutils.sourceforge.net/docs/index.html
1424+.. _docutils FAQ: http://docutils.sourceforge.net/FAQ.html
1425+.. _linuxdoc: https://return42.github.io/linuxdoc
1426+.. _jinja: https://jinja.palletsprojects.com/
1427+.. _sphinx-jinja: https://github.com/tardyp/sphinx-jinja
1428+.. _SVG: https://www.w3.org/TR/SVG11/expanded-toc.html
1429+.. _DOT: https://graphviz.gitlab.io/_pages/doc/info/lang.html
1430+.. _`Graphviz's dot`: https://graphviz.gitlab.io/_pages/pdf/dotguide.pdf
1431+.. _Graphviz: https://graphviz.gitlab.io
1432+.. _ImageMagick: https://www.imagemagick.org
1433+
1434+.. _`Emacs Table Mode`: https://www.emacswiki.org/emacs/TableMode
1435+.. _`Online Tables Generator`: https://www.tablesgenerator.com/text_tables
1436+.. _`OASIS XML Exchange Table Model`: https://www.oasis-open.org/specs/tm9901.html
docs/dev/search_api.rstnew file+120
@@ -0,0 +1,120 @@
1+.. _search API:
2+
3+==========
4+Search API
5+==========
6+
7+The search supports both ``GET`` and ``POST``.
8+
9+Furthermore, two endpoints ``/`` and ``/search`` are available for querying.
10+
11+
12+``GET /``
13+
14+``GET /search``
15+
16+Parameters
17+==========
18+
19+.. sidebar:: Further reading ..
20+
21+ - :ref:`engines-dev`
22+ - :ref:`settings.yml`
23+ - :ref:`engines generic`
24+
25+``q`` : required
26+ The search query. This string is passed to external search services. Thus,
27+ searx supports syntax of each search service. For example, ``site:github.com
28+ searx`` is a valid query for Google. However, if simply the query above is
29+ passed to any search engine which does not filter its results based on this
30+ syntax, you might not get the results you wanted.
31+
32+ See more at :ref:`search-syntax`
33+
34+``categories`` : optional
35+ Comma separated list, specifies the active search categories
36+
37+``engines`` : optional
38+ Comma separated list, specifies the active search engines.
39+
40+``lang`` : default ``all``
41+ Code of the language.
42+
43+``pageno`` : default ``1``
44+ Search page number.
45+
46+``time_range`` : optional
47+ [ ``day``, ``month``, ``year`` ]
48+
49+ Time range of search for engines which support it. See if an engine supports
50+ time range search in the preferences page of an instance.
51+
52+``format`` : optional
53+ [ ``json``, ``csv``, ``rss`` ]
54+
55+ Output format of results.
56+
57+``results_on_new_tab`` : default ``0``
58+ [ ``0``, ``1`` ]
59+
60+ Open search results on new tab.
61+
62+``image_proxy`` : default ``False``
63+ [ ``True``, ``False`` ]
64+
65+ Proxy image results through searx.
66+
67+``autocomplete`` : default *empty*
68+ [ ``google``, ``dbpedia``, ``duckduckgo``, ``startpage``, ``wikipedia`` ]
69+
70+ Service which completes words as you type.
71+
72+``safesearch`` : default ``None``
73+ [ ``0``, ``1``, ``None`` ]
74+
75+ Filter search results of engines which support safe search. See if an engine
76+ supports safe search in the preferences page of an instance.
77+
78+``theme`` : default ``oscar``
79+ [ ``oscar``, ``simple`` ]
80+
81+ Theme of instance.
82+
83+ Please note, available themes depend on an instance. It is possible that an
84+ instance administrator deleted, created or renamed themes on their instance.
85+ See the available options in the preferences page of the instance.
86+
87+``oscar-style`` : default ``logicodev``
88+ [ ``pointhi``, ``logicodev`` ]
89+
90+ Style of Oscar theme. It is only parsed if the theme of an instance is
91+ ``oscar``.
92+
93+ Please note, available styles depend on an instance. It is possible that an
94+ instance administrator deleted, created or renamed styles on their
95+ instance. See the available options in the preferences page of the instance.
96+
97+``enabled_plugins`` : optional
98+ List of enabled plugins.
99+
100+ :default: ``HTTPS_rewrite``, ``Self_Informations``,
101+ ``Search_on_category_select``, ``Tracker_URL_remover``
102+
103+ :values: [ ``DOAI_rewrite``, ``HTTPS_rewrite``, ``Infinite_scroll``,
104+ ``Vim-like_hotkeys``, ``Self_Informations``, ``Tracker_URL_remover``,
105+ ``Search_on_category_select`` ]
106+
107+``disabled_plugins``: optional
108+ List of disabled plugins.
109+
110+ :default: ``DOAI_rewrite``, ``Infinite_scroll``, ``Vim-like_hotkeys``
111+ :values: ``DOAI_rewrite``, ``HTTPS_rewrite``, ``Infinite_scroll``,
112+ ``Vim-like_hotkeys``, ``Self_Informations``, ``Tracker_URL_remover``,
113+ ``Search_on_category_select``
114+
115+``enabled_engines`` : optional : *all* :origin:`engines <searx/engines>`
116+ List of enabled engines.
117+
118+``disabled_engines`` : optional : *all* :origin:`engines <searx/engines>`
119+ List of disabled engines.
120+
docs/dev/svg_image.svgnew file+10
@@ -0,0 +1,10 @@
1+<?xml version="1.0" encoding="UTF-8"?>
2+<!-- originate: https://commons.wikimedia.org/wiki/File:Variable_Resistor.svg -->
3+<svg xmlns="http://www.w3.org/2000/svg"
4+ version="1.1" baseProfile="full"
5+ width="70px" height="40px" viewBox="0 0 700 400">
6+ <line x1="0" y1="200" x2="700" y2="200" stroke="black" stroke-width="20px"/>
7+ <rect x="100" y="100" width="500" height="200" fill="white" stroke="black" stroke-width="20px"/>
8+ <line x1="180" y1="370" x2="500" y2="50" stroke="black" stroke-width="15px"/>
9+ <polygon points="585 0 525 25 585 50" transform="rotate(135 525 25)"/>
10+</svg>
docs/dev/translation.rstnew file+71
@@ -0,0 +1,71 @@
1+.. _translation:
2+
3+===========
4+Translation
5+===========
6+
7+.. _searx@transifex: https://www.transifex.com/asciimoo/searx/
8+
9+Translation currently takes place on `searx@transifex`_
10+
11+Requirements
12+============
13+
14+* Transifex account
15+* Installed CLI tool of Transifex
16+
17+Init Transifex project
18+======================
19+
20+After installing ``transifex`` using pip, run the following command to
21+initialize the project.
22+
23+.. code:: sh
24+
25+ tx init # Transifex instance: https://www.transifex.com/asciimoo/searx/
26+
27+
28+After ``$HOME/.transifexrc`` is created, get a Transifex API key and insert it
29+into the configuration file.
30+
31+Create a configuration file for ``tx`` named ``$HOME/.tx/config``.
32+
33+.. code:: ini
34+
35+ [main]
36+ host = https://www.transifex.com
37+ [searx.messagespo]
38+ file_filter = searx/translations/<lang>/LC_MESSAGES/messages.po
39+ source_file = messages.pot
40+ source_lang = en
41+ type = PO
42+
43+
44+Then run ``tx set``:
45+
46+.. code:: shell
47+
48+ tx set --auto-local -r searx.messagespo 'searx/translations/<lang>/LC_MESSAGES/messages.po' \
49+ --source-lang en --type PO --source-file messages.pot --execute
50+
51+
52+Update translations
53+===================
54+
55+To retrieve the latest translations, pull it from Transifex.
56+
57+.. code:: sh
58+
59+ tx pull -a
60+
61+Then check the new languages. If strings translated are not enough, delete those
62+folders, because those should not be compiled. Call the command below to compile
63+the ``.po`` files.
64+
65+.. code:: shell
66+
67+ pybabel compile -d searx/translations
68+
69+
70+After the compilation is finished commit the ``.po`` and ``.mo`` files and
71+create a PR.
docs/index.rstnew file+37
@@ -0,0 +1,37 @@
1+================
2+Welcome to searx
3+================
4+
5+ *Search without being tracked.*
6+
7+Searx is a free internet metasearch engine which aggregates results from more
8+than 70 search services. Users are neither tracked nor profiled. Additionally,
9+searx can be used over Tor for online anonymity.
10+
11+Get started with searx by using one of the Searx-instances_. If you don't trust
12+anyone, you can set up your own, see :ref:`installation`.
13+
14+.. sidebar:: Features
15+
16+ - Self hosted
17+ - No user tracking
18+ - No user profiling
19+ - About 70 supported search engines
20+ - Easy integration with any search engine
21+ - Cookies are not used by default
22+ - Secure, encrypted connections (HTTPS/SSL)
23+ - Hosted by organizations, such as *La Quadrature du Net*, which promote
24+ digital rights
25+
26+.. toctree::
27+ :maxdepth: 2
28+ :caption: Contents
29+
30+ user/index
31+ admin/index
32+ dev/index
33+ searx_extra/index
34+ utils/index
35+ blog/index
36+
37+.. _Searx-instances: https://searx.space
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/static/img/searx_logo_small.pngnew file

Binary file not shown.

docs/user/index.rstnew file+10
@@ -0,0 +1,10 @@
1+==================
2+User documentation
3+==================
4+
5+.. toctree::
6+ :maxdepth: 2
7+ :caption: Contents
8+
9+ search_syntax
10+ own-instance
docs/user/own-instance.rstnew file+79
@@ -0,0 +1,79 @@
1+===========================
2+Why use a private instance?
3+===========================
4+
5+ *"Is it worth to run my own instance?"*
6+
7+\.\. is a common question among searx users. Before answering this question,
8+see what options a searx user has.
9+
10+Public instances are open to everyone who has access to its URL. Usually, these
11+are operated by unknown parties (from the users' point of view). Private
12+instances can be used by a select group of people. It is for example a searx of
13+group of friends or a company which can be accessed through VPN. Also it can be
14+single user one which runs on the user's laptop.
15+
16+To gain more insight on how these instances work let's dive into how searx
17+protects its users.
18+
19+How does searx protect privacy?
20+===============================
21+
22+Searx protects the privacy of its users in multiple ways regardless of the type
23+of the instance (private, public). Removal of private data from search requests
24+comes in three forms:
25+
26+ 1. removal of private data from requests going to search services
27+ 2. not forwarding anything from a third party services through search services
28+ (e.g. advertisement)
29+ 3. removal of private data from requests going to the result pages
30+
31+Removing private data means not sending cookies to external search engines and
32+generating a random browser profile for every request. Thus, it does not matter
33+if a public or private instance handles the request, because it is anonymized in
34+both cases. IP addresses will be the IP of the instance. But searx can be
35+configured to use proxy or Tor. `Result proxy
36+<https://github.com/asciimoo/morty>`__ is supported, too.
37+
38+Searx does not serve ads or tracking content unlike most search services. So
39+private data is not forwarded to third parties who might monetize it. Besides
40+protecting users from search services, both referring page and search query are
41+hidden from visited result pages.
42+
43+
44+What are the consequences of using public instances?
45+----------------------------------------------------
46+
47+If someone uses a public instance, they have to trust the administrator of that
48+instance. This means that the user of the public instance does not know whether
49+their requests are logged, aggregated and sent or sold to a third party.
50+
51+Also, public instances without proper protection are more vulnerable to abusing
52+the search service, In this case the external service in exchange returns
53+CAPTCHAs or bans the IP of the instance. Thus, search requests return less
54+results.
55+
56+I see. What about private instances?
57+------------------------------------
58+
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.
62+
63+Furthermore, as the default settings of their instance is editable, there is no
64+need to use cookies to tailor searx to their needs. So preferences will not be
65+reset to defaults when clearing browser cookies. As settings are stored on
66+their computer, it will not be accessible to others as long as their computer is
67+not compromised.
68+
69+Conclusion
70+==========
71+
72+Always use an instance which is operated by people you trust. The privacy
73+features of searx are available to users no matter what kind of instance they
74+use.
75+
76+If someone is on the go or just wants to try searx for the first time public
77+instances are the best choices. Additionally, public instance are making a
78+world a better place, because those who cannot or do not want to run an
79+instance, have access to a privacy respecting search service.
docs/user/search_syntax.rstnew file+66
@@ -0,0 +1,66 @@
1+
2+.. _search-syntax:
3+
4+=============
5+Search syntax
6+=============
7+
8+Searx allows you to modify the default categories, engines and search language
9+via the search query.
10+
11+Prefix ``!``
12+ to set Category/engine
13+
14+Prefix: ``:``
15+ to set language
16+
17+Prefix: ``?``
18+ to add engines and categories to the currently selected categories
19+
20+Abbrevations of the engines and languages are also accepted. Engine/category
21+modifiers are chainable and inclusive (e.g. with :search:`!it !ddg !wp qwer
22+<?q=%21it%20%21ddg%20%21wp%20qwer>` search in IT category **and** duckduckgo
23+**and** wikipedia for ``qwer``).
24+
25+See the :search:`/preferences page <preferences>` for the list of engines,
26+categories and languages.
27+
28+Examples
29+========
30+
31+Search in wikipedia for ``qwer``:
32+
33+- :search:`!wp qwer <?q=%21wp%20qwer>` or
34+- :search:`!wikipedia qwer :search:<?q=%21wikipedia%20qwer>`
35+
36+Image search:
37+
38+- :search:`!images Cthulhu <?q=%21images%20Cthulhu>`
39+
40+Custom language in wikipedia:
41+
42+- :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.rstnew file+80
@@ -0,0 +1,80 @@
1+
2+.. _filtron.sh:
3+
4+====================
5+``utils/filtron.sh``
6+====================
7+
8+.. sidebar:: further reading
9+
10+ - :ref:`searx filtron`
11+ - :ref:`architecture`
12+ - :ref:`installation` (:ref:`nginx <installation nginx>` & :ref:`apache
13+ <installation apache>`)
14+
15+.. _Go: https://golang.org/
16+.. _filtron: https://github.com/asciimoo/filtron
17+.. _filtron README: https://github.com/asciimoo/filtron/blob/master/README.md
18+
19+To simplify installation and maintenance of a filtron instance you can use the
20+script :origin:`utils/filtron.sh`. In most cases you will install filtron_
21+simply by running the command:
22+
23+.. code:: bash
24+
25+ sudo -H ./utils/filtron.sh install all
26+
27+The script adds a ``${SERVICE_USER}`` (default:``filtron``) and installs filtron_
28+into this user account:
29+
30+#. Create a separated user account (``filtron``).
31+#. Download and install Go_ binary in user's $HOME (``~filtron``).
32+#. Install filtron with the package management from Go_ (``go get -v -u
33+ github.com/asciimoo/filtron``)
34+#. Setup a proper rule configuration :origin:`[ref]
35+ <utils/templates/etc/filtron/rules.json>` (``/etc/filtron/rules.json``).
36+#. Setup a systemd service unit :origin:`[ref]
37+ <utils/templates/lib/systemd/system/filtron.service>`
38+ (``/lib/systemd/system/filtron.service``).
39+
40+
41+Create user
42+===========
43+
44+.. kernel-include:: $DOCS_BUILD/includes/filtron.rst
45+ :start-after: START create user
46+ :end-before: END create user
47+
48+
49+Install go
50+==========
51+
52+.. kernel-include:: $DOCS_BUILD/includes/filtron.rst
53+ :start-after: START install go
54+ :end-before: END install go
55+
56+
57+Install filtron
58+===============
59+
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:
63+
64+.. kernel-include:: $DOCS_BUILD/includes/filtron.rst
65+ :start-after: START install filtron
66+ :end-before: END install filtron
67+
68+.. kernel-include:: $DOCS_BUILD/includes/filtron.rst
69+ :start-after: START install systemd unit
70+ :end-before: END install systemd unit
71+
72+.. _filtron.sh overview:
73+
74+Overview
75+========
76+
77+The ``--help`` output of the script is largely self-explanatory
78+(:ref:`toolboxing common`):
79+
80+.. program-output:: ../utils/filtron.sh --help
docs/utils/index.rstnew file+52
@@ -0,0 +1,52 @@
1+.. _searx_utils:
2+.. _toolboxing:
3+
4+===================
5+Admin's tooling box
6+===================
7+
8+In the folder :origin:`utils/` we maintain some tools useful for administrators.
9+
10+.. toctree::
11+ :maxdepth: 2
12+ :caption: Contents
13+
14+ searx.sh
15+ filtron.sh
16+ morty.sh
17+ lxc.sh
18+
19+.. _toolboxing common:
20+
21+Common commands & environment
22+=============================
23+
24+Scripts to maintain services often dispose of common commands and environments.
25+
26+``shell`` : command
27+ Opens a shell from the service user ``${SERVICE_USSR}``, very helpful for
28+ troubleshooting.
29+
30+``inspect service`` : command
31+ Shows status and log of the service, most often you have a option to enable
32+ more verbose debug logs. Very helpful for debugging, but be careful not to
33+ enable debugging in a production environment!
34+
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+
43+.. _toolboxing setup:
44+
45+Tooling box setup
46+=================
47+
48+The main setup is done in the :origin:`.config.sh` (read also :ref:`settings
49+global`).
50+
51+.. literalinclude:: ../../.config.sh
52+ :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.rstnew file+80
@@ -0,0 +1,80 @@
1+
2+.. _morty: https://github.com/asciimoo/morty
3+.. _morty's README: https://github.com/asciimoo/morty
4+.. _Go: https://golang.org/
5+
6+.. _morty.sh:
7+
8+==================
9+``utils/morty.sh``
10+==================
11+
12+.. sidebar:: further reading
13+
14+ - :ref:`architecture`
15+ - :ref:`installation` (:ref:`nginx <installation nginx>` & :ref:`apache
16+ <installation apache>`)
17+ - :ref:`searx morty`
18+
19+To simplify installation and maintenance of a morty_ instance you can use the
20+script :origin:`utils/morty.sh`. In most cases you will install morty_ simply by
21+running the command:
22+
23+.. code:: bash
24+
25+ sudo -H ./utils/morty.sh install all
26+
27+The script adds a ``${SERVICE_USER}`` (default:``morty``) and installs morty_
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``).
37+
38+.. hint::
39+
40+ To add morty to your searx instance read chapter :ref:`searx morty`.
41+
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:
72+
73+Overview
74+========
75+
76+The ``--help`` output of the script is largely self-explanatory
77+(:ref:`toolboxing common`):
78+
79+.. program-output:: ../utils/morty.sh --help
80+
docs/utils/searx.sh.rstnew file+39
@@ -0,0 +1,39 @@
1+
2+.. _searx.sh:
3+
4+==================
5+``utils/searx.sh``
6+==================
7+
8+.. sidebar:: further reading
9+
10+ - :ref:`architecture`
11+ - :ref:`installation`
12+ - :ref:`installation nginx`
13+ - :ref:`installation apache`
14+
15+To simplify installation and maintenance of a searx instance you can use the
16+script :origin:`utils/searx.sh`.
17+
18+Install
19+=======
20+
21+In most cases you will install searx simply by running the command:
22+
23+.. code:: bash
24+
25+ sudo -H ./utils/searx.sh install all
26+
27+The script adds a ``${SERVICE_USER}`` (default:``searx``) and installs searx
28+into this user account. The installation is described in chapter
29+:ref:`installation basic`.
30+
31+.. _intranet reverse proxy:
32+
33+Overview
34+========
35+
36+The ``--help`` output of the script is largely self-explanatory
37+(:ref:`toolboxing common`):
38+
39+.. program-output:: ../utils/searx.sh --help
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−96
@@ -1,96 +0,0 @@
1−#!/bin/sh
2−
3−BASE_DIR=$(dirname "`readlink -f "$0"`")
4−PYTHONPATH=$BASE_DIR
5−SEARX_DIR="$BASE_DIR/searx"
6−ACTION=$1
7−
8−update_packages() {
9− pip install --upgrade -r "$BASE_DIR/requirements.txt"
10−}
11−
12−update_dev_packages() {
13− update_packages
14− pip install --upgrade -r "$BASE_DIR/requirements-dev.txt"
15−}
16−
17−pep8_check() {
18− echo '[!] Running pep8 check'
19− # ignored rules:
20− # E402 module level import not at top of file
21− # W503 line break before binary operator
22− pep8 --max-line-length=120 --ignore "E402,W503" "$SEARX_DIR" "$BASE_DIR/tests"
23−}
24−
25−unit_tests() {
26− echo '[!] Running unit tests'
27− python -m nose2 -s "$BASE_DIR/tests/unit"
28−}
29−
30−py_test_coverage() {
31− echo '[!] Running python test coverage'
32− PYTHONPATH=`pwd` python -m nose2 -C --coverage "$SEARX_DIR" -s "$BASE_DIR/tests/unit"
33− coverage report
34− coverage html
35−}
36−
37−robot_tests() {
38− echo '[!] Running robot tests'
39− PYTHONPATH=`pwd` python "$SEARX_DIR/testing.py" robot
40−}
41−
42−tests() {
43− set -e
44− pep8_check
45− unit_tests
46− robot_tests
47− set +e
48−}
49−
50−build_style() {
51− lessc -x "$BASE_DIR/searx/static/$1" "$BASE_DIR/searx/static/$2"
52−}
53−
54−styles() {
55− echo '[!] Building styles'
56− build_style themes/legacy/less/style.less themes/legacy/css/style.css
57− build_style themes/legacy/less/style-rtl.less themes/legacy/css/style-rtl.css
58− build_style themes/courgette/less/style.less themes/courgette/css/style.css
59− build_style themes/courgette/less/style-rtl.less themes/courgette/css/style-rtl.css
60− build_style less/bootstrap/bootstrap.less css/bootstrap.min.css
61− build_style themes/oscar/less/pointhi/oscar.less themes/oscar/css/pointhi.min.css
62− build_style themes/oscar/less/logicodev/oscar.less themes/oscar/css/logicodev.min.css
63− build_style themes/pix-art/less/style.less themes/pix-art/css/style.css
64−}
65−
66−grunt_build() {
67− grunt --gruntfile "$SEARX_DIR/static/themes/oscar/gruntfile.js"
68−}
69−
70−locales() {
71− pybabel compile -d "$SEARX_DIR/translations"
72−}
73−
74−help() {
75− [ -z "$1" ] || printf "Error: $1\n"
76− echo "Searx manage.sh help
77−
78−Commands
79−========
80− grunt_build - Build js files
81− help - This text
82− locales - Compile locales
83− pep8_check - Pep8 validation
84− py_test_coverage - Unit test coverage
85− robot_tests - Run selenium tests
86− styles - Build less files
87− tests - Run all python tests (pep8, unit, robot)
88− unit_tests - Run unit tests
89− update_dev_packages - Check & update development and production dependency changes
90− update_packages - Check & update dependency changes
91−"
92−}
93−
94−[ "$(command -V "$ACTION" | grep ' function$')" = "" ] \
95− && help "action not found" \
96− || $ACTION
requirements-dev.txt+20−10
@@ -1,10 +1,20 @@
1−babel==2.3.4
2−mock==2.0.0
3−nose2[coverage-plugin]
4−pep8==1.7.0
5−plone.testing==5.0.0
6−robotframework-selenium2library==1.8.0
7−robotsuite==1.7.0
8−transifex-client==0.12.2
9−unittest2==1.1.0
10−zope.testrunner==4.5.1
1+mock==4.0.3
2+nose2[coverage_plugin]==0.10.0
3+cov-core==1.15.0
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==2016.9.26
2−flask==0.11.1
3−flask-babel==0.11.1
4−lxml==3.6.0
5−ndg-httpsclient==0.4.1
6−pyasn1==0.1.9
7−pyasn1-modules==0.0.8
8−pygments==2.1.3
9−pyopenssl==0.15.1
10−python-dateutil==2.5.3
11−pyyaml==3.11
12−requests[socks]==2.10.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+58−28
@@ -15,39 +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
21−from os.path import realpath, dirname, join, abspath
22−from ssl import OPENSSL_VERSION_INFO, OPENSSL_VERSION
23−try:
24− from yaml import load
25−except:
26− from sys import exit, stderr
27− stderr.write('[E] install pyyaml\n')
28− exit(2)
21+from os.path import realpath, dirname, join, abspath, isfile
22+
2923
3024searx_dir = abspath(dirname(__file__))
3125engine_dir = dirname(realpath(__file__))
26+static_path = abspath(join(dirname(__file__), 'static'))
27+settings, settings_load_message = searx.settings_loader.load_settings()
3228
33−# if possible set path to settings using the
34−# enviroment variable SEARX_SETTINGS_PATH
35−if 'SEARX_SETTINGS_PATH' in environ:
36− settings_path = environ['SEARX_SETTINGS_PATH']
37−# otherwise using default path
38−else:
39− settings_path = join(searx_dir, 'settings.yml')
40−
41−# load settings
42−with open(settings_path) as settings_yaml:
43− settings = load(settings_yaml)
29+if settings['ui']['static_path']:
30+ static_path = settings['ui']['static_path']
4431
4532'''
4633enable debug if
4734the environnement variable SEARX_DEBUG is 1 or true
4835(whatever the value in settings.yml)
4936or general.debug=True in settings.yml
50−
5137disable debug if
5238the environnement variable SEARX_DEBUG is 0 or false
5339(whatever the value in settings.yml)
@@ -67,12 +53,56 @@ else:
6753 logging.basicConfig(level=logging.WARNING)
6854
6955logger = logging.getLogger('searx')
56+logger.info(settings_load_message)
57+logger.info('Initialisation done')
7058
71−# Workaround for openssl versions <1.0.2
72−# https://github.com/certifi/python-certifi/issues/26
73−if OPENSSL_VERSION_INFO[0:3] < (1, 0, 2):
74− if hasattr(certifi, 'old_where'):
75− environ['REQUESTS_CA_BUNDLE'] = certifi.old_where()
76− logger.warning('You are using an old openssl version({0}), please upgrade above 1.0.2!'.format(OPENSSL_VERSION))
59+if 'SEARX_SECRET' in environ:
60+ settings['server']['secret_key'] = environ['SEARX_SECRET']
61+if 'SEARX_BIND_ADDRESS' in environ:
62+ settings['server']['bind_address'] = environ['SEARX_BIND_ADDRESS']
7763
78−logger.info('Initialisation done')
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+3−3
@@ -10,7 +10,7 @@ answerers_dir = dirname(realpath(__file__))
1010def load_answerers():
1111 answerers = []
1212 for filename in listdir(answerers_dir):
13− if not isdir(join(answerers_dir, filename)):
13+ if not isdir(join(answerers_dir, filename)) or filename.startswith('_'):
1414 continue
1515 module = load_module('answerer.py', join(answerers_dir, filename))
1616 if not hasattr(module, 'keywords') or not isinstance(module.keywords, tuple) or not len(module.keywords):
@@ -30,9 +30,9 @@ def get_answerers_by_keywords(answerers):
3030
3131def ask(query):
3232 results = []
33− query_parts = filter(None, query.query.split())
33+ query_parts = list(filter(None, query.query.split()))
3434
35− if query_parts[0] not in answerers_by_keywords:
35+ if not query_parts or query_parts[0] not in answerers_by_keywords:
3636 return results
3737
3838 for answerer in answerers_by_keywords[query_parts[0]]:
searx/answerers/random/answerer.py+26−9
@@ -1,5 +1,7 @@
1+import hashlib
12import random
23import string
4+import uuid
35from flask_babel import gettext
46
57# required answerer attribute
@@ -7,26 +9,41 @@ from flask_babel import gettext
79keywords = ('random',)
810
911random_int_max = 2**31
12+random_string_letters = string.ascii_lowercase + string.digits + string.ascii_uppercase
1013
11−random_string_letters = string.lowercase + string.digits + string.uppercase
14+
15+def random_characters():
16+ return [random.choice(random_string_letters)
17+ for _ in range(random.randint(8, 32))]
1218
1319
1420def random_string():
15− return u''.join(random.choice(random_string_letters)
16− for _ in range(random.randint(8, 32)))
21+ return ''.join(random_characters())
1722
1823
1924def random_float():
20− return unicode(random.random())
25+ return str(random.random())
2126
2227
2328def random_int():
24− return unicode(random.randint(-random_int_max, random_int_max))
29+ return str(random.randint(-random_int_max, random_int_max))
30+
31+
32+def random_sha256():
33+ m = hashlib.sha256()
34+ m.update(''.join(random_characters()).encode())
35+ return str(m.hexdigest())
36+
37+
38+def random_uuid():
39+ return str(uuid.uuid4())
2540
2641
27−random_types = {u'string': random_string,
28− u'int': random_int,
29− u'float': random_float}
42+random_types = {'string': random_string,
43+ 'int': random_int,
44+ 'float': random_float,
45+ 'sha256': random_sha256,
46+ 'uuid': random_uuid}
3047
3148
3249# required answerer function
@@ -47,4 +64,4 @@ def answer(query):
4764def self_info():
4865 return {'name': gettext('Random value generator'),
4966 'description': gettext('Generate different random values'),
50− 'examples': [u'random {}'.format(x) for x in random_types]}
67+ 'examples': ['random {}'.format(x) for x in random_types]}
searx/answerers/statistics/answerer.py+3−2
@@ -3,6 +3,7 @@ from operator import mul
33
44from flask_babel import gettext
55
6+
67keywords = ('min',
78 'max',
89 'avg',
@@ -19,7 +20,7 @@ def answer(query):
1920 return []
2021
2122 try:
22− args = map(float, parts[1:])
23+ args = list(map(float, parts[1:]))
2324 except:
2425 return []
2526
@@ -40,7 +41,7 @@ def answer(query):
4041 if answer is None:
4142 return []
4243
43− return [{'answer': unicode(answer)}]
44+ return [{'answer': str(answer)}]
4445
4546
4647# required answerer function
searx/autocomplete.py+48−87
@@ -18,101 +18,43 @@ along with searx. If not, see < http://www.gnu.org/licenses/ >.
1818
1919from lxml import etree
2020from json import loads
21−from urllib import urlencode
21+from urllib.parse import urlencode
22+
23+from httpx import HTTPError
24+
25+
2226from 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
27+from searx.data import ENGINES_LANGUAGES
28+from searx.network import get as http_get
29+from searx.exceptions import SearxEngineResponseException
2830
2931
3032def get(*args, **kwargs):
3133 if 'timeout' not in kwargs:
3234 kwargs['timeout'] = settings['outgoing']['request_timeout']
33−
35+ kwargs['raise_for_httperror'] = True
3436 return http_get(*args, **kwargs)
3537
3638
37−def searx_bang(full_query):
38− '''check if the searchQuery contain a bang, and create fitting autocompleter results'''
39− # check if there is a query which can be parsed
40− if len(full_query.getSearchQuery()) == 0:
41− 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})))
4244
4345 results = []
4446
45− # check if current query stats with !bang
46− first_char = full_query.getSearchQuery()[0]
47− if first_char == '!' or first_char == '?':
48− if len(full_query.getSearchQuery()) == 1:
49− # show some example queries
50− # TODO, check if engine is not avaliable
51− results.append(first_char + "images")
52− results.append(first_char + "wikipedia")
53− results.append(first_char + "osm")
54− else:
55− engine_query = full_query.getSearchQuery()[1:]
56−
57− # check if query starts with categorie name
58− for categorie in categories:
59− if categorie.startswith(engine_query):
60− results.append(first_char + '{categorie}'.format(categorie=categorie))
61−
62− # check if query starts with engine name
63− for engine in engines:
64− if engine.startswith(engine_query.replace('_', ' ')):
65− results.append(first_char + '{engine}'.format(engine=engine.replace(' ', '_')))
66−
67− # check if query starts with engine shortcut
68− for engine_shortcut in engine_shortcuts:
69− if engine_shortcut.startswith(engine_query):
70− results.append(first_char + '{engine_shortcut}'.format(engine_shortcut=engine_shortcut))
71−
72− # check if current query stats with :bang
73− elif first_char == ':':
74− if len(full_query.getSearchQuery()) == 1:
75− # show some example queries
76− results.append(":en")
77− results.append(":en_us")
78− results.append(":english")
79− results.append(":united_kingdom")
80− else:
81− engine_query = full_query.getSearchQuery()[1:]
82−
83− for lc in language_codes:
84− lang_id, lang_name, country = map(str.lower, lc)
85−
86− # check if query starts with language-id
87− if lang_id.startswith(engine_query):
88− if len(engine_query) <= 2:
89− results.append(':{lang_id}'.format(lang_id=lang_id.split('_')[0]))
90− else:
91− results.append(':{lang_id}'.format(lang_id=lang_id))
92−
93− # check if query starts with language name
94− if lang_name.startswith(engine_query):
95− results.append(':{lang_name}'.format(lang_name=lang_name))
96−
97− # check if query starts with country
98− if country.startswith(engine_query.replace('_', ' ')):
99− results.append(':{country}'.format(country=country.replace(' ', '_')))
100−
101− # remove duplicates
102− result_set = set(results)
103−
104− # remove results which are already contained in the query
105− for query_part in full_query.query_parts:
106− if query_part in result_set:
107− result_set.remove(query_part)
108−
109− # convert result_set back to list
110− 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
11153
11254
11355def dbpedia(query, lang):
11456 # dbpedia autocompleter, no HTTPS
115− autocomplete_url = 'http://lookup.dbpedia.org/api/search.asmx/KeywordSearch?'
57+ autocomplete_url = 'https://lookup.dbpedia.org/api/search.asmx/KeywordSearch?'
11658
11759 response = get(autocomplete_url + urlencode(dict(QueryString=query)))
11860
@@ -120,8 +62,7 @@ def dbpedia(query, lang):
12062
12163 if response.ok:
12264 dom = etree.fromstring(response.content)
123− results = dom.xpath('//a:Result/a:Label//text()',
124− namespaces={'a': 'http://lookup.dbpedia.org/'})
65+ results = dom.xpath('//Result/Label//text()')
12566
12667 return results
12768
@@ -153,12 +94,19 @@ def google(query, lang):
15394
15495def startpage(query, lang):
15596 # startpage autocompleter
156− url = 'https://startpage.com/do/suggest?{query}'
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]
157102
158− resp = get(url.format(query=urlencode({'query': query}))).text.split('\n')
159− if len(resp) > 1:
160− return resp
161− return []
103+
104+def swisscows(query, lang):
105+ # swisscows autocompleter
106+ url = 'https://swisscows.ch/api/suggest?{query}&itemsCount=5'
107+
108+ resp = loads(get(url.format(query=urlencode({'query': query}))).text)
109+ return resp
162110
163111
164112def qwant(query, lang):
@@ -188,10 +136,23 @@ def wikipedia(query, lang):
188136 return []
189137
190138
191−backends = {'dbpedia': dbpedia,
139+backends = {'brave': brave,
140+ 'dbpedia': dbpedia,
192141 'duckduckgo': duckduckgo,
193142 'google': google,
194143 'startpage': startpage,
144+ 'swisscows': swisscows,
195145 'qwant': qwant,
196146 'wikipedia': wikipedia
197147 }
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+14638−7602

This diff is too big to show here.

searx/data/engines_languages.jsonnew file+28588

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.jsonnew file+13

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.pynew file+53

This diff is too big to show here.

searx/engines/__init__.py+131−30

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.pynew file+68

This diff is too big to show here.

searx/engines/archlinux.py+22−19

This diff is too big to show here.

searx/engines/arxiv.pynew file+75

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+14−18

This diff is too big to show here.

searx/engines/bing.py+73−32

This diff is too big to show here.

searx/engines/bing_images.py+55−55

This diff is too big to show here.

searx/engines/bing_news.py+25−22

This diff is too big to show here.

searx/engines/bing_videos.pynew file+101

This diff is too big to show here.

searx/engines/blekko_images.pydeleted−70

This diff is too big to show here.

searx/engines/btdigg.py+32−36

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+26−73

This diff is too big to show here.

searx/engines/dailymotion.py+37−15

This diff is too big to show here.

searx/engines/deezer.py+14−12

This diff is too big to show here.

searx/engines/deviantart.py+47−54

This diff is too big to show here.

searx/engines/dictzone.py+24−32

This diff is too big to show here.

searx/engines/digbt.py+14−12

This diff is too big to show here.

searx/engines/digg.py+47−52

This diff is too big to show here.

searx/engines/doku.py+24−21

This diff is too big to show here.

searx/engines/duckduckgo.py+152−70

This diff is too big to show here.

searx/engines/duckduckgo_definitions.py+180−75

This diff is too big to show here.

searx/engines/duckduckgo_images.pynew file+94

This diff is too big to show here.

searx/engines/duden.pynew file+77

This diff is too big to show here.

searx/engines/dummy-offline.pynew file+20

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.pynew file+56

This diff is too big to show here.

searx/engines/faroo.pydeleted−116

This diff is too big to show here.

searx/engines/fdroid.py+27−25

This diff is too big to show here.

searx/engines/filecrop.pydeleted−85

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+52−42

This diff is too big to show here.

searx/engines/framalibre.pynew file+72

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/generalfile.pydeleted−62

This diff is too big to show here.

searx/engines/genius.pynew file+90

This diff is too big to show here.

searx/engines/gentoo.pynew file+129

This diff is too big to show here.

searx/engines/gigablast.py+112−58

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+284−300

This diff is too big to show here.

searx/engines/google_images.py+184−70

This diff is too big to show here.

searx/engines/google_news.py+168−52

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.pynew file+201

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+25−23

This diff is too big to show here.

searx/engines/invidious.pynew file+122

This diff is too big to show here.

searx/engines/json_engine.py+41−11

This diff is too big to show here.

searx/engines/kickass.py+13−12

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+19−17

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.pynew file+73

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+51−57

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+416−74

This diff is too big to show here.

searx/engines/pdbe.py+19−13

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+15−13

This diff is too big to show here.

searx/engines/piratebay.py+72−68

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.pynew file+105

This diff is too big to show here.

searx/engines/qwant.py+213−68

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+13−12

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−11

This diff is too big to show here.

searx/engines/searchcode_code.py+14−13

This diff is too big to show here.

searx/engines/searchcode_doc.pydeleted−50

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−77

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+31−21

This diff is too big to show here.

searx/engines/spotify.py+29−12

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−59

This diff is too big to show here.

searx/engines/startpage.py+183−37

This diff is too big to show here.

searx/engines/subtitleseeker.pydeleted−80

This diff is too big to show here.

searx/engines/swisscows.pydeleted−108

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+18−18

This diff is too big to show here.

searx/engines/torrentz.py+35−28

This diff is too big to show here.

searx/engines/translated.py+18−31

This diff is too big to show here.

searx/engines/twitter.pydeleted−83

This diff is too big to show here.

searx/engines/unsplash.pynew file+55

This diff is too big to show here.

searx/engines/vimeo.py+16−15

This diff is too big to show here.

searx/engines/wikidata.py+644−439

This diff is too big to show here.

searx/engines/wikipedia.py+72−74

This diff is too big to show here.

searx/engines/wolframalpha_api.py+30−26

This diff is too big to show here.

searx/engines/wolframalpha_noapi.py+21−16

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+22−48

This diff is too big to show here.

searx/engines/www500px.pydeleted−74

This diff is too big to show here.

searx/engines/xpath.py+52−79

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+34−19

This diff is too big to show here.

searx/engines/yahoo.py+114−86

This diff is too big to show here.

searx/engines/yahoo_news.py+90−83

This diff is too big to show here.

searx/engines/yandex.pydeleted−62

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+21−13

This diff is too big to show here.

searx/engines/youtube_noapi.py+123−52

This diff is too big to show here.

searx/exceptions.pynew file+103

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+70−77

This diff is too big to show here.

tests/unit/engines/__init__.py → searx/metrology/__init__.pyrenamed

The content is the same.

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+115−11

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/doai_rewrite.pydeleted−31

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+5−1

This diff is too big to show here.

searx/plugins/infinite_scroll.py+1

This diff is too big to show here.

searx/plugins/oa_doi_rewrite.pynew file+48

This diff is too big to show here.

searx/plugins/open_results_on_new_tab.pydeleted−24

This diff is too big to show here.

searx/plugins/search_on_category_select.py+1

This diff is too big to show here.

searx/plugins/self_info.py+4−6

This diff is too big to show here.

searx/plugins/tracker_url_remover.py+19−10

This diff is too big to show here.

searx/plugins/vim_hotkeys.py+1

This diff is too big to show here.

searx/poolrequests.pydeleted−112

This diff is too big to show here.

searx/preferences.py+316−64

This diff is too big to show here.

searx/query.py+298−116

This diff is too big to show here.

searx/results.py+178−74

This diff is too big to show here.

searx/search.pydeleted−404

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+1356−183

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+21−7

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/css/infinite_scroll.css+3

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+34−12

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+24−1

This diff is too big to show here.

searx/static/plugins/js/vim_hotkeys.js+12−3

This diff is too big to show here.

searx/static/themes/__common__/js/image_layout.jsnew file+163

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/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−691

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−739

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.cssnew file+936

This diff is too big to show here.

searx/static/themes/oscar/css/logicodev-dark.min.cssnew file+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.cssnew file+1145

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.cssnew file+693

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+90−28

This diff is too big to show here.

searx/static/themes/oscar/img/favicon.png

Binary file not shown.

searx/static/themes/oscar/img/icons/1337x.pngnew file

Binary file not shown.

searx/static/themes/oscar/img/icons/amazon.png

Binary file not shown.

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

Binary file not shown.

searx/static/themes/oscar/img/icons/dailymotion.png

Binary file not shown.

searx/static/themes/oscar/img/icons/flickr.png

Binary file not shown.

searx/static/themes/oscar/img/icons/github.png

Binary file not shown.

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

Binary file not shown.

searx/static/themes/oscar/img/icons/searchcode code.png

Binary file not shown.

searx/static/themes/oscar/img/icons/searchcode doc.png

Binary file not shown.

searx/static/themes/oscar/img/icons/soundcloud.png

Binary file not shown.

searx/static/themes/oscar/img/icons/youtube.png

Binary file not shown.

searx/static/themes/oscar/img/loader.gif

Binary file not shown.

searx/static/themes/oscar/img/logo_searx_a.png

Binary file not shown.

searx/static/themes/oscar/img/logo_searx_a_n.png

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.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/img/searx_logo.png

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.jsnew file+474

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/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/advanced.lessdeleted−72

This diff is too big to show here.

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

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/navbar.lessdeleted−89

This diff is too big to show here.

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

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/navbar.lessdeleted−28

This diff is too big to show here.

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

This diff is too big to show here.

searx/static/themes/oscar/js/searx_src/00_requirejs_config.js → searx/static/themes/oscar/src/js/01_init.jsrenamed+34−23

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+117−99

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/src/less/logicodev-dark/oscar.lessnew file+257

This diff is too big to show here.

searx/static/themes/oscar/src/less/logicodev/advanced.lessnew file+49

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/src/less/logicodev/navbar.lessnew file+30

This diff is too big to show here.

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+2

This diff is too big to show here.

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+113−13

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−2

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/src/less/pointhi/navbar.lessnew file+20

This diff is too big to show here.

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+4

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+13−1

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+11

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/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/.jshintignorenew file+1

This diff is too big to show here.

searx/static/themes/simple/css/searx-rtl.cssnew file+2261

This diff is too big to show here.

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

This diff is too big to show here.

searx/static/themes/simple/css/searx.cssnew file+2257

This diff is too big to show here.

searx/static/themes/simple/css/searx.min.cssnew file+1

This diff is too big to show here.

searx/static/themes/simple/fonts/ion.cssnew file+139

This diff is too big to show here.

searx/static/themes/simple/fonts/ion.eotnew file

Binary file not shown.

searx/static/themes/simple/fonts/ion.htmlnew file+268

This diff is too big to show here.

searx/static/themes/simple/fonts/ion.svgnew file+105

This diff is too big to show here.

searx/static/themes/simple/fonts/ion.ttfnew file

Binary file not shown.

searx/static/themes/simple/fonts/ion.woffnew file

Binary file not shown.

searx/static/themes/simple/fonts/ion.woff2new file

Binary file not shown.

searx/static/themes/simple/gruntfile.jsnew file+161

This diff is too big to show here.

searx/static/themes/simple/img/favicon.pngnew file

Binary file not shown.

searx/static/themes/simple/img/logo_searx_a.pngnew file

Binary file not shown.

searx/static/themes/simple/img/searx.pngnew file

Binary file not shown.

searx/static/themes/courgette/img/searx_logo.svg → searx/static/themes/simple/img/searx_logo.svgrenamed

The content is the same.

searx/static/themes/simple/js/searx.head.jsnew file+40

This diff is too big to show here.

searx/static/themes/simple/js/searx.head.min.jsnew file+4

This diff is too big to show here.

searx/static/themes/simple/js/searx.head.min.js.mapnew file+1

This diff is too big to show here.

searx/static/themes/simple/js/searx.jsnew file+1502

This diff is too big to show here.

searx/static/themes/simple/js/searx.min.jsnew file+26

This diff is too big to show here.

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

This diff is too big to show here.

searx/static/themes/simple/js/searx_head/00_init.jsnew file+40

This diff is too big to show here.

searx/static/themes/simple/js/searx_src/00_searx_toolkit.jsnew file+164

This diff is too big to show here.

searx/static/themes/simple/js/searx_src/autocomplete.jsnew file+536

This diff is too big to show here.

searx/static/themes/simple/js/searx_src/searx_keyboard.jsnew file+366

This diff is too big to show here.

searx/static/themes/simple/js/searx_src/searx_mapresult.jsnew file+89

This diff is too big to show here.

searx/static/themes/simple/js/searx_src/searx_results.jsnew file+63

This diff is too big to show here.

searx/static/themes/simple/js/searx_src/searx_search.jsnew file+121

This diff is too big to show here.

searx/static/themes/simple/leaflet/images/layers-2x.pngnew file

Binary file not shown.

searx/static/themes/simple/leaflet/images/layers.pngnew file

Binary file not shown.

searx/static/themes/oscar/img/map/marker-icon-2x-green.png → searx/static/themes/simple/leaflet/images/marker-icon-2x-green.pngrenamed

Binary file not shown.

searx/static/themes/oscar/img/map/marker-icon-2x-orange.png → searx/static/themes/simple/leaflet/images/marker-icon-2x-orange.pngrenamed

Binary file not shown.

searx/static/themes/oscar/img/map/marker-icon-2x-red.png → searx/static/themes/simple/leaflet/images/marker-icon-2x-red.pngrenamed

Binary file not shown.

searx/static/themes/simple/leaflet/images/marker-icon-2x.pngnew file

Binary file not shown.

searx/static/themes/oscar/img/map/marker-icon-green.png → searx/static/themes/simple/leaflet/images/marker-icon-green.pngrenamed

Binary file not shown.

searx/static/themes/oscar/img/map/marker-icon-orange.png → searx/static/themes/simple/leaflet/images/marker-icon-orange.pngrenamed

Binary file not shown.

searx/static/themes/oscar/img/map/marker-icon-red.png → searx/static/themes/simple/leaflet/images/marker-icon-red.pngrenamed

Binary file not shown.

searx/static/themes/simple/leaflet/images/marker-icon.pngnew file

Binary file not shown.

searx/static/themes/simple/leaflet/images/marker-shadow.pngnew file

Binary file not shown.

searx/static/themes/simple/leaflet/leaflet.cssnew file+636

This diff is too big to show here.

searx/static/themes/simple/leaflet/leaflet.jsnew file+5

This diff is too big to show here.

searx/static/themes/simple/less/autocomplete.lessnew file+69

This diff is too big to show here.

searx/static/themes/simple/less/code.lessnew file+8

This diff is too big to show here.

searx/static/themes/pix-art/less/definitions.less → searx/static/themes/simple/less/definitions.lessrenamed+25−9

This diff is too big to show here.

searx/static/themes/simple/less/index.lessnew file+43

This diff is too big to show here.

searx/static/themes/simple/less/ion.lessnew file+181

This diff is too big to show here.

searx/static/themes/simple/less/mixins.lessnew file+62

This diff is too big to show here.

searx/static/themes/simple/less/normalize.lessnew file+341

This diff is too big to show here.

searx/static/themes/simple/less/preferences.lessnew file+120

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/search.lessnew file+264

This diff is too big to show here.

searx/static/themes/simple/less/stats.lessnew file+8

This diff is too big to show here.

searx/static/themes/simple/less/style-rtl.lessnew file+6

This diff is too big to show here.

searx/static/themes/simple/less/style.lessnew file+757

This diff is too big to show here.

searx/static/themes/simple/less/toolkit.lessnew file+468

This diff is too big to show here.

searx/static/themes/simple/less/toolkit_loader.lessnew file+41

This diff is too big to show here.

searx/static/themes/simple/magnet.svgnew file+1

This diff is too big to show here.

searx/static/themes/simple/package.jsonnew file+20

This diff is too big to show here.

searx/templates/__common__/about.htmlnew file+102

This diff is too big to show here.

searx/templates/__common__/opensearch.xmlnew file+22

This diff is too big to show here.

searx/templates/legacy/opensearch_response_rss.xml → searx/templates/__common__/opensearch_response_rss.xmlrenamed+32−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−66

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/opensearch.xmldeleted−28

This diff is too big to show here.

searx/templates/courgette/opensearch_response_rss.xmldeleted−23

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/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/about.htmldeleted−66

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.html−51

This diff is too big to show here.

searx/templates/legacy/opensearch.xml−28

This diff is too big to show here.

searx/templates/legacy/preferences.html−129

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

searx/templates/legacy/results.html−100

This diff is too big to show here.

searx/templates/legacy/search.html−8

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/about.html+1−62

This diff is too big to show here.

searx/templates/oscar/advanced.html+13−5

This diff is too big to show here.

searx/templates/oscar/base.html+42−32

This diff is too big to show here.

searx/templates/oscar/categories.html+9−9

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+32−18

This diff is too big to show here.

searx/templates/oscar/languages.html+10

This diff is too big to show here.

searx/templates/oscar/macros.html+146−88

This diff is too big to show here.

searx/templates/oscar/messages/no_results.html+12−4

This diff is too big to show here.

searx/templates/oscar/navbar.html+8−13

This diff is too big to show here.

searx/templates/oscar/opensearch.xml−28

This diff is too big to show here.

searx/templates/oscar/opensearch_response_rss.xml−23

This diff is too big to show here.

searx/templates/oscar/preferences.html+164−79

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

searx/templates/oscar/result_templates/files.html+55

This diff is too big to show here.

searx/templates/oscar/result_templates/images.html+36−39

This diff is too big to show here.

searx/templates/oscar/result_templates/key-value.html+19

This diff is too big to show here.

searx/templates/oscar/result_templates/map.html+76−72

This diff is too big to show here.

searx/templates/oscar/result_templates/products.html+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+29−27

This diff is too big to show here.

searx/templates/oscar/results.html+187−146

This diff is too big to show here.

searx/templates/oscar/search.html+25−12

This diff is too big to show here.

searx/templates/oscar/search_full.html+19−18

This diff is too big to show here.

searx/templates/oscar/time-range.html+13−11

This diff is too big to show here.

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

This diff is too big to show here.

searx/templates/pix-art/about.html−65

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

searx/templates/simple/about.html+4

This diff is too big to show here.

searx/templates/simple/base.html+64

This diff is too big to show here.

searx/templates/simple/categories.html+8

This diff is too big to show here.

searx/templates/simple/index.html+12

This diff is too big to show here.

searx/templates/simple/infobox.html+50

This diff is too big to show here.

searx/templates/simple/languages.html+8

This diff is too big to show here.

searx/templates/simple/macros.html+85

This diff is too big to show here.

searx/templates/simple/messages/no_results.html+17

This diff is too big to show here.

searx/templates/simple/preferences.html+267

This diff is too big to show here.

searx/templates/simple/result_templates/code.html+13

This diff is too big to show here.

searx/templates/simple/result_templates/default.html+17

This diff is too big to show here.

searx/templates/simple/result_templates/images.html+4

This diff is too big to show here.

searx/templates/simple/result_templates/key-value.html+11

This diff is too big to show here.

searx/templates/simple/result_templates/map.html+51

This diff is too big to show here.

searx/templates/simple/result_templates/torrent.html+24

This diff is too big to show here.

searx/templates/simple/result_templates/videos.html+15

This diff is too big to show here.

searx/templates/simple/results.html+179

This diff is too big to show here.

searx/templates/simple/search.html+18

This diff is too big to show here.

searx/templates/simple/simple.spec.txt+40

This diff is too big to show here.

searx/templates/simple/stats.html+4−1

This diff is too big to show here.

searx/templates/simple/time-range.html+17

This diff is too big to show here.

searx/testing.py+57−26

This diff is too big to show here.

searx/translations/ar/LC_MESSAGES/messages.mo

This diff is too big to show here.

searx/translations/ar/LC_MESSAGES/messages.po+1084

This diff is too big to show here.

searx/translations/bg/LC_MESSAGES/messages.mo

This diff is too big to show here.

searx/translations/bg/LC_MESSAGES/messages.po+518−211

This diff is too big to show here.

searx/translations/bo/LC_MESSAGES/messages.mo

This diff is too big to show here.

searx/translations/bo/LC_MESSAGES/messages.po+1083

This diff is too big to show here.

searx/translations/ca/LC_MESSAGES/messages.mo

This diff is too big to show here.

searx/translations/ca/LC_MESSAGES/messages.po+1084

This diff is too big to show here.

searx/translations/cs/LC_MESSAGES/messages.mo

This diff is too big to show here.

searx/translations/cs/LC_MESSAGES/messages.po+1086

This diff is too big to show here.

searx/translations/cy/LC_MESSAGES/messages.mo

This diff is too big to show here.

searx/translations/cy/LC_MESSAGES/messages.po+1082

This diff is too big to show here.

searx/translations/da/LC_MESSAGES/messages.mo

This diff is too big to show here.

searx/translations/da/LC_MESSAGES/messages.po+1083

This diff is too big to show here.

searx/translations/de/LC_MESSAGES/messages.mo

This diff is too big to show here.

searx/translations/de/LC_MESSAGES/messages.po+549−233

This diff is too big to show here.

searx/translations/el_GR/LC_MESSAGES/messages.mo

This diff is too big to show here.

searx/translations/el_GR/LC_MESSAGES/messages.po+551−244

This diff is too big to show here.

searx/translations/en/LC_MESSAGES/messages.mo

This diff is too big to show here.

searx/translations/eo/LC_MESSAGES/messages.mo

This diff is too big to show here.

searx/translations/eo/LC_MESSAGES/messages.po+613−304

This diff is too big to show here.

searx/translations/es/LC_MESSAGES/messages.mo

This diff is too big to show here.

searx/translations/es/LC_MESSAGES/messages.po+534−223

This diff is too big to show here.

searx/translations/et/LC_MESSAGES/messages.mo

This diff is too big to show here.

searx/translations/et/LC_MESSAGES/messages.po+1083

This diff is too big to show here.

searx/translations/eu/LC_MESSAGES/messages.mo

This diff is too big to show here.

searx/translations/eu/LC_MESSAGES/messages.po+1085

This diff is too big to show here.

searx/translations/fa_IR/LC_MESSAGES/messages.mo

This diff is too big to show here.

searx/translations/fa_IR/LC_MESSAGES/messages.po+1087

This diff is too big to show here.

searx/translations/fi/LC_MESSAGES/messages.mo

This diff is too big to show here.

searx/translations/fi/LC_MESSAGES/messages.po+1082

This diff is too big to show here.

searx/translations/fil/LC_MESSAGES/messages.mo

This diff is too big to show here.

searx/translations/fil/LC_MESSAGES/messages.po+1083

This diff is too big to show here.

searx/translations/fr/LC_MESSAGES/messages.mo

This diff is too big to show here.

searx/translations/fr/LC_MESSAGES/messages.po+519−210

This diff is too big to show here.

searx/translations/gl/LC_MESSAGES/messages.mo

This diff is too big to show here.

searx/translations/gl/LC_MESSAGES/messages.po+1083

This diff is too big to show here.

searx/translations/he/LC_MESSAGES/messages.mo

This diff is too big to show here.

searx/translations/he/LC_MESSAGES/messages.po+522−215

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+1083

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+511−204

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+1082

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+619−307

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+548−240

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+1082

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+554−246

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+1083

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+1083

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/pl/LC_MESSAGES/messages.po+1014

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+664−287

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+544−231

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+554−245

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+583−273

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+1082

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+1082

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+1084

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+1084

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+1087

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+1082

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+590−282

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+1085

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+1082

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+563−251

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_Hant_TW/LC_MESSAGES/messages.po+1014

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+1086

This diff is too big to show here.

searx/utils.py+488−173

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+668−247

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+2−3

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+68

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+3−3

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+16−12

This diff is too big to show here.

tests/__init__.py+2

This diff is too big to show here.

tests/robot/__init__.py+75

This diff is too big to show here.

tests/robot/test_basic.robot−153

This diff is too big to show here.

tests/test_robot.py−23

This diff is too big to show here.

tests/unit/engines/seedpeer_fixture.html−110

This diff is too big to show here.

tests/unit/engines/test_archlinux.py−106

This diff is too big to show here.

tests/unit/engines/test_bing.py−88

This diff is too big to show here.

tests/unit/engines/test_bing_images.py−123

This diff is too big to show here.

tests/unit/engines/test_bing_news.py−146

This diff is too big to show here.

tests/unit/engines/test_blekko_images.py−71

This diff is too big to show here.

tests/unit/engines/test_btdigg.py−384

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_currency_convert.py−43

This diff is too big to show here.

tests/unit/engines/test_dailymotion.py−74

This diff is too big to show here.

tests/unit/engines/test_deezer.py−57

This diff is too big to show here.

tests/unit/engines/test_deviantart.py−95

This diff is too big to show here.

tests/unit/engines/test_digbt.py−61

This diff is too big to show here.

tests/unit/engines/test_digg.py−101

This diff is too big to show here.

tests/unit/engines/test_doku.py−79

This diff is too big to show here.

tests/unit/engines/test_duckduckgo.py−75

This diff is too big to show here.

tests/unit/engines/test_duckduckgo_definitions.py−250

This diff is too big to show here.

tests/unit/engines/test_dummy.py−26

This diff is too big to show here.

tests/unit/engines/test_faroo.py−116

This diff is too big to show here.

tests/unit/engines/test_fdroid.py−49

This diff is too big to show here.

tests/unit/engines/test_flickr.py−142

This diff is too big to show here.

tests/unit/engines/test_flickr_noapi.py−329

This diff is too big to show here.

tests/unit/engines/test_frinkiac.py−49

This diff is too big to show here.

tests/unit/engines/test_gigablast.py−85

This diff is too big to show here.

tests/unit/engines/test_github.py−61

This diff is too big to show here.

tests/unit/engines/test_google.py−179

This diff is too big to show here.

tests/unit/engines/test_google_images.py−42

This diff is too big to show here.

tests/unit/engines/test_google_news.py−50

This diff is too big to show here.

tests/unit/engines/test_ina.py−64

This diff is too big to show here.

tests/unit/engines/test_kickass.py−397

This diff is too big to show here.

tests/unit/engines/test_mediawiki.py−130

This diff is too big to show here.

tests/unit/engines/test_mixcloud.py−67

This diff is too big to show here.

tests/unit/engines/test_nyaa.py−66

This diff is too big to show here.

tests/unit/engines/test_openstreetmap.py−199

This diff is too big to show here.

tests/unit/engines/test_pdbe.py−109

This diff is too big to show here.

tests/unit/engines/test_photon.py−166

This diff is too big to show here.

tests/unit/engines/test_piratebay.py−166

This diff is too big to show here.

tests/unit/engines/test_qwant.py−317

This diff is too big to show here.

tests/unit/engines/test_reddit.py−71

This diff is too big to show here.

tests/unit/engines/test_scanr_structures.py−175

This diff is too big to show here.

tests/unit/engines/test_searchcode_code.py−75

This diff is too big to show here.

tests/unit/engines/test_searchcode_doc.py−70

This diff is too big to show here.

tests/unit/engines/test_seedpeer.py−51

This diff is too big to show here.

tests/unit/engines/test_soundcloud.py−192

This diff is too big to show here.

tests/unit/engines/test_spotify.py−124

This diff is too big to show here.

tests/unit/engines/test_stackoverflow.py−106

This diff is too big to show here.

tests/unit/engines/test_startpage.py−140

This diff is too big to show here.

tests/unit/engines/test_subtitleseeker.py−169

This diff is too big to show here.

tests/unit/engines/test_swisscows.py−128

This diff is too big to show here.

tests/unit/engines/test_tokyotoshokan.py−110

This diff is too big to show here.

tests/unit/engines/test_torrentz.py−91

This diff is too big to show here.

tests/unit/engines/test_twitter.py−502

This diff is too big to show here.

tests/unit/engines/test_vimeo.py−36

This diff is too big to show here.

tests/unit/engines/test_wikidata.py−504

This diff is too big to show here.

tests/unit/engines/test_wikipedia.py−160

This diff is too big to show here.

tests/unit/engines/test_wolframalpha_api.py−166

This diff is too big to show here.

tests/unit/engines/test_wolframalpha_noapi.py−224

This diff is too big to show here.

tests/unit/engines/test_www1x.py−57

This diff is too big to show here.

tests/unit/engines/test_www500px.py−34

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/engines/test_yacy.py−96

This diff is too big to show here.

tests/unit/engines/test_yahoo.py−149

This diff is too big to show here.

tests/unit/engines/test_yahoo_news.py−149

This diff is too big to show here.

tests/unit/engines/test_youtube_api.py−111

This diff is too big to show here.

tests/unit/engines/test_youtube_noapi.py−174

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+78−28

This diff is too big to show here.

tests/unit/test_preferences.py+62−25

This diff is too big to show here.

tests/unit/test_query.py+290

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+93−3

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+173−46

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+126−35

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−161

This diff is too big to show here.

utils/filtron.sh+561

This diff is too big to show here.

utils/lib.sh+1845

This diff is too big to show here.

utils/lxc-searx.env+97

This diff is too big to show here.

utils/lxc.sh+560

This diff is too big to show here.

utils/makefile.include+103

This diff is too big to show here.

utils/makefile.lxc+32

This diff is too big to show here.

utils/morty.sh+546

This diff is too big to show here.

utils/searx.sh+914

This diff is too big to show here.

utils/templates/etc/apache2+1

This diff is too big to show here.

utils/templates/etc/filtron/rules.json+129

This diff is too big to show here.

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

This diff is too big to show here.

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

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+88

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+87

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/filtron.service+29

This diff is too big to show here.

utils/templates/lib/systemd/system/morty.service+29

This diff is too big to show here.