Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

添加.gitattributes文件 #207

Open
Mehver opened this issue Jul 25, 2022 Discussed in #206 · 1 comment
Open

添加.gitattributes文件 #207

Mehver opened this issue Jul 25, 2022 Discussed in #206 · 1 comment

Comments

@Mehver
Copy link

Mehver commented Jul 25, 2022

Discussed in #206

Originally posted by TitanRGB July 24, 2022
image

效果类似上图,就是能让GitHub的语言统计识别到这些EDA软件。我整理了一个万能的.gitattributes,可以使GitHub正确的识别Altium Designer、KiCAD、Gerber以及Eagle。我把这个文件放在了我的Gist里https://gist.github.com/TitanRGB/61c37bf71159cc9a511558ec7c218339

其中,能使AD语言生效的部分是:

*.OutJob linguist-detectable=true
*.PcbDoc linguist-detectable=true
*.PrjPCB linguist-detectable=true
*.SchDoc linguist-detectable=true
*.outjob linguist-detectable=true
*.pcbdoc linguist-detectable=true
*.prjpcb linguist-detectable=true
*.schdoc linguist-detectable=true

直接把这几行放到.gitattributes里就行。

其原理可见https://github.com/github/linguist,这就是GitHub语言统计功能的repo。

让GitHub统计这些EDA为语言除了满足强迫症,更重要的是很多人检索项目时,通过显示的“主要语言”能更方便的区分软件项目和硬件项目。很多时候我想找硬件设计的项目,但是看到语言是C或者C++,点进去才知道是固件之类的;如果看到语言是某个EDA,就能更快的检索到想找的项目。此外,通过“指定语言搜索”会更加方便!

@Mehver
Copy link
Author

Mehver commented Jul 25, 2022

#208

@Mehver Mehver closed this as completed Jul 25, 2022
@Mehver Mehver reopened this Jul 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant