How accurate search for open source projects in Gihub above?

Author: Juefei

https://juejin.im/post/5e3d01c56fb9a07c91100801

Many small partners, often have such confusion, I read a lot of technical study documents, books, and even video, I'd like to hands-on, so I turned on GitHub, trying to find a open source project, learn, get hands-on experience project . This time many small partners will be faced with the question: "I will not search ah, how can I Zhaoya?", We can only give up. I believe after reading this article, you can learn how to accurately search project on GitHub.

Part of open source projects

Before it clear, let's first look at a part of what open source projects are:

  • name: Project name
  • A brief description of the project: description
  • The project source code
  • Details of the project are: README.md

Then in addition to these factors, the project's own starnumber and the forknumber is also an open source project to judge whether the fiery standards, this is also a very important search criteria. In addition, we also observe Last update of this project, because the more active project, its modified date is also more frequent.

Some of the key elements of the above point is that when we are conducting a search should be noted.

How to Search

That we are in the end how to search for it?

Suppose we now want to search React, I believe most are small partner directly in the search box enter: "React", then a carriage return, you will find the situation like this:

Search results will show a lot of open source projects, just to let you overwhelmed, unable to start, many small partner search to this step to give up, because the project too much, could not find how to find open source projects they are interested in, so this Search is very inaccurate. So let's learn a little about the precise point search method.

According to nameSearch

Search 项目名which contains Reactitems:

in:name React

Results are as follows:

You can see, these are the search results Project name inside with "React" keyword, but the number of projects is still a lot.

Now let's look at the constraints

For example, the number of star I would be accurate to project greater than 5000:

in:name React stars:>5000

The result is this:

搜索结果瞬间精确了很多,现在只有114个项目可供选择。当然我们一般不会把star数设置得这么高,一般设置个1000就差不多了。

同理,我们也可以按照fork的数量来进行搜索:

in:name React stars:>5000 forks:>3000

你会发现,结果越来越精确!

按照README来搜索

搜索README.md里面包含React的项目:

 in:readme React

结果有这么多,那么我们再限制一下它的star数和fork数:

in:readme React stars:>3000 forks:>3000

搜索结果一下子精确到了90个。这个时候你再去选择项目,就会变得容易很多。

按照descriptin搜索

假设我们现在要学习微服务的项目,我们搜索项目描述(description)里面包含微服务的项目:

in:description 微服务

结果有这么多,那我们接着增加一些筛选条件:

in:description 微服务 language:python 

language:python的意思是我们把语言限制为python,我们来看看结果如何:

搜索结果精确了很多。

假如在这些项目里面,我们想要找到最近才更新的项目,意思是更新时间就在最近,我们可以这样:

in:description 微服务 language:python pushed:>2020-01-01

pushed:>2020-01-01的意思是我们把项目的最后更新时间限制到2020-01-01,我们来看看结果如何:

搜索结果只有8个了,这几个项目就属于更新比较活跃的项目,这下再也不纠结了。

总结


好,我们来总结一下。我们想要进行精准搜索,无非就是增加筛选条件。

  • in:name xxx // 按照项目名搜索
  • in:readme xxx // 按照README搜索
  • in:description xxx // 按照description搜索

那么在这里面呢,我们又可以增加筛选条件

  • stars:>xxx // stars数大于xxx
  • forks:>3000 // forks数大于xxx
  • language:xxx // 编程语言是xxx
  • pushed:>YYYY-MM-DD // 最后更新时间大于YYYY-MM-DD

以上就是我们在GitHub上面精准搜索项目的一些小技巧,希望对你有所帮助!

另外,这是博主写的一个疫情查看小工具希望能为疫情防控贡献一点点微薄的力量。

http://www.xieyezi.com:9001/

发布了19 篇原创文章 · 获赞 1 · 访问量 2115

Guess you like

Origin blog.csdn.net/weixin_45788094/article/details/104258401