Go to file
2024-10-28 14:50:39 -04:00
src newdocker 2024-10-28 14:50:39 -04:00
.envrc infect the repo with Nix (#16) 2024-10-22 09:27:43 -05:00
.gitignore infect the repo with Nix (#16) 2024-10-22 09:27:43 -05:00
.prettierrc fix clicking suggestions and better docs.rs 2023-12-21 18:43:29 -06:00
Cargo.lock fix github header deduplication and upgrade deps 2024-08-21 07:57:12 +00:00
Cargo.toml fix github header deduplication and upgrade deps 2024-08-21 07:57:12 +00:00
compose.yml updated container definitions for new config files 2024-05-24 01:43:39 +00:00
config-default.toml default config 2024-10-28 14:30:30 -04:00
Containerfile updated container definitions for new config files 2024-05-24 01:43:39 +00:00
dev.html custom mods 2024-10-28 13:32:01 -04:00
Dockerfile newdocker 2024-10-28 14:50:39 -04:00
example.html custom mods 2024-10-28 13:32:01 -04:00
flake.lock infect the repo with Nix (#16) 2024-10-22 09:27:43 -05:00
flake.nix infect the repo with Nix (#16) 2024-10-22 09:27:43 -05:00
LICENSE add license 2024-01-09 19:20:35 -06:00
README Add config options to replace parts of urls and to change their ranking weights (#14) 2024-07-16 16:42:43 -05:00
rustfmt.toml add line wrapping to rustfmt 2024-01-03 01:53:14 -06:00

                                   ==========
                                   metasearch
                                   ==========

                      https://github.com/mat-1/metasearch2

----
INFO
----

metasearch (aka metasearch2) is a cute metasearch engine. It sources its results
from Google, Bing, Brave, and several others. It's designed to be as lightweight
as possible, both on the server and client. There is no required client-side
JavaScript.

There's a public demo instance at https://s.matdoes.dev, but please do not use
it as your default or rely on it. This is so I don't get ratelimited by Google
or other engines. Run your own instance instead!

------------
INSTALLATION
------------

The easiest way to install metasearch is with `cargo install metasearch`. To get
the unstable version with the latest features, you can install it with
`cargo install --git https://github.com/mat-1/metasearch2`.

Usage: `metasearch [config_file]`

The config_file argument is optional; if it's not specified then it'll be
checked at the following locations:

  - $XDG_CONFIG_HOME/metasearch/config.toml
  - $HOME/.config/metasearch/config.toml
  - ./config.toml

If no config file exists, it'll be created at the first valid path in the list.

By default, metasearch runs on port 28019. You are encouraged to use a reverse
proxy.

-------------
CONFIGURATION
-------------

You can see all the default config options at `src/config.rs`. Some interesting
options you may want to change are:

  - bind - the host and port that the web server runs on, defaults to
    `0.0.0.0:28019`.
  - api - whether your instance is accessible through a JSON API. See below for
    more details.
  - ui.stylesheet_url - a link to a stylesheet that will be loaded alongside the
    main one, for example `/themes/catppuccin-mocha.css`.
  - image_search.enabled - add a tab for viewing image results for your query.
    this is disabled by default as the image proxy could be used to make GET
    requests to arbitrary URLs from your server.
  - engines.google.weight - the ranking score multiplier for an engine, you can
    modify this if you prefer the results from certain engines.

--------
JSON API
--------

metasearch has a JSON API that can be enabled by setting `api = true` in your
config. To use it, set the `Accept: application/json` header in your requests.

For example:
curl 'http://localhost:28019/search?q=sandcats' -H 'Accept: application/json'

The structure of the API is not guaranteed to be stable, as it relies on
serializing internal structs. It may change without warning in the future.