Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit acd966e2 authored by Nivesh Krishna's avatar Nivesh Krishna Committed by Arnau Vàzquez
Browse files

remove calculator plugin and add math.js

parent 8d9df357
Loading
Loading
Loading
Loading
+17 −11
Original line number Diff line number Diff line
@@ -17,27 +17,33 @@ Spot was forked from searx: read [documentation](https://asciimoo.github.io/sear
6 services are used for production:

* [filtron](https://github.com/asciimoo/filtron) as reverse HTTP proxy to filter requests by different rules.
* [morty](https://github.com/asciimoo/morty) as proxy to serve thumbnails.
* [nginx](https://www.nginx.com/) as http server to serve static files.
* Spot the meta search engine.
* [tor](https://www.torproject.org) as open network that helps you defend against traffic analysis.
* [redis](https://redis.io/) as memory storage to cache http requests


```mermaid
graph TD
  A(reverse proxy) --> |http://localhost:8088| B(filtron)
  A(reverse proxy) --> |https://localhost:8089| C(morty)
  C --> |image link| C
  B --> D(nginx)
  D --> |static file| D
  D --> |API| E(spot)
  E --> H(tor1)
  E --> I(tor2)
  E --> J(torN)
  E --> |cache| K(redis)
  B --> C(nginx)
  C --> |static file| C
  C --> |API| D(spot)
  D --> E(proxy service)
  D --> |cache| F(redis)
  E --> G(search engine)
  E --> H(search engine)
  E --> I(search engine)
```


## Conversion Engine

Spot uses [mathjs](https://mathjs.org/index.html) to perform arithmetic operations on the query. It also supports conversion of units
and can perform arithmetic operations on units. Supported units and operations can be found [here](https://mathjs.org/docs/datatypes/units.html#reference)


Spot also supports currency conversion though [xe](https://xe.com/) API.

## Getting Started

You can run spot with docker-compose. First of all you have to install
+1 −1
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@ server {
  server_name _;

  add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload";
  add_header Content-Security-Policy "default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; form-action 'self'; font-src 'self'; frame-ancestors 'self'; base-uri 'self'; connect-src 'self' https://overpass-api.de; img-src 'self' data:; frame-src https://www.youtube-nocookie.com https://player.vimeo.com https://www.dailymotion.com https://www.deezer.com https://www.mixcloud.com https://w.soundcloud.com https://embed.spotify.com";
  add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; form-action 'self'; font-src 'self'; frame-ancestors 'self'; base-uri 'self'; connect-src 'self' https://overpass-api.de; img-src 'self' data:; frame-src https://www.youtube-nocookie.com https://player.vimeo.com https://www.dailymotion.com https://www.deezer.com https://www.mixcloud.com https://w.soundcloud.com https://embed.spotify.com";
  add_header X-Frame-Options "SAMEORIGIN";

  root /var/www/spot;
+2076 −309

File changed.

Preview size limit exceeded, changes collapsed.

package.json

0 → 100644
+8 −0
Original line number Diff line number Diff line
{
  "dependencies": {
    "grunt-cli": "^1.4.3",
    "less": "2.7",
    "less-plugin-clean-css": "^1.5.1",
    "mathjs": "^10.5.3"
  }
}
+0 −2
Original line number Diff line number Diff line
@@ -29,7 +29,6 @@ logger = logger.getChild('plugins')
from searx.plugins import (oa_doi_rewrite,
                           ahmia_filter,
                           hash_plugin,
                           calculator,
                           https_rewrite,
                           infinite_scroll,
                           self_info,
@@ -176,7 +175,6 @@ plugins.register(search_on_category_select)
plugins.register(tracker_url_remover)
plugins.register(vim_hotkeys)
plugins.register(rest_api)
plugins.register(calculator)
# load external plugins
if 'plugins' in settings:
    plugins.register(*settings['plugins'], external=True)
Loading