GitHub API - 语言列表 [英] GitHub API - List of Languages

查看:162
本文介绍了GitHub API - 语言列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

GitHub API中是否有一个终端,它将为我提供GitHub上所有语言的列表?我正在寻找与github.com网站的趋势部分中的语言下拉菜单类似的结果。

不直接从GitHub API。



OP AgileAce










$ b < blockquote>

我发现有一个由GitHub维护的 Linguist图书馆
在这个回购中,有一个YAML文件( lib / linguist / languages.yml )包含所有语言和相关信息。

我只是要编写一个脚本来解析这个文件。


我在 github如何找出项目的语言?






你也可以从各种GitHub统计网站获取这些数据,例如 www.githubarchive.org



请参阅 Top Github 2013年的语言(到目前为止),作者:ADAM BARD:


我刚刚发现了 Github Archive ,这是一个使用 Google BigQuery 。真好玩!因此,我决定统计今年用语言创建了多少存储库。




  SELECT repository_language ,count(repository_language)AS repos_by_lang 
FROM [githubarchive:github.timeline]
WHERE repository_fork ==false
AND type ==CreateEvent
AND PARSE_UTC_USEC(repository_created_at) > = PARSE_UTC_USEC('2013-01-01 00:00:00')
AND PARSE_UTC_USEC(repository_created_at)< PARSE_UTC_USEC('2013-08-30 00:00:00')
GROUP BY repository_language
ORDER BY repos_by_lang DESC
LIMIT 100

coderstats.net 可能是一个很好的来源,它的 语言部分


Is there an endpoint in the GitHub API that will provide me with a list of ALL the languages on GitHub? I'm looking for similar results to the Languages drop-down in the "Trending" section on the github.com website.

解决方案

Not from GitHub API directly.

The OP AgileAce adds in the comments:

I've discovered that there is a Linguist library maintained by GitHub.
In this repo, there is a YAML file (lib/linguist/languages.yml) containing all the languages, and related info.
I'm just going to write a script that will parse this file.

I mentioned the linguist library in "How does github figure out a project's language?".


You can also get that data from various GitHub statistic sites, like www.githubarchive.org:

See "Top Github Languages for 2013 (so far)", by ADAM BARD:

I just discovered the Github Archive, a dataset of Github events queryable using Google BigQuery. What fun! So I decided to count how many repositories have been created this year by language.

SELECT repository_language, count(repository_language) AS repos_by_lang
FROM [githubarchive:github.timeline]
WHERE repository_fork == "false"
AND type == "CreateEvent"
AND PARSE_UTC_USEC(repository_created_at) >= PARSE_UTC_USEC('2013-01-01 00:00:00')
AND PARSE_UTC_USEC(repository_created_at) < PARSE_UTC_USEC('2013-08-30 00:00:00')
GROUP BY repository_language
ORDER BY repos_by_lang DESC
LIMIT 100

coderstats.net could be a good source too, with its language section.

这篇关于GitHub API - 语言列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆