GitHub 搜索騷技巧,太好用了!


作者:Suwanbin
鏈接:www.cnblogs.com/suwanbin/p/12113751.html
參考自 B站 up 主 CodeSheep 的視頻【如何高效地在網上找開源項目做!在職程序員實際演示一波視頻教程操作】,然后寫著寫著一好奇就去看文檔了現在這篇博客相當于官方文檔的翻譯版?當然,你也可以去看【官方文檔】體驗原汁原味的教程干啥的?相當于給搜索結果添加過濾條件,看下下面的案例你就知道啦,過濾 github 的搜索結果,更精確搜索項目
?案例
?普通搜
python
?搭配技巧搜
in:description python pushed:>2019-12-20效果:加了限制條件后,查出來的項目數有了明顯的減少
?限定詞
倉庫名(repository name)、項目描述(description)、內容(contents)、說明文件(readme.md)?來搜索項目
其他騷操作?自己看官方文檔(感覺用不到,就不整理了吧):【找倉庫中的某個文件】、【在 github 上查找代碼片段】?查找某個用戶或組織的項目

輔助限定詞
可以通過限制?項目大小(size)、擁護者數(followers)、fork數(forks)、stars數(stars)、創(chuàng)建時間(created)、更新時間(pushed)、項目所用語言(language)、topic標簽(topic)、topic標簽數(topics)...來篩選項目輔助限定詞可以多個并用,用空格隔開就行,可以搭配限定詞使用,也可單獨使用(關于項目是否被 fork 這個點我不是很懂,就不寫案例了)
in:name python size:<=1000?查出項目名字中有 python 且小于 1MB 的項目size:<=1000?查出項目大小小于 1MB 的項目

?還沒搞懂的(關于 forks、mirror、issues)
2.?case pushed:>=2013-03-06 fork:only?matches repositories with the word "case" that were pushed to on or after March 6th, 2013, and that are forks.
3. mirror:true GNOME?matches repositories that are mirrors and contain the word "GNOME." 查出是鏡像并且包含 GNOME 關鍵字的項目(github 上 mirror 啥意思不太懂)
4.?mirror:false GNOME?matches repositories that are not mirrors and contain the word "GNOME."
5. good-first-issues:>2 javascript?matches repositories with more than two issues labeled?good-first-issue?and that contain the word "javascript."
6.?help-wanted-issues:>4 react?matches repositories with more than four issues labeled?help-wantedand 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
推薦閱讀:
5T技術資源大放送!包括但不限于:C/C++,Linux,Python,Java,PHP,人工智能,單片機,樹莓派,等等。在公眾號內回復「1024」,即可免費獲?。?!
評論
圖片
表情
