metasearch/README

73 lines
2.5 KiB
Plaintext
Raw Permalink Normal View History

2024-07-01 04:04:04 +00:00
==========
metasearch
==========
2023-12-20 23:45:16 +00:00
2024-07-01 04:04:04 +00:00
https://github.com/mat-1/metasearch2
2023-12-20 23:45:16 +00:00
2024-07-01 04:04:04 +00:00
----
INFO
----
2024-04-13 02:50:38 +00:00
2024-07-01 04:04:04 +00:00
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.
2024-07-01 04:04:04 +00:00
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!
2023-12-20 23:45:16 +00:00
2024-07-01 04:04:04 +00:00
------------
INSTALLATION
------------
2024-01-15 02:29:53 +00:00
2024-07-01 04:04:04 +00:00
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`.
2024-04-13 02:17:34 +00:00
2024-07-01 04:04:04 +00:00
Usage: `metasearch [config_file]`
2024-06-29 07:01:05 +00:00
2024-07-01 04:04:04 +00:00
The config_file argument is optional; if it's not specified then it'll be
checked at the following locations:
2024-06-29 07:01:05 +00:00
2024-07-01 04:04:04 +00:00
- $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.
2024-07-01 04:04:04 +00:00
-------------
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
2024-07-01 04:04:04 +00:00
`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.