diff --git a/README.md b/README.md index ce0c1b4..c2fdcfb 100644 --- a/README.md +++ b/README.md @@ -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 `, `question `, `tag `, `user `, `recent` | | Yahoo Finance | `oc yahoo` | `quote `, `news `, `history `, `lookup `, `markets`, `gainers`, `losers`, `trending` | | YouTube | `oc yt` | `video `, `channel ` | +| Wikipedia | `oc wiki` (via `action=render`) | `article `, `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>` | diff --git a/clis/wikipedia.org.json b/clis/wikipedia.org.json new file mode 100644 index 0000000..8f9b64f --- /dev/null +++ b/clis/wikipedia.org.json @@ -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"] } + } +} diff --git a/src/sites.js b/src/sites.js index 575a835..eade056 100644 --- a/src/sites.js +++ b/src/sites.js @@ -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 */