{"id":15017707,"url":"https://github.com/filbertkm/wikibaseimport","last_synced_at":"2025-10-07T06:11:02.026Z","repository":{"id":35535396,"uuid":"39806469","full_name":"filbertkm/WikibaseImport","owner":"filbertkm","description":"Import entities from another Wikibase instance (e.g. Wikidata)","archived":false,"fork":false,"pushed_at":"2020-11-27T18:25:09.000Z","size":112,"stargazers_count":28,"open_issues_count":31,"forks_count":18,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-03T10:38:14.204Z","etag":null,"topics":["mediawiki","wikibase","wikidata"],"latest_commit_sha":null,"homepage":"","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/filbertkm.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}},"created_at":"2015-07-28T01:25:15.000Z","updated_at":"2024-08-28T14:37:44.000Z","dependencies_parsed_at":"2022-09-17T19:20:51.090Z","dependency_job_id":null,"html_url":"https://github.com/filbertkm/WikibaseImport","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filbertkm%2FWikibaseImport","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filbertkm%2FWikibaseImport/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filbertkm%2FWikibaseImport/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filbertkm%2FWikibaseImport/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/filbertkm","download_url":"https://codeload.github.com/filbertkm/WikibaseImport/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248570082,"owners_count":21126352,"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","wikibase","wikidata"],"created_at":"2024-09-24T19:50:52.980Z","updated_at":"2025-10-07T06:10:56.987Z","avatar_url":"https://github.com/filbertkm.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"WikibaseImport\n===============\n\n[![Build Status](https://travis-ci.org/filbertkm/WikibaseImport.svg?branch=master)](https://travis-ci.org/filbertkm/WikibaseImport)\n\nWikibaseImport is a MediaWiki extension that provides a maintenance script for importing entities from another Wikibase instance. (e.. Wikidata)\n\nThe script imports the specified entity or entities, including statements, sitelinks, labels, descriptions and aliases. The extension tracks the newly assigned entity id and the original id, so that any other entity that references can be linked appropriately.\n\nThe script also imports any referenced entities (e.g. properties, badge items, wikibase-item values) without the statements.\n\nInstall\n------\n\nClone ```https://github.com/filbertkm/WikibaseImport.git``` to the extensions folder of your MediaWiki instance.\n\nThen go into the WikibaseImport extension directory and run ```composer update```.\n\nThen, to enable the extension, add it in your ```LocalSettings.php``` file:\n\n```\nwfLoadExtension( 'WikibaseImport' );\n```\n\nThe extension requires a new database table to map entity ids from the foreign\nwiki to corresponding ids in the local wiki.\n\nTo add the table, run MediaWiki's ```update.php``` maintenance script.\n\nUsage\n------\nFirst, navigate to *WikibaseImport* ’s extension folder.\n\nImport a specific entity:\n\n```\nphp maintenance/importEntities.php --entity Q147\n```\n\nImport a list of entities from a text file:\n\n```\nphp maintenance/importEntities.php --file presidents.csv\n```\n\nYou need to create the csv with a list of entity ids. For example, get a list\nof entity ids from a query (e.g. Wikidata sparql).\n\nImport all properties:\n\n```\nphp maintenance/importEntities.php --all-properties\n```\n\nImport Wikidata entities with specified property:entityId value pair:\n\n```\nphp maintenance/importEntities.php --query P131:Q64\n```\n\nImport a range of entities:\n\n```\nphp maintenance/importEntities.php --range Q1:Q20\n```\n\nImport a list of entities printed by another program:\n\n```\nprintf 'Q%s\\n' {1..20} {100..120} | php maintenance/importEntities.php --stdin\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffilbertkm%2Fwikibaseimport","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffilbertkm%2Fwikibaseimport","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffilbertkm%2Fwikibaseimport/lists"}