wikibaser provides a lightweight R interface to the MediaWiki Action API for working with Wikibase repositories and Wikidata.
The package aims to simplify common tasks such as:
- authenticating with a Wikibase instance;
- creating and editing Wikibase entities;
- uploading files to the associated MediaWiki repository;
- retrieving entities and file metadata; and
- supporting simple federation workflows between Wikibase instances and Wikidata.
The package is under active development.
# install.packages("remotes")
remotes::install_github("dataobservatory-eu/wikibaser")library(wikibaser)
session <- wb_login(
api_url = "https://example.org/w/api.php",
username = "...",
password = "..."
)
wb_upload_file(
session = session,
file = "P7101565_thumbnail.jpg",
text = "Farmhouse (Deliņi farmstead)"
)Current development focuses on:
- authentication;
- MediaWiki file uploads;
- Wikibase entity operations; and
- simple federation tools.
Contributions, bug reports and feature requests are welcome.