mirror of
https://github.com/searxng/searxng
synced 2024-01-01 19:24:07 +01:00
upd
This commit is contained in:
parent
44e942827e
commit
92aa12c131
28 changed files with 388 additions and 195 deletions
|
|
@ -29,7 +29,7 @@ import typing
|
|||
import urllib.parse
|
||||
import jinja2
|
||||
from flask.helpers import url_for
|
||||
import mistletoe
|
||||
from markdown_it import MarkdownIt
|
||||
|
||||
from .. import get_setting
|
||||
from ..compat import cached_property
|
||||
|
|
@ -71,13 +71,17 @@ class InfoPage:
|
|||
|
||||
@cached_property
|
||||
def html(self):
|
||||
"""Render Markdown (CommonMark_) to HTML by using mistletoe_.
|
||||
"""Render Markdown (CommonMark_) to HTML by using markdown-it-py_.
|
||||
|
||||
.. _CommonMark: https://commonmark.org/
|
||||
.. _mistletoe: https://github.com/miyuchina/mistletoe
|
||||
.. _markdown-it-py: https://github.com/executablebooks/markdown-it-py
|
||||
|
||||
"""
|
||||
return mistletoe.markdown(self.content)
|
||||
return MarkdownIt(
|
||||
"commonmark", {"typographer": True}
|
||||
).enable(
|
||||
["replacements", "smartquotes"]
|
||||
).render(self.content)
|
||||
|
||||
def get_ctx(self): # pylint: disable=no-self-use
|
||||
"""Jinja context to render :py:obj:`InfoPage.content`"""
|
||||
|
|
|
|||
|
|
@ -1,55 +1,42 @@
|
|||
# About MAGI
|
||||
# About Search
|
||||
|
||||
MAGI is a fork from the well-known metasearch engine searx, aggregating
|
||||
Search is a fork from the well-known metasearch engine searx, aggregating
|
||||
the results of other {{link('search engines', 'preferences')}} while not
|
||||
storing information about its users.
|
||||
|
||||
More about MAGI ...
|
||||
|
||||
More about Search ...
|
||||
|
||||
## Why use it?
|
||||
|
||||
* MAGI may not offer you as personalised results as Google, but it doesn't
|
||||
* Search may not offer you as personalised results as Google, but it doesn't
|
||||
generate a profile about you.
|
||||
|
||||
* MAGI doesn't care about what you search for, never shares anything with a
|
||||
* Search doesn't care about what you search for, never shares anything with a
|
||||
third party, and it can't be used to compromise you.
|
||||
|
||||
* MAGI is free software, the code is 100% open and you can help to make it
|
||||
better.
|
||||
|
||||
If you do care about privacy, want to be a conscious user, or otherwise believe
|
||||
in digital freedom, make SearXNG your default search engine or run it on your
|
||||
own server
|
||||
|
||||
## Technical details - How does it work?
|
||||
|
||||
MAGI is a [metasearch engine], inspired by the [seeks project]. It provides
|
||||
Search is a [metasearch engine], inspired by the [seeks project]. It provides
|
||||
basic privacy by mixing your queries with searches on other platforms without
|
||||
storing search data. Queries are made using a POST request on every browser
|
||||
(except Chromium-based browsers*). Therefore they show up in neither our logs,
|
||||
nor your url history. In the case of Chromium-based browser users there is an
|
||||
exception: MAGI uses the search bar to perform GET requests. MAGI can be
|
||||
exception: Search uses the search bar to perform GET requests. Search can be
|
||||
added to your browser's search bar; moreover, it can be set as the default
|
||||
search engine.
|
||||
|
||||
## How to set as the default search engine?
|
||||
## How do I set it as the default search engine?
|
||||
|
||||
MAGI supports [OpenSearch]. For more information on changing your default
|
||||
Search supports [OpenSearch]. For more information on changing your default
|
||||
search engine, see your browser's documentation:
|
||||
|
||||
* [Firefox]
|
||||
* [Microsoft Edge]
|
||||
* Chromium-based browsers [only add websites that the user navigates to without
|
||||
a path.](https://www.chromium.org/tab-to-search)
|
||||
|
||||
## Where to find anonymous usage statistics of this instance ?
|
||||
|
||||
{{link('Stats page', 'stats')}} contains some useful data about the engines
|
||||
used.
|
||||
- [Firefox]
|
||||
- [Microsoft Edge] - Behind the link, you will also find some useful instructions
|
||||
for Chrome and Safari.
|
||||
- [Chromium]-based browsers only add websites that the user navigates to without
|
||||
a path.
|
||||
|
||||
[metasearch engine]: https://en.wikipedia.org/wiki/Metasearch_engine
|
||||
[seeks project]: https://beniz.github.io/seeks/
|
||||
[OpenSearch]: https://github.com/dewitt/opensearch/blob/master/opensearch-1-1-draft-6.md
|
||||
[Firefox]: https://support.mozilla.org/en-US/kb/add-or-remove-search-engine-firefox
|
||||
[Microsoft Edge]: https://support.microsoft.com/en-us/help/4028574/microsoft-edge-change-the-default-search-engine
|
||||
[Chromium]: https://www.chromium.org/tab-to-search
|
||||
|
|
|
|||
|
|
@ -1,35 +1,69 @@
|
|||
# Search syntax
|
||||
|
||||
MAGI allows you to modify the default categories, engines and search language
|
||||
Search allows you to modify the default categories, engines and search language
|
||||
via the search query.
|
||||
|
||||
Prefix `!` to set category and engine names.
|
||||
## `!` select engine and category
|
||||
|
||||
Prefix: `:` to set the language.
|
||||
To set category and/or engine names use a `!` prefix. To give a few examples:
|
||||
|
||||
Abbrevations of the engines and languages are also accepted. Engine/category
|
||||
modifiers are chainable and inclusive. E.g. with {{search('!map !ddg !wp paris')}}
|
||||
search in map category **and** duckduckgo **and** wikipedia for
|
||||
`paris`.
|
||||
- search in wikipedia for **paris**
|
||||
|
||||
See the {{link('preferences', 'preferences')}} for the list of engines,
|
||||
categories and languages.
|
||||
- {{search('!wp paris')}}
|
||||
- {{search('!wikipedia paris')}}
|
||||
|
||||
## Examples
|
||||
- search in category **map** for **paris**
|
||||
|
||||
Search in wikipedia for `paris`:
|
||||
- {{search('!map paris')}}
|
||||
|
||||
* {{search('!wp paris')}}
|
||||
* {{search('!wikipedia paris')}}
|
||||
- image search
|
||||
|
||||
Search in category `map` for `paris`:
|
||||
- {{search('!images Wau Holland')}}
|
||||
|
||||
* {{search('!map paris')}}
|
||||
Abbreviations of the engines and languages are also accepted. Engine/category
|
||||
modifiers are chain able and inclusive. E.g. with {{search('!map !ddg !wp
|
||||
paris')}} search in map category and duckduckgo and wikipedia for **paris**.
|
||||
|
||||
Image search:
|
||||
## `:` select language
|
||||
|
||||
* {{search('!images Wau Holland')}}
|
||||
To select language filter use a `:` prefix. To give an example:
|
||||
|
||||
Custom language in wikipedia:
|
||||
- search wikipedia by a custom language
|
||||
|
||||
* {{search(':fr !wp Wau Holland')}}
|
||||
- {{search(':fr !wp Wau Holland')}}
|
||||
|
||||
## `!!` external bangs
|
||||
|
||||
SearXNG supports the external bangs from [ddg]. To directly jump to a external
|
||||
search page use the `!!` prefix. To give an example:
|
||||
|
||||
- search wikipedia by a custom language
|
||||
|
||||
- {{search('!!wfr Wau Holland')}}
|
||||
|
||||
Please note, your search will be performed directly in the external search
|
||||
engine, SearXNG cannot protect your privacy on this.
|
||||
|
||||
[ddg]: https://duckduckgo.com/bang
|
||||
|
||||
## Special Queries
|
||||
|
||||
In the {{link('preferences', 'preferences')}} page you find keywords for
|
||||
_special queries_. To give a few examples:
|
||||
|
||||
- generate a random UUID
|
||||
|
||||
- {{search('random uuid')}}
|
||||
|
||||
- find the average
|
||||
|
||||
- {{search('avg 123 548 2.04 24.2')}}
|
||||
|
||||
- show _user agent_ of your browser (needs to be activated)
|
||||
|
||||
- {{search('user-agent')}}
|
||||
|
||||
- convert strings to different hash digests (needs to be activated)
|
||||
|
||||
- {{search('md5 lorem ipsum')}}
|
||||
- {{search('sha512 lorem ipsum')}}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue