mirror of
https://github.com/only-cli/oc.git
synced 2026-09-15 10:40:56 +02:00
Merge pull request #22 from only-cli/feat/wikipedia-shortcuts
feat: add wikipedia site shortcuts
This commit is contained in:
@@ -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>` |
|
||||
|
||||
@@ -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"] }
|
||||
}
|
||||
}
|
||||
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user