{"id":15017734,"url":"https://github.com/professionalwiki/wikibaserdf","last_synced_at":"2025-07-31T14:38:00.253Z","repository":{"id":38189194,"uuid":"498730024","full_name":"ProfessionalWiki/WikibaseRDF","owner":"ProfessionalWiki","description":"Wikibase extension that allows defining RDF mappings for Wikibase Entities","archived":false,"fork":false,"pushed_at":"2024-12-09T12:10:44.000Z","size":289,"stargazers_count":14,"open_issues_count":7,"forks_count":4,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-12-20T09:07:22.677Z","etag":null,"topics":["mediawiki","mediawiki-extension","rdf","wikibase","wikibase-extension"],"latest_commit_sha":null,"homepage":"https://rdf.wikibase.wiki","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ProfessionalWiki.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-06-01T12:37:45.000Z","updated_at":"2024-12-09T12:10:47.000Z","dependencies_parsed_at":"2024-01-22T14:16:57.228Z","dependency_job_id":"920424af-7b0e-43fc-a751-2b7557c7a40f","html_url":"https://github.com/ProfessionalWiki/WikibaseRDF","commit_stats":{"total_commits":188,"total_committers":6,"mean_commits":"31.333333333333332","dds":"0.49468085106382975","last_synced_commit":"cca00c5e1768b3f760f26eb660b856cb719860ba"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProfessionalWiki%2FWikibaseRDF","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProfessionalWiki%2FWikibaseRDF/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProfessionalWiki%2FWikibaseRDF/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProfessionalWiki%2FWikibaseRDF/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ProfessionalWiki","download_url":"https://codeload.github.com/ProfessionalWiki/WikibaseRDF/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230561014,"owners_count":18245324,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mediawiki","mediawiki-extension","rdf","wikibase","wikibase-extension"],"created_at":"2024-09-24T19:50:55.017Z","updated_at":"2025-07-31T14:38:00.247Z","avatar_url":"https://github.com/ProfessionalWiki.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Wikibase RDF\n\n[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/ProfessionalWiki/WikibaseRDF/ci.yml?branch=master)](https://github.com/ProfessionalWiki/WikibaseRDF/actions?query=workflow%3ACI)\n[![Type Coverage](https://shepherd.dev/github/ProfessionalWiki/WikibaseRDF/coverage.svg)](https://shepherd.dev/github/ProfessionalWiki/WikibaseRDF)\n[![Psalm level](https://shepherd.dev/github/ProfessionalWiki/WikibaseRDF/level.svg)](psalm.xml)\n[![Latest Stable Version](https://poser.pugx.org/professional-wiki/wikibase-rdf/v/stable)](https://packagist.org/packages/professional-wiki/wikibase-rdf)\n[![Download count](https://poser.pugx.org/professional-wiki/wikibase-rdf/downloads)](https://packagist.org/packages/professional-wiki/wikibase-rdf)\n[![License](https://img.shields.io/packagist/l/professional-wiki/wikibase-rdf)](LICENSE)\n\n[Wikibase] extension that allows defining RDF mappings for Wikibase Entities.\n\n[Professional Wiki] created and maintains Wikibase RDF. We provide [Wikibase hosting], [Wikibase development], and [Wikibase consulting].\n\nThe [Wikibase Stakeholder Group] conceived and funded the extension.\n\n**Table of Contents**\n\n- [Usage](#usage)\n  * [REST API](#rest-api)\n- [Installation](#installation)\n- [PHP Configuration](#php-configuration)\n- [Development](#development)\n- [Release notes](#release-notes)\n\n## Usage\n\nWhen the extension is enabled, Item and Property pages show a \"Mapping to other ontologies\" section.\nThis section is located between the \"In more languages\" and \"Statements\" sections.\n\n\u003cimg src=\"https://user-images.githubusercontent.com/146040/193851219-dc30080a-7cbb-4c1a-9800-e7c7d98ef644.png\" style=\"border: 1px solid black\" alt=\"Property page with a mapping\"\u003e\n\nUsers with editing permissions can add, edit, or remove mappings.\n\nA mapping consists of a predicate and a URL. The predicate can only be one out of a preconfigured set of values. The URL has to be valid.\n\n\u003cimg src=\"https://user-images.githubusercontent.com/146040/193851211-b4031ca1-4cc9-47ab-9160-658f4a38d979.png\" style=\"border: 1px solid black\" alt=\"Mapping editing UI\"\u003e\n\nMapping predicates can be configured via the `MediaWiki:MappingPredicates` page by anyone with interface-admin permissions.\nYou can also configure mapping predicates via [PHP Configuration](#php-configuration).\n\n\u003cimg src=\"https://user-images.githubusercontent.com/146040/193851215-86b8ad05-0c1a-431c-ad4b-5750997fd642.png\" style=\"border: 1px solid black\" alt=\"Mapping predicates configuration page\"\u003e\n\n\u003cimg src=\"https://user-images.githubusercontent.com/146040/193854181-af8b85f2-1444-4882-a0af-d8123331f30c.png\" style=\"border: 1px solid black\" alt=\"Editing mapping predicates via the configuration page\"\u003e\n\n### REST API\n\nThis extension provides REST API endpoints for getting and setting the RDF mappings for a Wikibase entity.\n\nFor more information, refer to the [REST API documentation](docs/rest.md).\n\n## Installation\n\nPlatform requirements:\n\n- [PHP] 8.1 or later (tested up to 8.4)\n- [MediaWiki] 1.43 or later (tested up to 1.43)\n- [Wikibase] 1.43 or later (tested up to 1.43)\n\nThe recommended way to install Wikibase RDF is using [Composer] with\n[MediaWiki's built-in support for Composer][Composer install].\n\nOn the command line, go to your wiki's root directory. Then run these two commands:\n\n```shell script\nCOMPOSER=composer.local.json composer require --no-update professional-wiki/wikibase-rdf:~2.0\n```\n```shell script\ncomposer update professional-wiki/wikibase-rdf --no-dev -o\n```\n\nThen enable the extension by adding the following to the bottom of your wikis [LocalSettings.php] file:\n\n```php\nwfLoadExtension( 'WikibaseRDF' );\n```\n\nYou can verify the extension was enabled successfully by opening your wiki's Special:Version page in your browser.\n\n## PHP Configuration\n\nConfiguration can be changed via [LocalSettings.php].\n\n### Allowed predicates\n\nList of allowed predicates.\n\nVariable: `$wgWikibaseRdfPredicates`\n\nDefault: `[]`\n\nExample:\n\n```php\n$wgWikibaseRdfPredicates = [\n\t'owl:sameAs',\n\t'owl:SymmetricProperty',\n\t'rdfs:subClassOf',\n\t'rdfs:subPropertyOf',\n];\n```\n\nYou can also configure what predicates are allowed via the `MediaWiki:MappingPredicates` page.\n\n## Development\n\nTo ensure the dev dependencies get installed, have this in your `composer.local.json`:\n\n```json\n{\n\t\"require\": {\n\t\t\"vimeo/psalm\": \"^4\",\n\t\t\"phpstan/phpstan\": \"^1.4.9\"\n\t},\n\t\"extra\": {\n\t\t\"merge-plugin\": {\n\t\t\t\"include\": [\n\t\t\t\t\"extensions/WikibaseRDF/composer.json\"\n\t\t\t]\n\t\t}\n\t}\n}\n```\n\n### Running tests and CI checks\n\nYou can use the `Makefile` by running make commands in the `WikibaseRDF` directory.\n\n* `make ci`: Run everything\n* `make test`: Run all tests\n* `make cs`: Run all style checks and static analysis\n\nAlternatively, you can execute commands from the MediaWiki root directory:\n\n* PHPUnit: `php tests/phpunit/phpunit.php -c extensions/WikibaseRDF/`\n* Style checks: `vendor/bin/phpcs -p -s --standard=extensions/WikibaseRDF/phpcs.xml`\n* PHPStan: `vendor/bin/phpstan analyse --configuration=extensions/WikibaseRDF/phpstan.neon --memory-limit=2G`\n* Psalm: `php vendor/bin/psalm --config=extensions/WikibaseRDF/psalm.xml`\n\n## Release notes\n\n### Version 2.0.0 - 2025-07-07\n\n- Raised minimum MediaWiki version to 1.43\n- Raised minimum PHP version to 8.1\n- Translation updates for system messages (thanks @translatewiki and its translator community)\n\n### Version 1.1.0 - 2022-11-25\n\n- Added notification about SPARQL store behavior that shows on first edit\n- Translation updates for system messages (thanks @translatewiki and its translator community)\n\n### Version 1.0.0 - 2022-10-04\n\nInitial release for Wikibase 1.37 with these features:\n\n- Ability to add mappings to Items and Properties via an on-page UI\n- Inclusion of mappings in the RDF output\n- Configurable relationships (predicates), including configuration UI on `MediaWiki:MappingPredicates`\n- API endpoint to retrieve or update the mappings for an Entity\n- API endpoint to retrieve all mappings defined on the wiki\n- TranslateWiki integration\n- Support for PHP 8.0 and 8.1\n\n[Professional Wiki]: https://professional.wiki\n[Wikibase]: https://wikibase.consulting/what-is-wikibase/\n[Wikibase hosting]: https://professional.wiki/en/hosting/wikibase\n[Wikibase development]: https://professional.wiki/en/wikibase-software-development\n[Wikibase consulting]: https://wikibase.consulting/\n[MediaWiki]: https://www.mediawiki.org\n[PHP]: https://www.php.net\n[Composer]: https://getcomposer.org\n[Composer install]: https://professional.wiki/en/articles/installing-mediawiki-extensions-with-composer\n[LocalSettings.php]: https://www.pro.wiki/help/mediawiki-localsettings-php-guide\n[Wikibase Stakeholder Group]:https://wbstakeholder.group/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprofessionalwiki%2Fwikibaserdf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprofessionalwiki%2Fwikibaserdf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprofessionalwiki%2Fwikibaserdf/lists"}