mirror of
https://github.com/only-cli/oc.git
synced 2026-09-15 10:40:56 +02:00
All three providers render their own docs search client-side, so distilling the search page yields only nav chrome. Microsoft Learn is the exception underneath: its public RSS search endpoint serves real results as a feed, which the engine already renders (same route as Stack Overflow). AWS and Google Cloud expose search only as JSON (#3), so until the engine renders JSON their search goes through DuckDuckGo HTML with a baked-in site: filter, the same endpoint the duckduckgo.com CLI already relies on. Bing was tried first for that job and rejected: it silently drops the site: operator on some queries. Verified live: the Learn RSS endpoint returns titled results for "app service deploy"; the DuckDuckGo route returns real docs.aws.amazon.com pages for "lambda timeout" (it can answer with a rate-limit challenge under rapid-fire automated use, noted in README).
10 lines
456 B
JSON
10 lines
456 B
JSON
{
|
|
"domain": "learn.microsoft.com",
|
|
"commands": {
|
|
"azure": { "open": "https://learn.microsoft.com/en-us/azure/{page}", "args": ["page"] },
|
|
"doc": { "open": "https://learn.microsoft.com/en-us/{path}", "args": ["path"] },
|
|
"cli": { "open": "https://learn.microsoft.com/en-us/cli/azure/{command}", "args": ["command"] },
|
|
"search": { "open": "https://learn.microsoft.com/api/search/rss?search={query}&locale=en-us", "args": ["query"] }
|
|
}
|
|
}
|