docs: add favicons to readme
425
README.md
|
@ -32,7 +32,7 @@ Features
|
|||
|
||||
### Site-Specific Key Mappings
|
||||
|
||||
195 key mappings for 17 unique
|
||||
202 key mappings for 17 unique
|
||||
sites have been included which can help you perform some common actions:
|
||||
|
||||
<table>
|
||||
|
@ -53,24 +53,27 @@ sites have been included which can help you perform some common actions:
|
|||
<tr><td><code>=c</code></td><td>Show Google's cached version of page</td></tr>
|
||||
<tr><td><code>=a</code></td><td>Show Archive.org Wayback Machine for page</td></tr>
|
||||
<tr><td><code>;pd</code></td><td>Toggle PDF viewer from SurfingKeys</td></tr>
|
||||
<tr><th colspan="2"><a href="//amazon.com">amazon.com</a></th></tr><tr><td><strong>Mapping</strong></td><td><strong>Description</strong></td></tr>
|
||||
<tr><th colspan="2"><a href="//amazon.com"><img src="./assets/favicons/amazon.com.ico" width="16px"> amazon.com</a></th></tr><tr><td><strong>Mapping</strong></td><td><strong>Description</strong></td></tr>
|
||||
<tr><td><code><Space>fs</code></td><td>Fakespot</td></tr>
|
||||
<tr><th colspan="2"><a href="//behance.net">behance.net</a></th></tr><tr><td><strong>Mapping</strong></td><td><strong>Description</strong></td></tr>
|
||||
<tr><th colspan="2"><a href="//behance.net"><img src="./assets/favicons/behance.net.ico" width="16px"> behance.net</a></th></tr><tr><td><strong>Mapping</strong></td><td><strong>Description</strong></td></tr>
|
||||
<tr><td><code><Space>s</code></td><td>Appreciate project</td></tr>
|
||||
<tr><td><code><Space>b</code></td><td>Add project to collection</td></tr>
|
||||
<tr><td><code><Space>a</code></td><td>View project</td></tr>
|
||||
<tr><td><code><Space>A</code></td><td>View project (new tab)</td></tr>
|
||||
<tr><th colspan="2"><a href="//dribbble.com">dribbble.com</a></th></tr><tr><td><strong>Mapping</strong></td><td><strong>Description</strong></td></tr>
|
||||
<tr><th colspan="2"><a href="//dribbble.com"><img src="./assets/favicons/dribbble.com.ico" width="16px"> dribbble.com</a></th></tr><tr><td><strong>Mapping</strong></td><td><strong>Description</strong></td></tr>
|
||||
<tr><td><code><Space>s</code></td><td>Heart Shot</td></tr>
|
||||
<tr><td><code><Space>a</code></td><td>View shot</td></tr>
|
||||
<tr><td><code><Space>A</code></td><td>View shot (new tab)</td></tr>
|
||||
<tr><td><code><Space>v</code></td><td>View attachment image</td></tr>
|
||||
<tr><td><code><Space>V</code></td><td>Yank attachment image source URL</td></tr>
|
||||
<tr><td><code><Space>z</code></td><td>Zoom shot</td></tr>
|
||||
<tr><th colspan="2"><a href="//fonts.adobe.com">fonts.adobe.com</a></th></tr><tr><td><strong>Mapping</strong></td><td><strong>Description</strong></td></tr>
|
||||
<tr><th colspan="2"><a href="//en.wiktionary.org"><img src="./assets/favicons/en.wiktionary.org.ico" width="16px"> en.wiktionary.org</a></th></tr><tr><td><strong>Mapping</strong></td><td><strong>Description</strong></td></tr>
|
||||
<tr><td><code><Space>s</code></td><td>Toggle simple version of current article</td></tr>
|
||||
<tr><td><code><Space>a</code></td><td>View page</td></tr>
|
||||
<tr><th colspan="2"><a href="//fonts.adobe.com"><img src="./assets/favicons/fonts.adobe.com.ico" width="16px"> fonts.adobe.com</a></th></tr><tr><td><strong>Mapping</strong></td><td><strong>Description</strong></td></tr>
|
||||
<tr><td><code><Space>a</code></td><td>Activate font</td></tr>
|
||||
<tr><td><code><Space>s</code></td><td>Favorite font</td></tr>
|
||||
<tr><th colspan="2"><a href="//github.com">github.com</a></th></tr><tr><td><strong>Mapping</strong></td><td><strong>Description</strong></td></tr>
|
||||
<tr><th colspan="2"><a href="//github.com"><img src="./assets/favicons/github.com.ico" width="16px"> github.com</a></th></tr><tr><td><strong>Mapping</strong></td><td><strong>Description</strong></td></tr>
|
||||
<tr><td><code><Space>a</code></td><td>View Repository</td></tr>
|
||||
<tr><td><code><Space>u</code></td><td>View User</td></tr>
|
||||
<tr><td><code><Space>f</code></td><td>View File</td></tr>
|
||||
|
@ -83,15 +86,12 @@ sites have been included which can help you perform some common actions:
|
|||
<tr><td><code><Space>Y</code></td><td>Copy Project Path (including domain)</td></tr>
|
||||
<tr><td><code><Space>l</code></td><td>Toggle repo language stats</td></tr>
|
||||
<tr><td><code><Space>D</code></td><td>View GoDoc for Project</td></tr>
|
||||
<tr><th colspan="2"><a href="//gitlab.com">gitlab.com</a></th></tr><tr><td><strong>Mapping</strong></td><td><strong>Description</strong></td></tr>
|
||||
<tr><th colspan="2"><a href="//gitlab.com"><img src="./assets/favicons/gitlab.com.ico" width="16px"> gitlab.com</a></th></tr><tr><td><strong>Mapping</strong></td><td><strong>Description</strong></td></tr>
|
||||
<tr><td><code><Space>s</code></td><td>Toggle Star</td></tr>
|
||||
<tr><td><code><Space>y</code></td><td>Copy Project Path</td></tr>
|
||||
<tr><td><code><Space>Y</code></td><td>Copy Project Path (including domain)</td></tr>
|
||||
<tr><td><code><Space>D</code></td><td>View GoDoc for Project</td></tr>
|
||||
<tr><th colspan="2"><a href="//google.com">google.com</a></th></tr><tr><td><strong>Mapping</strong></td><td><strong>Description</strong></td></tr>
|
||||
<tr><td><code><Space>a</code></td><td>Open search result</td></tr>
|
||||
<tr><td><code><Space>A</code></td><td>Open search result (new tab)</td></tr>
|
||||
<tr><th colspan="2"><a href="//news.ycombinator.com">news.ycombinator.com</a></th></tr><tr><td><strong>Mapping</strong></td><td><strong>Description</strong></td></tr>
|
||||
<tr><th colspan="2"><a href="//news.ycombinator.com"><img src="./assets/favicons/news.ycombinator.com.ico" width="16px"> news.ycombinator.com</a></th></tr><tr><td><strong>Mapping</strong></td><td><strong>Description</strong></td></tr>
|
||||
<tr><td><code><Space>x</code></td><td>Collapse comment</td></tr>
|
||||
<tr><td><code><Space>X</code></td><td>Collapse next comment</td></tr>
|
||||
<tr><td><code><Space>s</code></td><td>Upvote</td></tr>
|
||||
|
@ -103,11 +103,11 @@ sites have been included which can help you perform some common actions:
|
|||
<tr><td><code>gp</code></td><td>Go to parent</td></tr>
|
||||
<tr><td><code>]]</code></td><td>Next page</td></tr>
|
||||
<tr><td><code>[[</code></td><td>Prev page</td></tr>
|
||||
<tr><th colspan="2"><a href="//producthunt.com">producthunt.com</a></th></tr><tr><td><strong>Mapping</strong></td><td><strong>Description</strong></td></tr>
|
||||
<tr><th colspan="2"><a href="//producthunt.com"><img src="./assets/favicons/producthunt.com.ico" width="16px"> producthunt.com</a></th></tr><tr><td><strong>Mapping</strong></td><td><strong>Description</strong></td></tr>
|
||||
<tr><td><code><Space>a</code></td><td>View product (external)</td></tr>
|
||||
<tr><td><code><Space>v</code></td><td>View product</td></tr>
|
||||
<tr><td><code><Space>s</code></td><td>Upvote product</td></tr>
|
||||
<tr><th colspan="2"><a href="//reddit.com">reddit.com</a></th></tr><tr><td><strong>Mapping</strong></td><td><strong>Description</strong></td></tr>
|
||||
<tr><th colspan="2"><a href="//reddit.com"><img src="./assets/favicons/reddit.com.ico" width="16px"> reddit.com</a></th></tr><tr><td><strong>Mapping</strong></td><td><strong>Description</strong></td></tr>
|
||||
<tr><td><code><Space>x</code></td><td>Collapse comment</td></tr>
|
||||
<tr><td><code><Space>X</code></td><td>Collapse next comment</td></tr>
|
||||
<tr><td><code><Space>s</code></td><td>Upvote</td></tr>
|
||||
|
@ -117,7 +117,7 @@ sites have been included which can help you perform some common actions:
|
|||
<tr><td><code><Space>A</code></td><td>View post (link) (new tab)</td></tr>
|
||||
<tr><td><code><Space>c</code></td><td>View post (comments)</td></tr>
|
||||
<tr><td><code><Space>C</code></td><td>View post (comments) (new tab)</td></tr>
|
||||
<tr><th colspan="2"><a href="//twitter.com">twitter.com</a></th></tr><tr><td><strong>Mapping</strong></td><td><strong>Description</strong></td></tr>
|
||||
<tr><th colspan="2"><a href="//twitter.com"><img src="./assets/favicons/twitter.com.ico" width="16px"> twitter.com</a></th></tr><tr><td><strong>Mapping</strong></td><td><strong>Description</strong></td></tr>
|
||||
<tr><td><code><Space>f</code></td><td>Follow user</td></tr>
|
||||
<tr><td><code><Space>s</code></td><td>Like tweet</td></tr>
|
||||
<tr><td><code><Space>R</code></td><td>Retweet</td></tr>
|
||||
|
@ -126,17 +126,17 @@ sites have been included which can help you perform some common actions:
|
|||
<tr><td><code><Space>T</code></td><td>Tweet to</td></tr>
|
||||
<tr><td><code><Space>r</code></td><td>Load new tweets</td></tr>
|
||||
<tr><td><code><Space>g</code></td><td>Goto user</td></tr>
|
||||
<tr><th colspan="2"><a href="//vimeo.com">vimeo.com</a></th></tr><tr><td><strong>Mapping</strong></td><td><strong>Description</strong></td></tr>
|
||||
<tr><th colspan="2"><a href="//vimeo.com"><img src="./assets/favicons/vimeo.com.ico" width="16px"> vimeo.com</a></th></tr><tr><td><strong>Mapping</strong></td><td><strong>Description</strong></td></tr>
|
||||
<tr><td><code><Space>F</code></td><td>Toggle fullscreen</td></tr>
|
||||
<tr><th colspan="2"><a href="//wikipedia.org">wikipedia.org</a></th></tr><tr><td><strong>Mapping</strong></td><td><strong>Description</strong></td></tr>
|
||||
<tr><th colspan="2"><a href="//wikipedia.org"><img src="./assets/favicons/wikipedia.org.ico" width="16px"> wikipedia.org</a></th></tr><tr><td><strong>Mapping</strong></td><td><strong>Description</strong></td></tr>
|
||||
<tr><td><code><Space>s</code></td><td>Toggle simple version of current article</td></tr>
|
||||
<tr><td><code><Space>a</code></td><td>View page</td></tr>
|
||||
<tr><th colspan="2"><a href="//wiktionary.org">wiktionary.org</a></th></tr><tr><td><strong>Mapping</strong></td><td><strong>Description</strong></td></tr>
|
||||
<tr><td><code><Space>s</code></td><td>Toggle simple version of current article</td></tr>
|
||||
<tr><td><code><Space>a</code></td><td>View page</td></tr>
|
||||
<tr><th colspan="2"><a href="//yelp.com">yelp.com</a></th></tr><tr><td><strong>Mapping</strong></td><td><strong>Description</strong></td></tr>
|
||||
<tr><th colspan="2"><a href="//www.google.com"><img src="./assets/favicons/www.google.com.ico" width="16px"> www.google.com</a></th></tr><tr><td><strong>Mapping</strong></td><td><strong>Description</strong></td></tr>
|
||||
<tr><td><code><Space>a</code></td><td>Open search result</td></tr>
|
||||
<tr><td><code><Space>A</code></td><td>Open search result (new tab)</td></tr>
|
||||
<tr><th colspan="2"><a href="//yelp.com"><img src="./assets/favicons/yelp.com.ico" width="16px"> yelp.com</a></th></tr><tr><td><strong>Mapping</strong></td><td><strong>Description</strong></td></tr>
|
||||
<tr><td><code><Space>fs</code></td><td>Fakespot</td></tr>
|
||||
<tr><th colspan="2"><a href="//youtube.com">youtube.com</a></th></tr><tr><td><strong>Mapping</strong></td><td><strong>Description</strong></td></tr>
|
||||
<tr><th colspan="2"><a href="//youtube.com"><img src="./assets/favicons/youtube.com.ico" width="16px"> youtube.com</a></th></tr><tr><td><strong>Mapping</strong></td><td><strong>Description</strong></td></tr>
|
||||
<tr><td><code>A</code></td><td>Open video</td></tr>
|
||||
<tr><td><code>C</code></td><td>Open channel</td></tr>
|
||||
<tr><td><code>gH</code></td><td>Goto homepage</td></tr>
|
||||
|
@ -154,55 +154,344 @@ You can access a Search Engine auto-completion by pressing the search leader key
|
|||
|
||||
For example, to open the Wikipedia completion, you would type `awp` while in normal mode.
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<th colspan=2>Alias</th>
|
||||
<th>Name</th>
|
||||
<th>Domain</th>
|
||||
<th>Screenshots</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<td><a href="https://bbs.archlinux.org"><img src="./assets/favicons/bbs.archlinux.org.ico" width="16px"> </a></td>
|
||||
<td><code>af</code></td>
|
||||
<td>archforums</td>
|
||||
<td><a href="https://bbs.archlinux.org">bbs.archlinux.org</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://www.archlinux.org"><img src="./assets/favicons/www.archlinux.org.ico" width="16px"> </a></td>
|
||||
<td><code>al</code></td>
|
||||
<td>archlinux</td>
|
||||
<td><a href="https://www.archlinux.org">www.archlinux.org</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://alternativeto.net"><img src="./assets/favicons/alternativeto.net.ico" width="16px"> </a></td>
|
||||
<td><code>at</code></td>
|
||||
<td>alternativeTo</td>
|
||||
<td><a href="https://alternativeto.net">alternativeto.net</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://aur.archlinux.org"><img src="./assets/favicons/aur.archlinux.org.ico" width="16px"> </a></td>
|
||||
<td><code>au</code></td>
|
||||
<td>AUR</td>
|
||||
<td><a href="https://aur.archlinux.org">aur.archlinux.org</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://wiki.archlinux.org"><img src="./assets/favicons/wiki.archlinux.org.ico" width="16px"> </a></td>
|
||||
<td><code>aw</code></td>
|
||||
<td>archwiki</td>
|
||||
<td><a href="https://wiki.archlinux.org">wiki.archlinux.org</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://smile.amazon.com"><img src="./assets/favicons/smile.amazon.com.ico" width="16px"> </a></td>
|
||||
<td><code>az</code></td>
|
||||
<td>amazon</td>
|
||||
<td><a href="https://smile.amazon.com">smile.amazon.com</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://craigslist.org"><img src="./assets/favicons/craigslist.org.ico" width="16px"> </a></td>
|
||||
<td><code>cl</code></td>
|
||||
<td>craigslist</td>
|
||||
<td><a href="https://craigslist.org">craigslist.org</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://www.crunchbase.com"><img src="./assets/favicons/www.crunchbase.com.ico" width="16px"> </a></td>
|
||||
<td><code>co</code></td>
|
||||
<td>crunchbase-orgs</td>
|
||||
<td><a href="https://www.crunchbase.com">www.crunchbase.com</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://www.crunchbase.com"><img src="./assets/favicons/www.crunchbase.com.ico" width="16px"> </a></td>
|
||||
<td><code>cp</code></td>
|
||||
<td>crunchbase-people</td>
|
||||
<td><a href="https://www.crunchbase.com">www.crunchbase.com</a></td>
|
||||
<td><a href="#crunchbase-people">:framed_picture:</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://chrome.google.com"><img src="./assets/favicons/chrome.google.com.png" width="16px"> </a></td>
|
||||
<td><code>cs</code></td>
|
||||
<td>chromestore</td>
|
||||
<td><a href="https://chrome.google.com">chrome.google.com</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="http://onelook.com"><img src="./assets/favicons/onelook.com.ico" width="16px"> </a></td>
|
||||
<td><code>de</code></td>
|
||||
<td>define</td>
|
||||
<td><a href="http://onelook.com">onelook.com</a></td>
|
||||
<td><a href="#define">:framed_picture:</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://duckduckgo.com"><img src="./assets/favicons/duckduckgo.com.ico" width="16px"> </a></td>
|
||||
<td><code>dg</code></td>
|
||||
<td>duckduckgo</td>
|
||||
<td><a href="https://duckduckgo.com">duckduckgo.com</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://hub.docker.com"><img src="./assets/favicons/hub.docker.com.ico" width="16px"> </a></td>
|
||||
<td><code>dh</code></td>
|
||||
<td>dockerhub</td>
|
||||
<td><a href="https://hub.docker.com">hub.docker.com</a></td>
|
||||
<td><a href="#dockerhub">:framed_picture:</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://domainr.com"><img src="./assets/favicons/domainr.com.ico" width="16px"> </a></td>
|
||||
<td><code>do</code></td>
|
||||
<td>domainr</td>
|
||||
<td><a href="https://domainr.com">domainr.com</a></td>
|
||||
<td><a href="#domainr">:framed_picture:</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://www.ebay.com"><img src="./assets/favicons/www.ebay.com.ico" width="16px"> </a></td>
|
||||
<td><code>eb</code></td>
|
||||
<td>ebay</td>
|
||||
<td><a href="https://www.ebay.com">www.ebay.com</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://hex.pm"><img src="./assets/favicons/hex.pm.ico" width="16px"> </a></td>
|
||||
<td><code>ex</code></td>
|
||||
<td>exdocs</td>
|
||||
<td><a href="https://hex.pm">hex.pm</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://godoc.org"><img src="./assets/favicons/godoc.org.ico" width="16px"> </a></td>
|
||||
<td><code>gd</code></td>
|
||||
<td>godoc</td>
|
||||
<td><a href="https://godoc.org">godoc.org</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://golang.org"><img src="./assets/favicons/golang.org.ico" width="16px"> </a></td>
|
||||
<td><code>gg</code></td>
|
||||
<td>golang</td>
|
||||
<td><a href="https://golang.org">golang.org</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://github.com"><img src="./assets/favicons/github.com.ico" width="16px"> </a></td>
|
||||
<td><code>gh</code></td>
|
||||
<td>github</td>
|
||||
<td><a href="https://github.com">github.com</a></td>
|
||||
<td><a href="#github">:framed_picture:</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://www.google.com"><img src="./assets/favicons/www.google.com.ico" width="16px"> </a></td>
|
||||
<td><code>gi</code></td>
|
||||
<td>google-images</td>
|
||||
<td><a href="https://www.google.com">www.google.com</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://www.google.com"><img src="./assets/favicons/www.google.com.ico" width="16px"> </a></td>
|
||||
<td><code>gl</code></td>
|
||||
<td>google-lucky</td>
|
||||
<td><a href="https://www.google.com">www.google.com</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://www.google.com"><img src="./assets/favicons/www.google.com.ico" width="16px"> </a></td>
|
||||
<td><code>go</code></td>
|
||||
<td>google</td>
|
||||
<td><a href="https://www.google.com">www.google.com</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="http://go-search.org"><img src="./assets/favicons/go-search.org.png" width="16px"> </a></td>
|
||||
<td><code>gs</code></td>
|
||||
<td>go-search</td>
|
||||
<td><a href="http://go-search.org">go-search.org</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://gowalker.org"><img src="./assets/favicons/gowalker.org.png" width="16px"> </a></td>
|
||||
<td><code>gw</code></td>
|
||||
<td>gowalker</td>
|
||||
<td><a href="https://gowalker.org">gowalker.org</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://hackage.haskell.org"><img src="./assets/favicons/hackage.haskell.org.png" width="16px"> </a></td>
|
||||
<td><code>ha</code></td>
|
||||
<td>hackage</td>
|
||||
<td><a href="https://hackage.haskell.org">hackage.haskell.org</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://hex.pm"><img src="./assets/favicons/hex.pm.ico" width="16px"> </a></td>
|
||||
<td><code>hd</code></td>
|
||||
<td>hexdocs</td>
|
||||
<td><a href="https://hex.pm">hex.pm</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://news.ycombinator.com"><img src="./assets/favicons/news.ycombinator.com.ico" width="16px"> </a></td>
|
||||
<td><code>hn</code></td>
|
||||
<td>hackernews</td>
|
||||
<td><a href="https://news.ycombinator.com">news.ycombinator.com</a></td>
|
||||
<td><a href="#hackernews">:framed_picture:</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://www.haskell.org"><img src="./assets/favicons/www.haskell.org.ico" width="16px"> </a></td>
|
||||
<td><code>ho</code></td>
|
||||
<td>hoogle</td>
|
||||
<td><a href="https://www.haskell.org">www.haskell.org</a></td>
|
||||
<td><a href="#hoogle">:framed_picture:</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://wiki.haskell.org"><img src="./assets/favicons/wiki.haskell.org.ico" width="16px"> </a></td>
|
||||
<td><code>hw</code></td>
|
||||
<td>haskellwiki</td>
|
||||
<td><a href="https://wiki.haskell.org">wiki.haskell.org</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://hex.pm"><img src="./assets/favicons/hex.pm.ico" width="16px"> </a></td>
|
||||
<td><code>hx</code></td>
|
||||
<td>hex</td>
|
||||
<td><a href="https://hex.pm">hex.pm</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="http://hayoo.fh-wedel.de"><img src="./assets/favicons/hayoo.fh-wedel.de.ico" width="16px"> </a></td>
|
||||
<td><code>hy</code></td>
|
||||
<td>hayoo</td>
|
||||
<td><a href="http://hayoo.fh-wedel.de">hayoo.fh-wedel.de</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://jquery.com"><img src="./assets/favicons/jquery.com.ico" width="16px"> </a></td>
|
||||
<td><code>jq</code></td>
|
||||
<td>jquery</td>
|
||||
<td><a href="https://jquery.com">jquery.com</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://developer.mozilla.org"><img src="./assets/favicons/developer.mozilla.org.ico" width="16px"> </a></td>
|
||||
<td><code>md</code></td>
|
||||
<td>mdn</td>
|
||||
<td><a href="https://developer.mozilla.org">developer.mozilla.org</a></td>
|
||||
<td><a href="#mdn">:framed_picture:</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://nodejs.org"><img src="./assets/favicons/nodejs.org.ico" width="16px"> </a></td>
|
||||
<td><code>no</code></td>
|
||||
<td>node</td>
|
||||
<td><a href="https://nodejs.org">nodejs.org</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://www.npmjs.com"><img src="./assets/favicons/www.npmjs.com.png" width="16px"> </a></td>
|
||||
<td><code>np</code></td>
|
||||
<td>npm</td>
|
||||
<td><a href="https://www.npmjs.com">www.npmjs.com</a></td>
|
||||
<td><a href="#npm">:framed_picture:</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://www.owasp.org"><img src="./assets/favicons/www.owasp.org.ico" width="16px"> </a></td>
|
||||
<td><code>ow</code></td>
|
||||
<td>owasp</td>
|
||||
<td><a href="https://www.owasp.org">www.owasp.org</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://www.reddit.com"><img src="./assets/favicons/www.reddit.com.ico" width="16px"> </a></td>
|
||||
<td><code>re</code></td>
|
||||
<td>reddit</td>
|
||||
<td><a href="https://www.reddit.com">www.reddit.com</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://stackoverflow.com"><img src="./assets/favicons/stackoverflow.com.ico" width="16px"> </a></td>
|
||||
<td><code>so</code></td>
|
||||
<td>stackoverflow</td>
|
||||
<td><a href="https://stackoverflow.com">stackoverflow.com</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://www.onelook.com"><img src="./assets/favicons/www.onelook.com.ico" width="16px"> </a></td>
|
||||
<td><code>th</code></td>
|
||||
<td>thesaurus</td>
|
||||
<td><a href="https://www.onelook.com">www.onelook.com</a></td>
|
||||
<td><a href="#thesaurus">:framed_picture:</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://vim.wikia.com"><img src="./assets/favicons/vim.wikia.com.ico" width="16px"> </a></td>
|
||||
<td><code>vw</code></td>
|
||||
<td>vimwikia</td>
|
||||
<td><a href="https://vim.wikia.com">vim.wikia.com</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="http://www.wolframalpha.com"><img src="./assets/favicons/www.wolframalpha.com.ico" width="16px"> </a></td>
|
||||
<td><code>wa</code></td>
|
||||
<td>wolframalpha</td>
|
||||
<td><a href="http://www.wolframalpha.com">www.wolframalpha.com</a></td>
|
||||
<td><a href="#wolframalpha">:framed_picture:</a><a href="#wolframalpha-2">:framed_picture:</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://en.wikipedia.org"><img src="./assets/favicons/en.wikipedia.org.ico" width="16px"> </a></td>
|
||||
<td><code>wp</code></td>
|
||||
<td>wikipedia</td>
|
||||
<td><a href="https://en.wikipedia.org">en.wikipedia.org</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://simple.wikipedia.org"><img src="./assets/favicons/simple.wikipedia.org.ico" width="16px"> </a></td>
|
||||
<td><code>ws</code></td>
|
||||
<td>wikipedia-simple</td>
|
||||
<td><a href="https://simple.wikipedia.org">simple.wikipedia.org</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://en.wiktionary.org"><img src="./assets/favicons/en.wiktionary.org.ico" width="16px"> </a></td>
|
||||
<td><code>wt</code></td>
|
||||
<td>wiktionary</td>
|
||||
<td><a href="https://en.wiktionary.org">en.wiktionary.org</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://www.yelp.com"><img src="./assets/favicons/www.yelp.com.ico" width="16px"> </a></td>
|
||||
<td><code>yp</code></td>
|
||||
<td>yelp</td>
|
||||
<td><a href="https://www.yelp.com">www.yelp.com</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://www.youtube.com"><img src="./assets/favicons/www.youtube.com.ico" width="16px"> </a></td>
|
||||
<td><code>yt</code></td>
|
||||
<td>youtube</td>
|
||||
<td><a href="https://www.youtube.com">www.youtube.com</a></td>
|
||||
<td><a href="#youtube">:framed_picture:</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<!--
|
||||
| Alias | Name | Domain | Screenshots |
|
||||
| ----- | ---- | ------ | ----------- |
|
||||
| `af` | `archforums` | `Google Custom Search` | |
|
||||
| `al` | `archlinux` | `www.archlinux.org` | |
|
||||
| `at` | `alternativeTo` | `alternativeto.net` | |
|
||||
| `au` | `AUR` | `aur.archlinux.org` | |
|
||||
| `aw` | `archwiki` | `wiki.archlinux.org` | |
|
||||
| `az` | `amazon` | `smile.amazon.com` | |
|
||||
| `cl` | `craigslist` | `craigslist.org` | |
|
||||
| `co` | `crunchbase-orgs` | `www.crunchbase.com` | |
|
||||
| `cp` | `crunchbase-people` | `www.crunchbase.com` | [:framed_picture:](#crunchbase-people) |
|
||||
| `cs` | `chromestore` | `chrome.google.com` | |
|
||||
| `de` | `define` | `onelook.com` | [:framed_picture:](#define) |
|
||||
| `dg` | `duckduckgo` | `duckduckgo.com` | |
|
||||
| `dh` | `dockerhub` | `hub.docker.com` | [:framed_picture:](#dockerhub) |
|
||||
| `do` | `domainr` | `domainr.com` | [:framed_picture:](#domainr) |
|
||||
| `eb` | `ebay` | `www.ebay.com` | |
|
||||
| `ex` | `exdocs` | `hex.pm` | |
|
||||
| `gd` | `godoc` | `godoc.org` | |
|
||||
| `gg` | `golang` | `Google Custom Search` | |
|
||||
| `gh` | `github` | `github.com` | [:framed_picture:](#github) |
|
||||
| `gi` | `google-images` | `www.google.com` | |
|
||||
| `gl` | `google-lucky` | `www.google.com` | |
|
||||
| `go` | `google` | `www.google.com` | |
|
||||
| `gs` | `go-search` | `go-search.org` | |
|
||||
| `gw` | `gowalker` | `gowalker.org` | |
|
||||
| `ha` | `hackage` | `hackage.haskell.org` | |
|
||||
| `hd` | `hexdocs` | `hex.pm` | |
|
||||
| `hn` | `hackernews` | `hn.algolia.com` | [:framed_picture:](#hackernews) |
|
||||
| `ho` | `hoogle` | `www.haskell.org` | [:framed_picture:](#hoogle) |
|
||||
| `hw` | `haskellwiki` | `wiki.haskell.org` | |
|
||||
| `hx` | `hex` | `hex.pm` | |
|
||||
| `hy` | `hayoo` | `hayoo.fh-wedel.de` | |
|
||||
| `jq` | `jquery` | `Google Custom Search` | |
|
||||
| `md` | `mdn` | `developer.mozilla.org` | [:framed_picture:](#mdn) |
|
||||
| `no` | `node` | `Google Custom Search` | |
|
||||
| `np` | `npm` | `www.npmjs.com` | [:framed_picture:](#npm) |
|
||||
| `ow` | `owasp` | `www.owasp.org` | |
|
||||
| `re` | `reddit` | `www.reddit.com` | |
|
||||
| `so` | `stackoverflow` | `stackoverflow.com` | |
|
||||
| `th` | `thesaurus` | `www.onelook.com` | [:framed_picture:](#thesaurus) |
|
||||
| `vw` | `vimwikia` | `vim.wikia.com` | |
|
||||
| `wa` | `wolframalpha` | `www.wolframalpha.com` | [:framed_picture:](#wolframalpha) [:framed_picture:](#wolframalpha-2) |
|
||||
| `wp` | `wikipedia` | `en.wikipedia.org` | |
|
||||
| `ws` | `wikipedia-simple` | `simple.wikipedia.org` | |
|
||||
| `wt` | `wiktionary` | `en.wiktionary.org` | |
|
||||
| `yp` | `yelp` | `www.yelp.com` | |
|
||||
| `yt` | `youtube` | `www.youtube.com` | [:framed_picture:](#youtube) |
|
||||
|
||||
-->
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
|
|
@ -43,9 +43,22 @@ You can access a Search Engine auto-completion by pressing the search leader key
|
|||
|
||||
For example, to open the Wikipedia completion, you would type `awp` while in normal mode.
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<th colspan=2>Alias</th>
|
||||
<th>Name</th>
|
||||
<th>Domain</th>
|
||||
<th>Screenshots</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!--{{COMPL_TABLE}}-->
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<!--
|
||||
| Alias | Name | Domain | Screenshots |
|
||||
| ----- | ---- | ------ | ----------- |
|
||||
<!--{{COMPL_TABLE}}-->
|
||||
-->
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
|
After Width: | Height: | Size: 6.4 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 575 B |
After Width: | Height: | Size: 501 B |
After Width: | Height: | Size: 5.3 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 441 B |
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 70 B |
After Width: | Height: | Size: 32 KiB |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 5.3 KiB |
After Width: | Height: | Size: 6.4 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 70 B |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 5.6 KiB |
After Width: | Height: | Size: 8.2 KiB |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 7.4 KiB |
After Width: | Height: | Size: 5.3 KiB |
After Width: | Height: | Size: 318 B |
After Width: | Height: | Size: 4.1 KiB |
After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 5.3 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 5.3 KiB |
After Width: | Height: | Size: 501 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 575 B |
After Width: | Height: | Size: 8.2 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 5.3 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 228 B |
After Width: | Height: | Size: 318 B |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 8.2 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 8.2 KiB |
After Width: | Height: | Size: 1.1 KiB |
|
@ -43,6 +43,7 @@ completions.al = {
|
|||
completions.au = {
|
||||
alias: "au",
|
||||
name: "AUR",
|
||||
favicon: "https://aur.archlinux.org/images/favicon.ico",
|
||||
search: "https://aur.archlinux.org/packages/?O=0&SeB=nd&outdated=&SB=v&SO=d&PP=100&do_Search=Go&K=",
|
||||
compl: "https://aur.archlinux.org/rpc?type=suggest&arg=",
|
||||
}
|
||||
|
@ -66,6 +67,7 @@ completions.aw.callback = response => JSON.parse(response.text)[1]
|
|||
completions.af = {
|
||||
alias: "af",
|
||||
name: "archforums",
|
||||
domain: "bbs.archlinux.org",
|
||||
search: googleCxPublicURL("af"),
|
||||
compl: googleCxURL("af"),
|
||||
callback: googleCxCallback,
|
||||
|
@ -126,6 +128,7 @@ completions.at.callback = (response) => {
|
|||
completions.cs = {
|
||||
alias: "cs",
|
||||
name: "chromestore",
|
||||
favicon: "https://www.google.com/images/icons/product/chrome_web_store-32.png",
|
||||
search: "https://chrome.google.com/webstore/search/",
|
||||
compl: googleCxURL("cs"),
|
||||
callback: googleCxCallback,
|
||||
|
@ -750,6 +753,7 @@ completions.ex.callback = response => JSON.parse(response.text).items.map((s) =>
|
|||
completions.gg = {
|
||||
alias: "gg",
|
||||
name: "golang",
|
||||
domain: "golang.org",
|
||||
search: googleCxPublicURL("gg"),
|
||||
compl: googleCxURL("gg"),
|
||||
callback: googleCxCallback,
|
||||
|
@ -778,6 +782,7 @@ completions.gd.callback = response => JSON.parse(response.text).results.map((s)
|
|||
completions.gw = {
|
||||
alias: "gw",
|
||||
name: "gowalker",
|
||||
favicon: "https://gowalker.org/img/favicon.png",
|
||||
search: "https://gowalker.org/search?auto_redirect=true&q=",
|
||||
compl: "https://gowalker.org/search/json?q=",
|
||||
}
|
||||
|
@ -798,6 +803,7 @@ completions.gw.callback = response => JSON.parse(response.text).results.map((s)
|
|||
completions.gs = {
|
||||
alias: "gs",
|
||||
name: "go-search",
|
||||
favicon: "https://go-search.org/images/logo-16.png",
|
||||
search: "http://go-search.org/search?q=",
|
||||
compl: "http://go-search.org/api?action=search&q=",
|
||||
}
|
||||
|
@ -812,6 +818,7 @@ completions.gs.callback = response => JSON.parse(response.text).hits
|
|||
completions.ha = {
|
||||
alias: "ha",
|
||||
name: "hackage",
|
||||
favicon: "https://hackage.haskell.org/static/favicon.png",
|
||||
search: "https://hackage.haskell.org/packages/search?terms=",
|
||||
compl: "https://hackage.haskell.org/packages/search.json?terms=",
|
||||
}
|
||||
|
@ -823,6 +830,7 @@ completions.ha.callback = response => JSON.parse(response.text)
|
|||
completions.ho = {
|
||||
alias: "ho",
|
||||
name: "hoogle",
|
||||
favicon: "https://www.haskell.org/img/favicon.ico",
|
||||
search: `https://www.haskell.org/hoogle/?hoogle=${
|
||||
encodeURIComponent("+platform +xmonad +xmonad-contrib ")}`, // This tells Hoogle to include these modules in the search - encodeURIComponent is only used for better readability
|
||||
compl: `https://www.haskell.org/hoogle/?mode=json&hoogle=${
|
||||
|
@ -836,6 +844,7 @@ completions.ho.callback = response => JSON.parse(response.text).results
|
|||
completions.hw = {
|
||||
alias: "hw",
|
||||
name: "haskellwiki",
|
||||
favicon: "https://www.haskell.org/img/favicon.ico",
|
||||
search: "https://wiki.haskell.org/index.php?go=go&search=",
|
||||
compl: "https://wiki.haskell.org/api.php?action=opensearch&format=json&formatversion=2&namespace=0&limit=10&suggest=true&search=",
|
||||
}
|
||||
|
@ -846,6 +855,7 @@ completions.hw.callback = response => JSON.parse(response.text)[1]
|
|||
completions.hy = {
|
||||
alias: "hy",
|
||||
name: "hayoo",
|
||||
favicon: "https://www.haskell.org/img/favicon.ico",
|
||||
search: "http://hayoo.fh-wedel.de/?query=",
|
||||
compl: "http://hayoo.fh-wedel.de/json?query=",
|
||||
}
|
||||
|
@ -859,6 +869,7 @@ completions.hy.callback = response => JSON.parse(response.text).result
|
|||
completions.jq = {
|
||||
alias: "jq",
|
||||
name: "jquery",
|
||||
domain: "jquery.com",
|
||||
search: googleCxPublicURL("jq"),
|
||||
compl: googleCxURL("jq"),
|
||||
callback: googleCxCallback,
|
||||
|
@ -868,6 +879,7 @@ completions.jq = {
|
|||
completions.no = {
|
||||
alias: "no",
|
||||
name: "node",
|
||||
domain: "nodejs.org",
|
||||
search: googleCxPublicURL("no"),
|
||||
compl: googleCxURL("no"),
|
||||
callback: googleCxCallback,
|
||||
|
@ -907,6 +919,7 @@ completions.md.callback = (response) => {
|
|||
completions.np = {
|
||||
alias: "np",
|
||||
name: "npm",
|
||||
favicon: "https://static.npmjs.com/da3ab40fb0861d15c83854c29f5f2962.png",
|
||||
search: "https://www.npmjs.com/search?q=",
|
||||
compl: "https://api.npms.io/v2/search/suggestions?size=20&q=",
|
||||
}
|
||||
|
@ -954,6 +967,7 @@ completions.np.callback = response => JSON.parse(response.text)
|
|||
completions.hn = {
|
||||
alias: "hn",
|
||||
name: "hackernews",
|
||||
domain: "news.ycombinator.com",
|
||||
search: "https://hn.algolia.com/?query=",
|
||||
compl: "https://hn.algolia.com/api/v1/search?tags=(story,comment)&query=",
|
||||
}
|
||||
|
|
135
gulpfile.js
|
@ -4,10 +4,12 @@ const parcel = require("gulp-parcel")
|
|||
const replace = require("gulp-replace")
|
||||
const rename = require("gulp-rename")
|
||||
const eslint = require("gulp-eslint")
|
||||
const file = require("gulp-file")
|
||||
const path = require("path")
|
||||
const del = require("del")
|
||||
const os = require("os")
|
||||
const fs = require("fs")
|
||||
const fs = require("fs").promises
|
||||
const fetch = require("node-fetch")
|
||||
const { spawn } = require("child_process")
|
||||
const { URL } = require("url")
|
||||
|
||||
|
@ -21,7 +23,9 @@ const paths = {
|
|||
entry: "conf.js",
|
||||
gulpfile: ["gulpfile.js"],
|
||||
readme: ["README.tmpl.md"],
|
||||
assets: "assets",
|
||||
screenshots: "assets/screenshots",
|
||||
favicons: "assets/favicons",
|
||||
}
|
||||
|
||||
// This notice will be injected into the generated README.md file
|
||||
|
@ -44,7 +48,7 @@ gulp.task("gulp-autoreload", () => {
|
|||
spawnChildren()
|
||||
})
|
||||
|
||||
gulp.task("clean", () => del(["build", ".cache", ".tmp-gulp-compile-*"]))
|
||||
gulp.task("clean", () => del(["build", ".cache", ".tmp-gulp-compile-*", paths.favicons]))
|
||||
|
||||
gulp.task("lint", () => gulp
|
||||
.src([].concat(paths.scripts, paths.gulpfile))
|
||||
|
@ -66,45 +70,63 @@ gulp.task("lint-gulpfile", () => gulp
|
|||
// }
|
||||
// })
|
||||
|
||||
gulp.task("readme", () => {
|
||||
gulp.task("docs", parallel(async () => {
|
||||
const screens = {}
|
||||
let screenshotList = ""
|
||||
fs.readdirSync(path.join(__dirname, paths.screenshots)).forEach((s) => {
|
||||
const file = path.basename(s, ".png").split("-")
|
||||
const alias = file[0]
|
||||
|
||||
const screenshots = await fs.readdir(path.join(__dirname, paths.screenshots))
|
||||
screenshots.forEach((s) => {
|
||||
const name = path.basename(s, ".png").split("-")
|
||||
const alias = name[0]
|
||||
if (!screens[alias]) {
|
||||
screens[alias] = []
|
||||
}
|
||||
screens[alias].push(path.join(paths.screenshots, path.basename(s)))
|
||||
})
|
||||
|
||||
const complTable = Object.keys(compl).sort((a, b) => {
|
||||
let complTable = Object.keys(compl).sort((a, b) => {
|
||||
if (a < b) return -1
|
||||
if (a > b) return 1
|
||||
return 0
|
||||
}).reduce((a, k) => {
|
||||
const c = compl[k]
|
||||
const u = new URL(c.search)
|
||||
const domain = (u.hostname === "cse.google.com") ? "Google Custom Search" : u.hostname
|
||||
let s = ""
|
||||
if (screens[c.alias]) {
|
||||
screens[c.alias].forEach((url, i) => {
|
||||
const num = (i > 0) ? ` ${i + 1}` : ""
|
||||
s += `[:framed_picture:](#${c.name}${num.replace(" ", "-")}) `
|
||||
screenshotList += `##### ${c.name}${num}\n`
|
||||
screenshotList += `![${c.name} screenshot](./${url})\n\n`
|
||||
})
|
||||
}
|
||||
return `${a} | \`${c.alias}\` | \`${c.name}\` | \`${domain}\` | ${s} |\n`
|
||||
}, "")
|
||||
|
||||
const keysTable = Object.keys(keys.maps).sort((a, b) => {
|
||||
let keysTable = Object.keys(keys.maps).sort((a, b) => {
|
||||
if (a === "global") return -1
|
||||
if (b === "global") return 1
|
||||
if (a < b) return -1
|
||||
if (a > b) return 1
|
||||
return 0
|
||||
}).reduce((acc1, domain) => {
|
||||
})
|
||||
|
||||
complTable = await complTable.reduce(async (acc1p, k) => {
|
||||
const acc1 = await acc1p
|
||||
const c = compl[k]
|
||||
const u = new URL(c.domain ? `https://${c.domain}` : c.search)
|
||||
// const domain = (u.hostname === "cse.google.com") ? "Google Custom Search" : u.hostname
|
||||
const domain = u.hostname
|
||||
let s = ""
|
||||
if (screens[c.alias]) {
|
||||
screens[c.alias].forEach((url, i) => {
|
||||
const num = (i > 0) ? ` ${i + 1}` : ""
|
||||
s += `<a href="#${c.name}${num.replace(" ", "-")}">:framed_picture:</a>`
|
||||
screenshotList += `##### ${c.name}${num}\n`
|
||||
screenshotList += `![${c.name} screenshot](./${url})\n\n`
|
||||
})
|
||||
}
|
||||
const faviconExt = c.favicon ? path.extname(new URL(c.favicon).pathname) : ".ico"
|
||||
const favicon = `<img src="./assets/favicons/${u.hostname}${faviconExt}" width="16px"> `
|
||||
return `${acc1}
|
||||
<tr>
|
||||
<td><a href="${u.protocol}//${domain}">${favicon}</a></td>
|
||||
<td><code>${c.alias}</code></td>
|
||||
<td>${c.name}</td>
|
||||
<td><a href="${u.protocol}//${domain}">${domain}</a></td>
|
||||
<td>${s}</td>
|
||||
</tr>`
|
||||
}, Promise.resolve(""))
|
||||
|
||||
keysTable = await keysTable.reduce(async (acc1p, domain) => {
|
||||
const acc1 = await acc1p
|
||||
const header = "<tr><td><strong>Mapping</strong></td><td><strong>Description</strong></td></tr>"
|
||||
const c = keys.maps[domain]
|
||||
const maps = c.reduce((acc2, map) => {
|
||||
|
@ -119,9 +141,13 @@ gulp.task("readme", () => {
|
|||
const mapStr = util.escape(`${leader}${map.alias}`.replace(" ", "<space>"))
|
||||
return `${acc2}<tr><td><code>${mapStr}</code></td><td>${map.description}</td></tr>\n`
|
||||
}, "")
|
||||
const domainStr = domain === "global" ? "<strong>global</strong>" : `<a href="//${domain}">${domain}</a>`
|
||||
let domainStr = "<strong>global</strong>"
|
||||
const favicon = `<img src="./assets/favicons/${domain}.ico" width="16px"> `
|
||||
if (domain !== "global") {
|
||||
domainStr = `<a href="//${domain}">${favicon}${domain}</a>`
|
||||
}
|
||||
return `${acc1}<tr><th colspan="2">${domainStr}</th></tr>${header}\n${maps}`
|
||||
}, "")
|
||||
}, Promise.resolve(""))
|
||||
|
||||
return gulp.src(["./README.tmpl.md"])
|
||||
.pipe(replace("<!--{{DISCLAIMER}}-->", disclaimer))
|
||||
|
@ -133,11 +159,63 @@ gulp.task("readme", () => {
|
|||
.pipe(replace("<!--{{SCREENSHOTS}}-->", screenshotList))
|
||||
.pipe(rename("README.md"))
|
||||
.pipe(gulp.dest("."))
|
||||
}))
|
||||
|
||||
const getFavicon = async ({ domain, favicon }, timeout = 5000) => {
|
||||
// const url = `https://${domain}/favicon.ico`
|
||||
const url = favicon
|
||||
// const ico = await fetch(
|
||||
let data
|
||||
const ext = path.extname(new URL(favicon).pathname)
|
||||
try {
|
||||
const res = await fetch(url, { timeout })
|
||||
if (!res.ok) {
|
||||
throw new Error(`request to ${url} failed with code ${res.status}`)
|
||||
}
|
||||
data = await res.buffer()
|
||||
} catch (e) {
|
||||
// transparent pixel
|
||||
data = Buffer.from(
|
||||
"AAABAAEAAQEAAAEAIAAwAAAAFgAAACgAAAABAAAAAgAAAAEAIAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAA==",
|
||||
"base64"
|
||||
)
|
||||
}
|
||||
return {
|
||||
name: `${domain}${ext}`,
|
||||
source: data,
|
||||
}
|
||||
}
|
||||
|
||||
gulp.task("favicons", async () => {
|
||||
const sites = [].concat(
|
||||
// search engine completions
|
||||
Object.entries(compl)
|
||||
.map(([, v]) => ({
|
||||
domain: new URL(v.domain ? `https://${v.domain}` : v.search).hostname,
|
||||
favicon: v.favicon ? v.favicon : `${new URL(v.domain ? `https://${v.domain}` : v.search).origin}/favicon.ico`,
|
||||
})),
|
||||
|
||||
// site-specific keybindings
|
||||
Object.keys(keys.maps)
|
||||
.filter(k => k !== "global")
|
||||
.map(k => ({
|
||||
domain: k,
|
||||
favicon: `${new URL(`https://${k}`).origin}/favicon.ico`,
|
||||
})),
|
||||
)
|
||||
.filter((e, i, arr) => i === arr.indexOf(e)) // Keep only first occurrence of each element
|
||||
|
||||
const favicons = (await Promise.all(sites.map(async site => getFavicon(site))))
|
||||
.filter(e => e !== undefined)
|
||||
return file(favicons, { src: true })
|
||||
.pipe(gulp.dest(paths.favicons))
|
||||
})
|
||||
|
||||
gulp.task("docs-full", parallel("docs", "favicons"))
|
||||
|
||||
gulp.task("build",
|
||||
series(
|
||||
parallel(/* "check-priv", */"clean", "lint", "lint-gulpfile", "readme"),
|
||||
parallel(/* "check-priv", */"clean", "lint", "lint-gulpfile", "docs-full"),
|
||||
() => gulp
|
||||
.src(paths.entry, { read: false })
|
||||
.pipe(parcel())
|
||||
|
@ -151,12 +229,11 @@ gulp.task("install",
|
|||
|
||||
gulp.task("watch", () => {
|
||||
gulp.watch([].concat(paths.scripts, paths.gulpfile), parallel("install"))
|
||||
// gulp.watch(paths.readme, parallel("readme"))
|
||||
})
|
||||
|
||||
gulp.task("watch-nogulpfile", async () => parallel(
|
||||
gulp.watch([].concat(paths.scripts), parallel("readme", "install")),
|
||||
gulp.watch(paths.readme, parallel("readme"))
|
||||
gulp.watch([].concat(paths.scripts), parallel("docs", "install")),
|
||||
gulp.watch(paths.readme, parallel("docs"))
|
||||
))
|
||||
|
||||
gulp.task("default", parallel("build"))
|
||||
|
|
4
keys.js
|
@ -121,7 +121,7 @@ const maps = {
|
|||
},
|
||||
],
|
||||
|
||||
"google.com": [
|
||||
"www.google.com": [
|
||||
{
|
||||
alias: "a",
|
||||
description: "Open search result",
|
||||
|
@ -525,6 +525,6 @@ const maps = {
|
|||
}
|
||||
|
||||
// Aliases
|
||||
maps["wiktionary.org"] = maps["wikipedia.org"]
|
||||
maps["en.wiktionary.org"] = maps["wikipedia.org"]
|
||||
|
||||
module.exports = { unmaps, maps }
|
||||
|
|
|
@ -33,9 +33,11 @@
|
|||
"eslint-plugin-react": "^7.12.4",
|
||||
"gulp": "^4.0.0",
|
||||
"gulp-eslint": "^5.0.0",
|
||||
"gulp-file": "^0.4.0",
|
||||
"gulp-parcel": "b0o/gulp-parcel#fix-g_options-undefined",
|
||||
"gulp-rename": "^1.2.2",
|
||||
"gulp-replace": "^1.0.0"
|
||||
"gulp-replace": "^1.0.0",
|
||||
"node-fetch": "^2.3.0"
|
||||
},
|
||||
"config": {
|
||||
"commitizen": {
|
||||
|
|
50
yarn.lock
|
@ -2867,6 +2867,14 @@ gulp-eslint@^5.0.0:
|
|||
fancy-log "^1.3.2"
|
||||
plugin-error "^1.0.1"
|
||||
|
||||
gulp-file@^0.4.0:
|
||||
version "0.4.0"
|
||||
resolved "https://registry.yarnpkg.com/gulp-file/-/gulp-file-0.4.0.tgz#451356a2ac5089c6db91a0444252a0543657006b"
|
||||
integrity sha1-RRNWoqxQicbbkaBEQlKgVDZXAGs=
|
||||
dependencies:
|
||||
through2 "^0.4.1"
|
||||
vinyl "^2.1.0"
|
||||
|
||||
gulp-parcel@b0o/gulp-parcel#fix-g_options-undefined:
|
||||
version "0.3.5"
|
||||
resolved "https://codeload.github.com/b0o/gulp-parcel/tar.gz/7d07cf17a0537cd617b6398a32f0f94e61b0a557"
|
||||
|
@ -3944,6 +3952,11 @@ nice-try@^1.0.4:
|
|||
version "1.0.4"
|
||||
resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.4.tgz#d93962f6c52f2c1558c0fbda6d512819f1efe1c4"
|
||||
|
||||
node-fetch@^2.3.0:
|
||||
version "2.3.0"
|
||||
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.3.0.tgz#1a1d940bbfb916a1d3e0219f037e89e71f8c5fa5"
|
||||
integrity sha512-MOd8pV3fxENbryESLgVIeaGKrdl+uaYhCSSVkjeOb/31/njTpcis5aWfdqgNlHIrKOLRbMnfPINPOML2CIFeXA==
|
||||
|
||||
node-forge@^0.7.1:
|
||||
version "0.7.5"
|
||||
resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.7.5.tgz#6c152c345ce11c52f465c2abd957e8639cd674df"
|
||||
|
@ -4108,6 +4121,11 @@ object-keys@^1.0.11, object-keys@^1.0.12, object-keys@^1.0.6, object-keys@^1.0.8
|
|||
version "1.0.12"
|
||||
resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.12.tgz#09c53855377575310cca62f55bb334abff7b3ed2"
|
||||
|
||||
object-keys@~0.4.0:
|
||||
version "0.4.0"
|
||||
resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-0.4.0.tgz#28a6aae7428dd2c3a92f3d95f21335dd204e0336"
|
||||
integrity sha1-KKaq50KN0sOpLz2V8hM13SBOAzY=
|
||||
|
||||
object-visit@^1.0.0:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb"
|
||||
|
@ -5225,6 +5243,16 @@ readable-stream@^3.1.1:
|
|||
string_decoder "^1.1.1"
|
||||
util-deprecate "^1.0.1"
|
||||
|
||||
readable-stream@~1.0.17:
|
||||
version "1.0.34"
|
||||
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c"
|
||||
integrity sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=
|
||||
dependencies:
|
||||
core-util-is "~1.0.0"
|
||||
inherits "~2.0.1"
|
||||
isarray "0.0.1"
|
||||
string_decoder "~0.10.x"
|
||||
|
||||
readdirp@^2.0.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.1.0.tgz#4ed0ad060df3073300c48440373f72d1cc642d78"
|
||||
|
@ -5859,6 +5887,11 @@ string_decoder@^1.1.1:
|
|||
dependencies:
|
||||
safe-buffer "~5.1.0"
|
||||
|
||||
string_decoder@~0.10.x:
|
||||
version "0.10.31"
|
||||
resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94"
|
||||
integrity sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=
|
||||
|
||||
strip-ansi@^3.0.0, strip-ansi@^3.0.1:
|
||||
version "3.0.1"
|
||||
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf"
|
||||
|
@ -6019,6 +6052,14 @@ through2-filter@^3.0.0:
|
|||
through2 "~2.0.0"
|
||||
xtend "~4.0.0"
|
||||
|
||||
through2@^0.4.1:
|
||||
version "0.4.2"
|
||||
resolved "https://registry.yarnpkg.com/through2/-/through2-0.4.2.tgz#dbf5866031151ec8352bb6c4db64a2292a840b9b"
|
||||
integrity sha1-2/WGYDEVHsg1K7bE22SiKSqEC5s=
|
||||
dependencies:
|
||||
readable-stream "~1.0.17"
|
||||
xtend "~2.1.1"
|
||||
|
||||
through2@^2.0.0, through2@^2.0.3, through2@~2.0.3:
|
||||
version "2.0.3"
|
||||
resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be"
|
||||
|
@ -6322,7 +6363,7 @@ vinyl-sourcemap@^1.1.0:
|
|||
remove-bom-buffer "^3.0.0"
|
||||
vinyl "^2.0.0"
|
||||
|
||||
vinyl@^2.0.0:
|
||||
vinyl@^2.0.0, vinyl@^2.1.0:
|
||||
version "2.2.0"
|
||||
resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-2.2.0.tgz#d85b07da96e458d25b2ffe19fece9f2caa13ed86"
|
||||
integrity sha512-MBH+yP0kC/GQ5GwBqrTPTzEfiiLjta7hTtvQtbxBgTeSXsmKQRQecjibMbxIXzVT3Y9KJK+drOz1/k+vsu8Nkg==
|
||||
|
@ -6414,6 +6455,13 @@ xtend@^4.0.0, xtend@~4.0.0, xtend@~4.0.1:
|
|||
version "4.0.1"
|
||||
resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af"
|
||||
|
||||
xtend@~2.1.1:
|
||||
version "2.1.2"
|
||||
resolved "https://registry.yarnpkg.com/xtend/-/xtend-2.1.2.tgz#6efecc2a4dad8e6962c4901b337ce7ba87b5d28b"
|
||||
integrity sha1-bv7MKk2tjmlixJAbM3znuoe10os=
|
||||
dependencies:
|
||||
object-keys "~0.4.0"
|
||||
|
||||
y18n@^3.2.1:
|
||||
version "3.2.1"
|
||||
resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41"
|
||||
|
|