diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..b90d821 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,13 @@ +repos: + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.6.9 + hooks: + - id: ruff + args: [--fix] + - id: ruff-format + - repo: https://github.com/psf/black + rev: 24.8.0 + hooks: + - id: black + args: [--quiet] + diff --git a/README.md b/README.md index 22f177a..71695ee 100644 --- a/README.md +++ b/README.md @@ -75,6 +75,7 @@ Contents - User-defined [custom bangs](#custom-bangs) - Optional location-based searching (i.e. results near \) - Optional NoJS mode to view search results in a separate window with JavaScript blocked +- JSON output for results via content negotiation (see "JSON results (API)") *No third party JavaScript. Whoogle can be used with JavaScript disabled, but if enabled, uses JavaScript for things like presenting search suggestions. @@ -463,6 +464,8 @@ There are a few optional environment variables available for customizing a Whoog | WHOOGLE_SHOW_FAVICONS | Show/hide favicons next to search result URLs. Default on. | | WHOOGLE_UPDATE_CHECK | Enable/disable the automatic daily check for new versions of Whoogle. Default on. | | WHOOGLE_FALLBACK_ENGINE_URL | Set a fallback Search Engine URL when there is internal server error or instance is rate-limited. Search query is appended to the end of the URL (eg. https://duckduckgo.com/?k1=-1&q=). | +| WHOOGLE_BUNDLE_STATIC | When set to 1, serve a single bundled CSS and JS file generated at startup to reduce requests. Default off. | +| WHOOGLE_HTTP2 | Enable HTTP/2 for upstream requests (via httpx). Default on — set to 0 to force HTTP/1.1. | ### Config Environment Variables These environment variables allow setting default config values, but can be overwritten manually by using the home page config menu. These allow a shortcut for destroying/rebuilding an instance to the same config state every time. @@ -495,6 +498,28 @@ Same as most search engines, with the exception of filtering by time range. To filter by a range of time, append ":past