Uploading with Commonsbot

Published: Dec 7, 2021 by Steve Baskauf

A few months ago, as part of our WikiProject Vanderbilt Fine Arts Gallery, we received permission to upload Public Domain works from the Vanderbilt Fine Arts Gallery to Wikimedia Commons, where they will be more accessible to the public.

To make this happen, I put in some more work on Commonsbot, a Python script that I’d been hacking away at for about a year. It’s now nominally functional, and I used it to upload just under 300 high-resolution images of two-dimensional works.

There are existing tools for uploading images to Commons, but Commonsbot not only uploads the images with metadata based on the Artwork template, but it also adds Structured data on Commons that backlinks the Commons media item to its corresponding Wikidata item. It also generates the necessary CSV data for another script I wrote, VanderBot, to create a P18 (image) link from the Wikidata item to the new Commons media item.

For example, one of our works whose image was uploaded to Commons is now linked to its Wikidata item: https://www.wikidata.org/wiki/Q104032737.

We can now do fun stuff with the images like create SPARQL-based visualizations such as an image grid showing Kress collection works donated to the Gallery in the 1960’s.

Share

Latest Posts

Enabling ecological survey data integration
Enabling ecological survey data integration

Our paper describing the Humboldt Extension to Darwin Core has been published in Ecography. The Humboldt Extension adds 55 terms that enrich the Darwin Core, providing the terms needed to capture and share multiple types of biodiversity survey data. The paper illustrates the benefits of implementing the Humboldt Extension with three case studies and demonstrates how richer data can be used in research, modelling, and to inform decision-making.

Biological survey and monitoring data publishing guide
Biological survey and monitoring data publishing guide

My coauthors and I have published a guide to help people understand how to use the new Humboldt Extension for Biological Inventories of the Darwin Core standard. The guide includes diagrams and detailed information about how to structure the data to capture the hierarchical structure typically found in monitoring projects.

Open Science recipes published
Open Science recipes published

My colleage from the Vanderbilt Libraries’ Digital Lab, Shenmeng Xu, an I have published two chapters in the ACRL’s 2025 Open Science Cookbook. The Cookbook is a lighthearted take on technical topics where instructions are given in “recipe” format to teach beginners new tech skills.