Many friends often get confused like this. I read a lot of technical learning documents, books and even videos. I want to put my hands to the test, so I open GitHub to find an open source project to learn and gain actual project experience. At this time, many friends will be faced with the question: “I don’t know how to search, how can I find?” And finally have to give up. After reading this article, you will learn how to search for projects on GitHub accurately.
Part of open source projects
Before we get into that, let’s take a look at the components of an open source project:
- Name: project name
- Description: A brief description of the project
- Project source code
- Readme. md: Introduction to project details
In addition to these factors, the number of stars and forks in the project itself is also an important criterion for judging whether an open source project is hot or not, which is also an important search criterion. It is also important to keep an eye on the most recent update date for this project, because the more active the project, the more frequently it is updated.
These are some of the key points to pay attention to when conducting a search.
How to search
So how do we search?
Let’s say we want to search React. Most of you type “React” into the search box. When you get back in the car, you’ll find something like this:
The search results will show so many open source projects that you are overwhelmed and have no way to start. Many people give up after this step because there are so many projects that they cannot find out how to find the open source projects that they are interested in, so the search is very inaccurate. So let’s look at a slightly more precise search method.
In accordance with thename
search
Search for projects whose names contain React:
in:name React
Copy the code
The results are as follows:
As you can see, these search results are all projects with the “React” keyword in the project name, but there are still many projects.
Now let’s constrain it
For example, IF I make the project’s star number more than 5000+ :
in:name React stars:>5000
Copy the code
The result is this:
The search results were much more accurate in an instant, and now there are only 114 items to choose from. Of course, we don’t usually set the star number as high as this, usually 1000 is about right.
Similarly, we can search by the number of forks:
in:name React stars:>5000 forks:>3000
Copy the code
You will find that the results are more and more accurate!
In accordance with theREADME
To search for
Search for React projects in readme. md:
in:readme React
Copy the code
So let’s limit the number of stars and forks:
in:readme React stars:>3000 forks:>3000
Copy the code
The search results were down to 90. At this point you can choose the project, it will be much easier.
In accordance with thedescriptin
search
Suppose we now want to learn about microservices projects, and we search for projects that contain microservices in the project description:
in: the description of servicesCopy the code
With so many results, let’s add some more filters:
in: Description Microservice language: PythonCopy the code
Let’s restrict the language to Python. Let’s see what happens:
The search results are much more accurate.
If we want to find the most recently updated items in the list, we can do this:
in: Description micro service Language: Python Pushed :>2020-01-01Copy the code
Pushed :>2020-01-01 means we limit the last update time of the project to 2020-01-01. Let’s see what the result is:
Search results only 8, these items belong to the update more active projects, this is no longer entangled.
conclusion
Ok, so let’s sum it up. All we want to do is add filters.
In :name XXX // Search by project name
In :readme XXX // Search by readme
In :description XXX // Search by description
So inside of that, we can add another filter
Stars :> XXX // stars number is greater than XXX
Forks :>3000 // Forks number is greater than XXX
Language: XXX // The programming language is XXX
Pushed :>YYYY-MM-DD // The last update time is greater than YYYY-MM-DD
These are some of our tips for accurately searching items on GitHub, in the hope that they will help you! In addition, this is an epidemic monitoring tool written by a blogger hoping to contribute a little bit to epidemic prevention and control.