Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Updates Wikidata entries using metadata from github

License

NotificationsYou must be signed in to change notification settings

konstin/github-wikidata-bot

Repository files navigation

Tests

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 toexclude items from being edited by the bot, and also toallow using tags for projects without GitHub releases.

Setup and usage

First install python 3.12 anduv, then runuv sync.

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

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

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

Runpytest,ruff format andruff check 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 thesource 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? Usethis queryto determine entities without a repository.

Statistics

You can find detailed statistics onwmflabs.

About

Updates Wikidata entries using metadata from github

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors9


[8]ページ先頭

©2009-2025 Movatter.jp