6fa931aa36
Testing / remote-protocol-compat (0.9.5) (push) Successful in 56s
Testing / remote-protocol-compat (0.9.3) (push) Successful in 59s
Testing / test (push) Successful in 1m1s
Build & Publish Package / publish (push) Successful in 33s
Package Extension / package-extension (push) Successful in 36s
- Gate TCP serve commands with safe-by-default policies, per-key allow tokens, per-key rate limiting, and audit labels. - Reuse authenticated encrypted remote sessions and parallelize/caches multi-browser fanout to reduce repeated handshake roundtrips. - Increase paged native-host batch size with extension-side byte budgeting to speed large tab listings safely. - Point install output at public Chrome Web Store / Firefox AMO listings by default, with --dev preserving unpacked workflows. - Share search-engine metadata between CLI and SDK and bump the package/extension version to 0.16.0. - Cover the new security, pooling, paging, install, and fanout behavior with expanded Python and extension tests.
54 lines
2.6 KiB
Python
54 lines
2.6 KiB
Python
"""Shared search-engine metadata for SDK and CLI search commands."""
|
|
from __future__ import annotations
|
|
|
|
ENGINES = {
|
|
"google": "https://www.google.com/search?q={query}",
|
|
"brave": "https://search.brave.com/search?q={query}",
|
|
"duckduckgo": "https://duckduckgo.com/?q={query}",
|
|
"ddg": "https://duckduckgo.com/?q={query}",
|
|
"youtube": "https://www.youtube.com/results?search_query={query}",
|
|
"yt": "https://www.youtube.com/results?search_query={query}",
|
|
"spotify": "https://open.spotify.com/search/{query}",
|
|
"amazon": "https://www.amazon.com/s?k={query}",
|
|
"ecosia": "https://www.ecosia.org/search?q={query}",
|
|
"furaffinity": "https://www.furaffinity.net/search/?q={query}",
|
|
"fa": "https://www.furaffinity.net/search/?q={query}",
|
|
"bing": "https://www.bing.com/search?q={query}",
|
|
"github": "https://github.com/search?q={query}",
|
|
"wikipedia": "https://en.wikipedia.org/wiki/Special:Search?search={query}",
|
|
"wiki": "https://en.wikipedia.org/wiki/Special:Search?search={query}",
|
|
"reddit": "https://www.reddit.com/search/?q={query}",
|
|
"stackoverflow": "https://stackoverflow.com/search?q={query}",
|
|
"so": "https://stackoverflow.com/search?q={query}",
|
|
}
|
|
|
|
DISPLAY_NAMES = {
|
|
"google": "Google", "brave": "Brave Search", "duckduckgo": "DuckDuckGo",
|
|
"ddg": "DuckDuckGo", "youtube": "YouTube", "yt": "YouTube",
|
|
"spotify": "Spotify", "amazon": "Amazon", "ecosia": "Ecosia",
|
|
"furaffinity": "FurAffinity", "fa": "FurAffinity", "bing": "Bing",
|
|
"github": "GitHub", "wikipedia": "Wikipedia", "wiki": "Wikipedia",
|
|
"reddit": "Reddit", "stackoverflow": "Stack Overflow", "so": "Stack Overflow",
|
|
}
|
|
|
|
SUBCOMMANDS = [
|
|
("google", "Search with Google."),
|
|
("brave", "Search with Brave Search."),
|
|
("duckduckgo", "Search with DuckDuckGo."),
|
|
("ddg", "Search with DuckDuckGo (alias for duckduckgo)."),
|
|
("youtube", "Search YouTube videos."),
|
|
("yt", "Search YouTube (alias for youtube)."),
|
|
("spotify", "Search Spotify."),
|
|
("amazon", "Search Amazon."),
|
|
("ecosia", "Search with Ecosia."),
|
|
("furaffinity", "Search FurAffinity."),
|
|
("fa", "Search FurAffinity (alias for furaffinity)."),
|
|
("bing", "Search with Bing."),
|
|
("github", "Search GitHub."),
|
|
("wikipedia", "Search Wikipedia."),
|
|
("wiki", "Search Wikipedia (alias for wikipedia)."),
|
|
("reddit", "Search Reddit."),
|
|
("stackoverflow", "Search Stack Overflow."),
|
|
("so", "Search Stack Overflow (alias for stackoverflow)."),
|
|
]
|