Project title: glam2commons (previously Single image batch upload)
Description: Currently when somebody does a batch upload (uploading a lot of images which were released by an archive/museum (GLAM)) all images get uploaded and lots of those might not be used or not that useful. The other option: uploading released images one by one wastes a lot of time. A solution to this would be to provide the metadata-mapping which makes an upload possible and a framework which, using these mappings, can be used to upload a single (or a small subset) of images from a GLAM. In the ideal final version this would allow a GLAM to have an "upload to Wikimedia Commons" button on their website.
This task is to build this framework. For each GLAM a separate metadata mapping is needed, you don't have to make these (although it would be good to make one): I will provide/create such a mapping for a Dutch archive (Nationaal Archief) or if needed from an English archive. However we'll have to discuss and design a good way these mappings can be added/maintained. The most suitable place for this to land is likely https://tools.wmflabs.org/. For authentication we could make use of OAuth. As this project will be building something new (without an existing code base) working together on designing a good code structure is part of the project.
The minimal viable product is a framework which offers the following:
- A simple front end where an uploader selects a website/GLAM from which to upload and enters an identifier.
- The tool then uses the metadata mapping for that specific GLAM to generate a wikitext description for the file.
- The file then gets uploaded (using OAuth to upload from own account of user).
As that might be a bit small of a scope for the project there are a lot of potential extensions of which at least some can and should be implemented during the project (the first 4 are almost must haves, the rest are nice to have):
- The ability to call the tool from toolname/GLAM/ID (API) and triggering an upload, this allow GLAMs to have an "upload to Wikimedia button" linking to that API
- A template for the metadata mappings and easy way to update/edit them
- Some landing structure on Commons: hidden category where the uploads land, request page for metadata mapping (updates)
- License checking of uploaded files.
- The ability to upload more than one image (think of 10-100 images max.): the user enters a search string instead of an ID and from there can select a set of images to upload.
- Provide quite a few metadata mappings already.
- Provide some library like function for standard parts in metadata mapping. Think of: parsing dates, categories, connecting to wikidata elements, finding creator templates, file title generation. (these are really the extras, and there are plenty here)
A quick hacky local script which does this for one archive can be found at https://github.com/basvb/single-image-batch-upload
Skills: Python + some frontend for a very simple web app. (we were thinking of a pywikibot + flask based web app on toollabs)
Estimated project time for a senior contributor: 2-3 weeks
Primary mentor: @Basvb (python, batch uploading experience, Commons)
Co-mentor: @tom29739 (Code-review, python and tools), and @zhuyifei1999 (labs, commons, python)
Microtasks: (please do both the (simple) upload to commons task and one other task)
- Commons: Upload an image from a GLAM to Wikimedia Commons to get some feeling for licenses (!) and the things which have to be filled in for an uploaded file.
- Make a start with a simple Flask app: T161332: Flask Backend for Single Image Batch Upload
- T161337: Generic file title generator for Single Image Batch Upload
- Something to check whether licenses are valid (this might get a bit too complicated for a microtask)
- <any useful first steps for the project>
- T161329: Sketch/Design UI for Single Image Batch Upload
- Make a list of relevant websites/GLAM to make metadata-mappings for (see https://commons.wikimedia.org/wiki/Commons:Batch_uploading)
More thorough description of the idea can be found at https://commons.wikimedia.org/wiki/User:Basvb/Ideas/Single_Image_Batch_Upload