• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

konstin/github-wikidata-bot: Updates Wikidata entries using metadata from github

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

konstin/github-wikidata-bot

开源软件地址:

https://github.com/konstin/github-wikidata-bot

开源编程语言:

Python 100.0%

开源软件介绍:

GitHub to Wikidata bot

Tests Code style: black

Update Wikidata entries using metadata from GitHub.

For free software projects with a GitHub repository listed in Wikidata, this script will perform the following steps, using metadata collected from the GitHub API:

  • Import all stable releases and the release dates, including release data, source, and a source title
  • Update the project website
  • Normalize the GitHub link

It is possible to exclude items from being edited by the bot, and also to allow using tags for projects without GitHub releases.

Setup and usage

First install python >=3.6 and poetry, then run poetry install.

Generate a personal access token on GitHub. Create a config.json file with that token and your Wikidata username:

{
  "username": "my-wikidata-username",
  "github-oauth-token": "abcdedf1234567"
}

Then run main.py in a terminal and enter the password for your bot account.

Run pytest and black . after making code changes.

Implementation notes

First, a SPARQL query gathers all the free software projects in Wikidata which have a GitHub repository specified in the source code repository property. For each entry, a cached request to the GitHub API is made, which is authenticated by the OAuth key. The wikidata entries are then inserted using a "exists or insert" logic. For each entry, the GitHub api link is added as reference.

Why does the bot not work for item Q…?

  • Does the entity already have a VCS repository set? Use this query to determine entities without a repository.
  • You can check the logs.

Statistics

You can find detailed statistics on wmflabs.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap