目录javascript
参考自 B站 up 主 CodeSheep 的视频【如何高效地在网上找开源项目作!在职程序员实际演示一波视频教程操做】,而后写着写着一好奇就去看文档了php
如今这篇博客至关于官方文档的翻译版😂css
固然,你也能够去看【官方文档】体验原汁原味的教程java
干啥的?至关于给搜索结果添加过滤条件,看下下面的案例你就知道啦,过滤 github 的搜索结果,更精确搜索项目python
关键词:python
react
搜索 github 中,项目描述(description)中有 python 而且 2019-12-20 号以后有更新过的项目git
in:description python pushed:>2019-12-20
程序员
效果:加了限制条件后,查出来的项目数有了明显的减小github
可经过指定
仓库名(repository name)、项目描述(description)、内容(contents)、说明文件(readme.md)
来搜索项目web
限定词 | 案例 |
---|---|
in:name |
in:name python 查出仓库名中有 python 的项目(python in:name 也是同样的) |
in:description |
in:name,description python 查出仓库名或者项目描述中有 python 的项目 |
in:readme |
in:readme python 查出 readme.md 文件里有 python 的项目 |
repo:owner/name |
repo:octocat/hello-world 查出 octocat 的 hello-world 项目(指定了某我的的某个项目) |
其余骚操做?本身看官方文档(感受用不到,就不整理了吧):【找仓库中的某个文件】、【在 github 上查找代码片断】
限定词 | 案例 |
---|---|
user:USERNAME |
user:1335951413 stars:<10 查出用户 1335951413 名下 stars 少于 10 的项目 |
org:ORGNAME |
org:github 查出 github 名下的项目 |
能够经过限制
项目大小(size)、拥护者数(followers)、fork数(forks)、stars数(stars)、建立时间(created)、更新时间(pushed)、项目所用语言(language)、topic标签(topic)、topic标签数(topics)...
来筛选项目辅助限定词能够多个并用,用空格隔开就行,能够搭配限定词使用,也可单独使用
(关于项目是否被 fork 这个点我不是很懂,就不写案例了)
in:name python size:<=1000
查出项目名字中有 python 且小于 1MB 的项目
size:<=1000
查出项目大小小于 1MB 的项目
限定词 | 案例 |
---|---|
stars:n |
stars:>=5 查出 star数大于等于 5 个 的项目(支持大于小于区间等) |
pushed:YYYY-MM-DD |
css pushed:>2013-02-01 查出仓库中包含 css 关键字,而且在 2013年1月 以后更新过的项目 |
language:LANGUAGE |
rails language:javascript 查出仓库包含 rails 关键字,而且使用 javscript 语言的项目 |
created:YYYY-MM-DD |
webos created:<2011-01-01 查出仓库中包含 webos 关键字而且是在 2011 年以前建立的项目(也支持时分秒,支持大于小于区间等) |
size:n |
size:1000 查出仓库大小等于 1MB 的项目size:>=30000 查出仓库大小至少大于 30MB 的项目size:50..120 查出仓库大小在 50KB 至 120KB 之间的项目 |
followers:n |
followers:1000 查出有 1000 个拥护者(followers) 的项目(支持大于小于区间等) |
forks:n |
forks:5 查出有 5 个 forks 的项目(支持大于小于区间等) |
topic:TOPIC |
topic:jekyll 查出含有 jekyll 这个 topic 的项目(项目描述下面的东西,至关于标签、分类) |
topics:n |
topics:>5 查出有 5 个以上 topic 的项目(支持大于小于区间等) |
archived:true/false |
archived:true GNOME 查出已经封存了而且含有 GNOME 关键字的项目(已经再也不维护了的项目) |
is:public/private |
is:public org:github 查出仓库全部组织是 github 而且公开的项目is:private github 查出含有 github 关键字而且是私有的项目(私有的别人看不到,因此这个是用来搜索本身的私有项目的) |
license:LICENSE_KEYWORD |
license:apache-2.0 查出仓库的开源协议是 apache-2.0 的 |
stars:>=500 fork:true language:php matches repositories with the at least 500 stars, including forked ones, that are written in PHP.
good-first-issue
and that contain the word "javascript."help-wanted-issues:>4 react matches repositories with more than four issues labeled help-wanted
and that contain the word "React."
推荐直接在页面上的搜索结果点击排序,何须再去学一手呢?
官网文档:【给你的查询结果排序】
本身灵活的使用限定词和辅助限定词写出一套规则便可查出你想要的项目
他们的位置前后、数量都无所谓,加上只是多了一个条件
经常使用到的其实有就是这些,上面的仍是太多了,你有那个需求,又找不到方式的时候能够查查看
# 项目名字(name)里有 python 的 in:name python # 名字(name)里有 python 的而且 stars 大于 3000 的 in:name python starts:>3000 # 名字(name)里有 python 的而且 stars 大于 3000 、forks 大于 200 的 in:name python starts:>3000 forks:>200 # 详情(readme)里面有 python 的而且 stars 大于 3000 的 in:readme python starts:>3000 # 描述(description)里面有 python 的而且 stars 大于 3000 的 in:description python starts:>3000 # 描述(description)里面有 python 的而且是 python 语言的 in:description python language:python # 描述(description)里面有 python 的而且 2019-12-20 号以后有更新过的 in:description python pushed:>2019-12-20