利用 高级搜索,在Github上找适合自己的开源项目 阳光穿透心脏的1/2处 2023-01-07 08:52 66阅读 0赞 ### 实践: ### 例一:in:name mysql stars:>300 例二:in:name python fork:>300 pushed:>2019-02-02 -------------------- ### [按 README 文件的存储库名称、说明或内容搜索][README] ### 使用限定符,您可以将搜索限制为存储库名称、存储库描述、README 文件的内容或这些文件的任意组合。省略此限定符时,将仅搜索存储库名称和说明。**`in`** <table style="width:669.867px;"> <thead> <tr> <th style="text-align:left;vertical-align:top;">限定 符</th> <th style="text-align:left;vertical-align:top;">例子</th> </tr> </thead> <tbody> <tr> <td style="vertical-align:top;"><code>in:name</code></td> <td style="vertical-align:top;"><a href="https://github.com/search?q=jquery+in%3Aname&type=Repositories" rel="nofollow"><strong>jquery 中:name</strong></a>将存储库与存储库名称中的"jquery"匹配。</td> </tr> <tr> <td style="vertical-align:top;"><code>in:description</code></td> <td style="vertical-align:top;"><a href="https://github.com/search?q=jquery+in%3Aname%2Cdescription&type=Repositories" rel="nofollow"><strong>jquery 在:名称,描述</strong></a>匹配存储库与"jquery"在存储库名称或描述。</td> </tr> <tr> <td style="vertical-align:top;"><code>in:readme</code></td> <td style="vertical-align:top;"><a href="https://github.com/search?q=jquery+in%3Areadme&type=Repositories" rel="nofollow"><strong>jquery in:readme</strong></a>匹配存储库中提及"jquery"的存储库。</td> </tr> <tr> <td style="vertical-align:top;"><code>repo:owner/name</code></td> <td style="vertical-align:top;"><a href="https://github.com/search?q=repo%3Aoctocat%2Fhello-world" rel="nofollow"><strong>存储库:octocat/hello 世界</strong></a>匹配特定的存储库名称。</td> </tr> </tbody> </table> ### [基于存储库内容进行搜索][Link 1] ### 通过使用限定符在存储库的 README 文件中搜索内容,可以查找存储库[。][Link 2]`in:readme` 除了使用 之外,还无法通过搜索存储库中的特定内容来查找存储库。若要在存储库中搜索特定文件或内容,可以使用文件查找器或特定于代码的搜索限定符。`in:readme` <table style="width:669.867px;"> <thead> <tr> <th style="text-align:left;vertical-align:top;">限定 符</th> <th style="text-align:left;vertical-align:top;">例子</th> </tr> </thead> <tbody> <tr> <td style="vertical-align:top;"><code>in:readme</code></td> <td style="vertical-align:top;"><a href="https://github.com/search?q=octocat+in%3Areadme&type=Repositories" rel="nofollow"><strong>八进制在:readme</strong></a>匹配存储库中提及"八进制"的存储库。</td> </tr> </tbody> </table> ### [在用户或组织的存储库中搜索][Link 3] ### 若要搜索特定用户或组织拥有的所有存储库,可以使用 或 限定符。`user ``org` <table style="width:669.867px;"> <thead> <tr> <th style="text-align:left;vertical-align:top;">限定 符</th> <th style="text-align:left;vertical-align:top;">例子</th> </tr> </thead> <tbody> <tr> <td style="vertical-align:top;"><code>user:<em>USERNAME</em></code></td> <td style="vertical-align:top;"><a href="https://github.com/search?q=user%3Adefunkt+forks%3A%3E%3D100&type=Repositories" rel="nofollow"><strong>用户:defunkt 分叉:>100</strong></a>与具有 @defunkt 100 个分叉的存储库匹配。</td> </tr> <tr> <td style="vertical-align:top;"><code>org:<em>ORGNAME</em></code></td> <td style="vertical-align:top;"><a href="https://github.com/search?utf8=%E2%9C%93&q=org%3Agithub&type=Repositories" rel="nofollow"><strong>组织:github</strong></a>匹配来自 GitHub 的存储库。</td> </tr> </tbody> </table> ### [按存储库大小搜索][Link 4] ### 限定符查找与特定大小(以千字节为单位)匹配的存储库,使用大于、小于 和 范围限定符。有关详细信息,请参阅"[了解搜索语法"。][Link 5]`size` <table style="width:669.867px;"> <thead> <tr> <th style="text-align:left;vertical-align:top;">限定 符</th> <th style="text-align:left;vertical-align:top;">例子</th> </tr> </thead> <tbody> <tr> <td style="vertical-align:top;"><code>size:<em>n</em></code></td> <td style="vertical-align:top;"><a href="https://github.com/search?q=size%3A1000&type=Repositories" rel="nofollow"><strong>大小:1000</strong></a>与正好为 1 MB 的存储库匹配。</td> </tr> <tr> <td style="vertical-align:top;"> </td> <td style="vertical-align:top;"><a href="https://github.com/search?q=size%3A%3E%3D30000&type=Repositories" rel="nofollow"><strong>大小:>=30000</strong></a>匹配至少 30 MB 的存储库。</td> </tr> <tr> <td style="vertical-align:top;"> </td> <td style="vertical-align:top;"><a href="https://github.com/search?q=size%3A%3C50&type=Repositories" rel="nofollow"><strong>大小:<50</strong></a>匹配小于 50 KB 的存储库。</td> </tr> <tr> <td style="vertical-align:top;"> </td> <td style="vertical-align:top;"><a href="https://github.com/search?q=size%3A50..120&type=Repositories" rel="nofollow"><strong>大小:50..120</strong></a>与 50 KB 和 120 KB 之间的存储库匹配。</td> </tr> </tbody> </table> ### [按关注者数量搜索][Link 6] ### 您可以使用大于、小于 和 范围限定符的限定符,根据关注存储库的用户数筛选存储库。有关详细信息,请参阅"[了解搜索语法"。][Link 5]`followers` <table style="width:669.867px;"> <thead> <tr> <th style="text-align:left;vertical-align:top;">限定 符</th> <th style="text-align:left;vertical-align:top;">例子</th> </tr> </thead> <tbody> <tr> <td style="vertical-align:top;"><code>followers:<em>n</em></code></td> <td style="vertical-align:top;"><a href="https://github.com/search?q=node+followers%3A%3E%3D10000" rel="nofollow"><strong>节点关注者:>=10000</strong></a>与 10,000 个或更多关注者提及"节点"一词的存储库匹配。</td> </tr> <tr> <td style="vertical-align:top;"> </td> <td style="vertical-align:top;"><a href="https://github.com/search?q=styleguide+linter+followers%3A1..10&type=Repositories" rel="nofollow"><strong>样式指南 linter 关注者:1..10</strong></a>匹配存储库与 1 到 10 个关注者之间, 提到单词 "样式指南 linter" 。</td> </tr> </tbody> </table> ### [按叉子数量搜索][Link 7] ### 限定符指定存储库应具有的分叉数,使用大于、小于 和 范围限定符。有关详细信息,请参阅"[了解搜索语法"。][Link 5]`forks` <table style="width:669.867px;"> <thead> <tr> <th style="text-align:left;vertical-align:top;">限定 符</th> <th style="text-align:left;vertical-align:top;">例子</th> </tr> </thead> <tbody> <tr> <td style="vertical-align:top;"><code>forks:<em>n</em></code></td> <td style="vertical-align:top;"><a href="https://github.com/search?q=forks%3A5&type=Repositories" rel="nofollow"><strong>分叉:5</strong></a>匹配只有五个分叉的存储库。</td> </tr> <tr> <td style="vertical-align:top;"> </td> <td style="vertical-align:top;"><a href="https://github.com/search?q=forks%3A%3E%3D205&type=Repositories" rel="nofollow"><strong>分叉:>=205</strong></a>将存储库与至少 205 个分叉匹配。</td> </tr> <tr> <td style="vertical-align:top;"> </td> <td style="vertical-align:top;"><a href="https://github.com/search?q=forks%3A%3C90&type=Repositories" rel="nofollow"><strong>分叉:<90</strong></a>匹配少于 90 个分叉的存储库。</td> </tr> <tr> <td style="vertical-align:top;"> </td> <td style="vertical-align:top;"><a href="https://github.com/search?q=forks%3A10..20&type=Repositories" rel="nofollow"><strong>分叉:10.20</strong></a>将存储库与 10 到 20 个分叉匹配。</td> </tr> </tbody> </table> ### [按星数搜索][Link 8] ### 您可以使用大于、小于 和 范围限定符的星数来搜索存储库。有关详细信息,请参阅"使用[星保存存储库"][Link 9]和"[了解搜索语法"。][Link 5] <table style="width:669.867px;"> <thead> <tr> <th style="text-align:left;vertical-align:top;">限定 符</th> <th style="text-align:left;vertical-align:top;">例子</th> </tr> </thead> <tbody> <tr> <td style="vertical-align:top;"><code>stars:<em>n</em></code></td> <td style="vertical-align:top;"><a href="https://github.com/search?utf8=%E2%9C%93&q=stars%3A500&type=Repositories" rel="nofollow"><strong>星:500</strong></a>匹配存储库与正好 500 星。</td> </tr> <tr> <td style="vertical-align:top;"> </td> <td style="vertical-align:top;"><a href="https://github.com/search?q=stars%3A10..20+size%3A%3C1000&type=Repositories" rel="nofollow"><strong>星号:10.20</strong></a>匹配 10 到 20 颗小于 1000 KB 的存储库。</td> </tr> <tr> <td style="vertical-align:top;"> </td> <td style="vertical-align:top;"><a href="https://github.com/search?q=stars%3A%3E%3D500+fork%3Atrue+language%3Aphp&type=Repositories" rel="nofollow"><strong>星号:>=500 分叉:true 语言:php</strong></a>将存储库与至少 500 颗星(包括分叉星)匹配,这些星元星是用 PHP 编写的。</td> </tr> </tbody> </table> ### [搜索存储库创建时间或上次更新时间][Link 10] ### 您可以根据创建时间或上次更新的时间筛选存储库。对于存储库创建,可以使用限定符;要了解存储库上次更新的时间,您需要使用限定符。限定符将返回存储库列表,该列表按存储库中任何分支上的最新提交排序。`created``pushed``pushed` 两者都将日期作为参数。日期格式必须遵循[ISO8601][]标准,即(年月日)。您还可以在日期之后添加可选的时间信息,按小时、分钟和秒进行搜索。这是 ,后跟 (小时-分钟秒)和 UTC 偏移 ()。`YYYY-MM-DD``THH:MM:SS+00:00``T``HH:MM:SS``+00:00` 搜索日期时,可以使用大于、小于 和 范围限定符来进一步筛选结果。有关详细信息,请参阅"[了解搜索语法"。][Link 5] <table style="width:669.867px;"> <thead> <tr> <th style="text-align:left;vertical-align:top;">限定 符</th> <th style="text-align:left;vertical-align:top;">例子</th> </tr> </thead> <tbody> <tr> <td style="vertical-align:top;"><code>created:<em>YYYY-MM-DD</em></code></td> <td style="vertical-align:top;"><a href="https://github.com/search?q=webos+created%3A%3C2011-01-01&type=Repositories" rel="nofollow"><strong>webos 创建:<2011-01-01</strong></a>将存储库与 2011 之前创建的"webos"一词进行匹配。</td> </tr> <tr> <td style="vertical-align:top;"><code>pushed:<em>YYYY-MM-DD</em></code></td> <td style="vertical-align:top;"><a href="https://github.com/search?utf8=%E2%9C%93&q=css+pushed%3A%3E2013-02-01&type=Repositories" rel="nofollow"><strong>css 推送:>2013-02-01</strong></a>将存储库与 2013 年 1 月之后推送到的单词"css"匹配。</td> </tr> <tr> <td style="vertical-align:top;"> </td> <td style="vertical-align:top;"><a href="https://github.com/search?q=case+pushed%3A%3E%3D2013-03-06+fork%3Aonly&type=Repositories" rel="nofollow"><strong>推送案例:>=2013-03-06 分叉:</strong></a>仅将存储库与 2013 年 3 月 6 日或之后推送到的单词"case"匹配,并且是分叉。</td> </tr> </tbody> </table> ### [按语言搜索][Link 11] ### 您可以根据存储库中代码的语言搜索存储库。 <table style="width:669.867px;"> <thead> <tr> <th style="text-align:left;vertical-align:top;">限定 符</th> <th style="text-align:left;vertical-align:top;">例子</th> </tr> </thead> <tbody> <tr> <td style="vertical-align:top;"><code>language:<em>LANGUAGE</em></code></td> <td style="vertical-align:top;"><a href="https://github.com/search?q=rails+language%3Ajavascript&type=Repositories" rel="nofollow"><strong>导轨语言:javascript</strong></a>将存储库与用 JavaScript 编写的单词"轨"匹配。</td> </tr> </tbody> </table> ### [按主题搜索][Link 12] ### 您可以找到与特定主题分类的所有存储库。有关详细信息,请参阅"[使用主题对存储库进行分类"。][Link 13] <table style="width:669.867px;"> <thead> <tr> <th style="text-align:left;vertical-align:top;">限定 符</th> <th style="text-align:left;vertical-align:top;">例子</th> </tr> </thead> <tbody> <tr> <td style="vertical-align:top;"><code>topic:<em>TOPIC</em></code></td> <td style="vertical-align:top;"><a href="https://github.com/search?utf8=%E2%9C%93&q=topic%3Ajekyll&type=Repositories&ref=searchresults" rel="nofollow"><strong>主题:jekyll</strong></a>匹配已分类的存储库与主题"jekyll"匹配。</td> </tr> </tbody> </table> ### [按主题数搜索][Link 14] ### 您可以按已应用于存储库的主题数搜索存储库,使用限定符以及大于、小于 和 范围限定符。有关详细信息,请参阅"[使用主题对存储库进行分类"][Link 13]和"[了解搜索语法"。][Link 5]`topics` <table style="width:669.867px;"> <thead> <tr> <th style="text-align:left;vertical-align:top;">限定 符</th> <th style="text-align:left;vertical-align:top;">例子</th> </tr> </thead> <tbody> <tr> <td style="vertical-align:top;"><code>topics:<em>n</em></code></td> <td style="vertical-align:top;"><a href="https://github.com/search?utf8=%E2%9C%93&q=topics%3A5&type=Repositories&ref=searchresults" rel="nofollow"><strong>主题:5</strong></a>匹配具有五个主题的存储库。</td> </tr> <tr> <td style="vertical-align:top;"> </td> <td style="vertical-align:top;"><a href="https://github.com/search?utf8=%E2%9C%93&q=topics%3A%3E3&type=Repositories&ref=searchresults" rel="nofollow"><strong>主题:>3</strong></a>匹配具有三个多个主题的存储库。</td> </tr> </tbody> </table> ### [按许可证搜索][Link 15] ### 您可以按存储库中的许可证类型搜索存储库。您必须使用许可证关键字按特定许可证或许可证系列筛选存储库。有关详细信息,请参阅"[许可存储库"。][Link 16] <table style="width:669.867px;"> <thead> <tr> <th style="text-align:left;vertical-align:top;">限定 符</th> <th style="text-align:left;vertical-align:top;">例子</th> </tr> </thead> <tbody> <tr> <td style="vertical-align:top;"><code>license:<em>LICENSE_KEYWORD</em></code></td> <td style="vertical-align:top;"><a href="https://github.com/search?utf8=%E2%9C%93&q=license%3Aapache-2.0&type=Repositories&ref=searchresults" rel="nofollow"><strong>许可证:apache-2.0</strong></a>与根据 Apache 许可证 2.0 许可的存储库匹配。</td> </tr> </tbody> </table> ### [按存储库可见性搜索][Link 17] ### 您可以根据存储库的可见性筛选搜索。有关详细信息,请参阅"关于[存储库可见性"。][Link 18] <table style="width:669.867px;"> <thead> <tr> <th style="text-align:left;vertical-align:top;">限定 符</th> <th style="text-align:left;vertical-align:top;">例子</th> </tr> </thead> <tbody> <tr> <td style="vertical-align:top;"><code>is:public</code></td> <td style="vertical-align:top;"><a href="https://github.com/search?q=is%3Apublic+org%3Agithub&type=Repositories" rel="nofollow"><strong>是:公共组织:github</strong></a>匹配 GitHub 拥有的公共存储库。</td> </tr> <tr> <td style="vertical-align:top;"><code>is:internal</code></td> <td style="vertical-align:top;"><a href="https://github.com/search?q=is%3Ainternal+test&type=Repositories" rel="nofollow"><strong>是:内部测试</strong></a>匹配可以访问的内部存储库,并包含单词"test"。</td> </tr> <tr> <td style="vertical-align:top;"><code>is:private</code></td> <td style="vertical-align:top;"><a href="https://github.com/search?q=is%3Aprivate+pages&type=Repositories" rel="nofollow"><strong>是:私有页面</strong></a>与可以访问并包含单词"页面"的专用存储库匹配。</td> </tr> </tbody> </table> ### [基于存储库是否为镜像进行搜索][Link 19] ### 您可以根据存储库是否为镜像并托管在其他地方来搜索存储库。有关详细信息,请参阅"[查找在 GitHub 上为开源做出贡献的方法"][GitHub]。 <table style="width:669.867px;"> <thead> <tr> <th style="text-align:left;vertical-align:top;">限定 符</th> <th style="text-align:left;vertical-align:top;">例子</th> </tr> </thead> <tbody> <tr> <td style="vertical-align:top;"><code>mirror:true</code></td> <td style="vertical-align:top;"><a href="https://github.com/search?utf8=%E2%9C%93&q=mirror%3Atrue+GNOME&type=" rel="nofollow"><strong>镜像:真正的 GNOME</strong></a>与镜像的存储库匹配,并包含单词"GNOME"。</td> </tr> <tr> <td style="vertical-align:top;"><code>mirror:false</code></td> <td style="vertical-align:top;"><a href="https://github.com/search?utf8=%E2%9C%93&q=mirror%3Afalse+GNOME&type=" rel="nofollow"><strong>镜像:假 GNOME</strong></a>匹配不是镜像且包含单词"GNOME"的存储库。</td> </tr> </tbody> </table> ### [基于存储库是否存档进行搜索][Link 20] ### 您可以根据存储库是否存档来搜索存储库。有关详细信息,请参阅"[关于存档存储库"。][Link 21] <table style="width:669.867px;"> <thead> <tr> <th style="text-align:left;vertical-align:top;">限定 符</th> <th style="text-align:left;vertical-align:top;">例子</th> </tr> </thead> <tbody> <tr> <td style="vertical-align:top;"><code>archived:true</code></td> <td style="vertical-align:top;"><a href="https://github.com/search?utf8=%E2%9C%93&q=archived%3Atrue+GNOME&type=" rel="nofollow"><strong>存档:真正的 GNOME</strong></a>与存档的存储库匹配,并包含单词"GNOME"。</td> </tr> <tr> <td style="vertical-align:top;"><code>archived:false</code></td> <td style="vertical-align:top;"><a href="https://github.com/search?utf8=%E2%9C%93&q=archived%3Afalse+GNOME&type=" rel="nofollow"><strong>存档:假 GNOME</strong></a>匹配未存档且包含单词"GNOME"的存储库。</td> </tr> </tbody> </table> ### [基于第一个问题数量`或帮助需要``的标签进行`搜索][Link 22] ### 您可以搜索标记问题最少数量或使用限定符和 的存储库。有关详细信息,请参阅"[通过标签鼓励对项目做出有益的贡献"。][Link 23]`help-wanted``good-first-issue``help-wanted-issues:>n``good-first-issues:>n` <table style="width:669.867px;"> <thead> <tr> <th style="text-align:left;vertical-align:top;">限定 符</th> <th style="text-align:left;vertical-align:top;">例子</th> </tr> </thead> <tbody> <tr> <td style="vertical-align:top;"><code>good-first-issues:>n</code></td> <td style="vertical-align:top;"><a href="https://github.com/search?utf8=%E2%9C%93&q=javascript+good-first-issues%3A%3E2&type=" rel="nofollow"><strong>好先问题:>2 javascript</strong></a>将存储库与两个标记且包含单词"javascript"的存储库匹配。<code>good-first-issue</code></td> </tr> <tr> <td style="vertical-align:top;"><code>help-wanted-issues:>n</code></td> <td style="vertical-align:top;"><a href="https://github.com/search?utf8=%E2%9C%93&q=react+help-wanted-issues%3A%3E4&type=" rel="nofollow"><strong>帮助通缉问题:>4 响应</strong></a>将存储库与标记的四个多个问题匹配,并且包含"反应"一词。<code>help-wanted</code></td> </tr> </tbody> </table> [README]: https://docs.github.com/en/github/searching-for-information-on-github/searching-for-repositories#search-by-repository-name-description-or-contents-of-the-readme-file [Link 1]: https://docs.github.com/en/github/searching-for-information-on-github/searching-for-repositories#search-based-on-the-contents-of-a-repository [Link 2]: https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/about-readmes [Link 3]: https://docs.github.com/en/github/searching-for-information-on-github/searching-for-repositories#search-within-a-users-or-organizations-repositories [Link 4]: https://docs.github.com/en/github/searching-for-information-on-github/searching-for-repositories#search-by-repository-size [Link 5]: https://docs.github.com/en/github/searching-for-information-on-github/understanding-the-search-syntax [Link 6]: https://docs.github.com/en/github/searching-for-information-on-github/searching-for-repositories#search-by-number-of-followers [Link 7]: https://docs.github.com/en/github/searching-for-information-on-github/searching-for-repositories#search-by-number-of-forks [Link 8]: https://docs.github.com/en/github/searching-for-information-on-github/searching-for-repositories#search-by-number-of-stars [Link 9]: https://docs.github.com/en/github/getting-started-with-github/saving-repositories-with-stars [Link 10]: https://docs.github.com/en/github/searching-for-information-on-github/searching-for-repositories#search-by-when-a-repository-was-created-or-last-updated [ISO8601]: http://en.wikipedia.org/wiki/ISO_8601 [Link 11]: https://docs.github.com/en/github/searching-for-information-on-github/searching-for-repositories#search-by-language [Link 12]: https://docs.github.com/en/github/searching-for-information-on-github/searching-for-repositories#search-by-topic [Link 13]: https://docs.github.com/en/github/administering-a-repository/classifying-your-repository-with-topics [Link 14]: https://docs.github.com/en/github/searching-for-information-on-github/searching-for-repositories#search-by-number-of-topics [Link 15]: https://docs.github.com/en/github/searching-for-information-on-github/searching-for-repositories#search-by-license [Link 16]: https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/licensing-a-repository [Link 17]: https://docs.github.com/en/github/searching-for-information-on-github/searching-for-repositories#search-by-repository-visibility [Link 18]: https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/about-repository-visibility [Link 19]: https://docs.github.com/en/github/searching-for-information-on-github/searching-for-repositories#search-based-on-whether-a-repository-is-a-mirror [GitHub]: https://docs.github.com/en/github/getting-started-with-github/finding-ways-to-contribute-to-open-source-on-github [Link 20]: https://docs.github.com/en/github/searching-for-information-on-github/searching-for-repositories#search-based-on-whether-a-repository-is-archived [Link 21]: https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/about-archiving-repositories [Link 22]: https://docs.github.com/en/github/searching-for-information-on-github/searching-for-repositories#search-based-on-number-of-issues-with-good-first-issue-or-help-wanted-labels [Link 23]: https://docs.github.com/en/github/building-a-strong-community/encouraging-helpful-contributions-to-your-project-with-labels
还没有评论,来说两句吧...