Merge pull request #22 from only-cli/feat/wikipedia-shortcuts

feat: add wikipedia site shortcuts
This commit is contained in:
Mark Cli
2026-08-23 23:20:25 -04:00
committed by GitHub
3 changed files with 10 additions and 0 deletions
+1
View File
@@ -92,6 +92,7 @@ Works on any mostly-static site with no per-site setup: news sites, blogs, docum
| Stack Overflow | `oc so` (via Atom feeds and the Stack Exchange API) | `search <query>`, `question <id>`, `tag <name>`, `user <id>`, `recent` |
| Yahoo Finance | `oc yahoo` | `quote <symbol>`, `news <symbol>`, `history <symbol>`, `lookup <query>`, `markets`, `gainers`, `losers`, `trending` |
| YouTube | `oc yt` | `video <id>`, `channel <name>` |
| Wikipedia | `oc wiki` (via `action=render`) | `article <title>`, `search <query>`, `lang <code> <title>` |
| AWS docs | `oc aws` (search via DuckDuckGo) | `guide <service> <page>`, `page <service> <guide> <page>`, `cli <command>`, `search <query>` |
| Google Cloud docs | `oc gcp` (via docs.cloud.google.com, search via DuckDuckGo) | `docs <product>`, `page <product> <page>`, `gcloud <command>`, `search <query>` |
| Microsoft Learn | `oc learn` (search via its RSS API) | `azure <page>`, `doc <path>`, `cli <command>`, `search <query>` |
+8
View File
@@ -0,0 +1,8 @@
{
"domain": "wikipedia.org",
"commands": {
"article": { "open": "https://en.wikipedia.org/w/index.php?title={title}&action=render", "args": ["title"] },
"search": { "open": "https://en.wikipedia.org/w/index.php?search={query}&fulltext=1&ns0=1", "args": ["query"] },
"lang": { "open": "https://{code}.wikipedia.org/w/index.php?title={title}&action=render", "args": ["code", "title"] }
}
}
+1
View File
@@ -24,6 +24,7 @@ const ALIASES = {
aws: 'docs.aws.amazon.com',
gcp: 'cloud.google.com',
learn: 'learn.microsoft.com',
wiki: 'wikipedia.org',
};
/** @typedef {{open: string, args?: string[]}} Shortcut */