稚晖大大,改一下.gitattributes就能让GitHub的语言统计识别Altium文件 #206
Mehver
started this conversation in
Show and tell
Replies: 2 comments 6 replies
-
您好,我是焕挺,您的邮件已经收到,我会尽快回复!
|
Beta Was this translation helpful? Give feedback.
5 replies
-
先提交了一批。另外,要想让.gitattributes生效,需要等服务器的缓存更新。所以不会马上看到效果。 效果好的(能统计到且比例协调): 效果还行的(能统计到Altium,但是只占10~20%,比例不协调): 效果扑街的(统计到的AD和Gerber比例不协调 / 或者比例小到被忽略不计): |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
效果类似上图,就是能让GitHub的语言统计识别到这些EDA软件。我整理了一个万能的
.gitattributes
,可以使GitHub正确的识别Altium Designer、KiCAD、Gerber以及Eagle。我把这个文件放在了我的Gist里https://gist.github.com/TitanRGB/61c37bf71159cc9a511558ec7c218339其中,能使AD语言生效的部分是:
直接把这几行放到.gitattributes里就行。
其原理可见https://github.com/github/linguist,这就是GitHub语言统计功能的repo。
让GitHub统计这些EDA为语言除了满足强迫症,更重要的是很多人检索项目时,通过显示的“主要语言”能更方便的区分软件项目和硬件项目。很多时候我想找硬件设计的项目,但是看到语言是
C
或者C++
,点进去才知道是固件之类的;如果看到语言是某个EDA,就能更快的检索到想找的项目。此外,通过“指定语言搜索”会更加方便!Beta Was this translation helpful? Give feedback.
All reactions