I am trying to use the GitHub API to make a list of well documented, open source Java libraries. To do so, I went through the GitHub API documentation and made this simple curl.
curl -G https://api.github.com/search/repositories?q=language:Java+stars:%3E=500+library+java+in:readme > output1.txt
The output of this is a giant txt file, containing information about all of the repositories found. In this example, there was a total of 736 matches. However, the file from the command above is quite unreadable, so I decided to do some parsing using jq
, which resulted in the following code:
curl -G https://api.github.com/search/repositories?q=language:Java+stars:%3E=500+library+java+in:readme
| jq ".items[] | {name, description, language, watchers_count, html_url}" > parsedOutput1.txt
After this, instead of 736 results, I got something around 30 repositories, which is unacceptable for my purposes.
Doing this search: language:java stars:>=500 java library in:readme
in the GitHub search box gives me the same 736 results. I don't really know what i am doing wrong so I could use the help.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…