Page MenuHomePhabricator

Suggest Wikidata item of monument in upload campagin based on known identifier
Open, Needs TriagePublic

Description

Back in the day we created the campaign extension to make it easy for people to upload their photos of monument for Wiki Loves Monuments. The only thing a user needed to enter was the id of the monument. For example https://commons.wikimedia.org/wiki/Campaign:wlm-nl is the campaign for the Netherlands with the configuration at https://commons.wikimedia.org/w/index.php?title=Campaign:wlm-nl&action=edit . The latest upload is https://commons.wikimedia.org/wiki/File:Gendringen_Anholtseweg_78_01_(1).jpg where the user added "523699". User retrieve the number from the list ( like https://nl.wikipedia.org/wiki/Lijst_van_rijksmonumenten_in_Gendringen) or from an app.

This workflow seems to work, but we also want to add depicts -> Qid of the monument without bothering the user too much. We know the id, the user just entered it and we know that Rijksmonumenten use property Rijksmonument ID (P359) so we can ask the search engine for the item: https://www.wikidata.org/wiki/Special:Search?search=haswbstatement%3AP359%3D523699&fulltext=Search+for+%2719264%27&fulltext=Search&ns0=1&ns120=1 which yields https://www.wikidata.org/wiki/Q17601397 (of course you'll hit the API version of the search engine). You can now pre-fil the "add data" step with depicts (P180) -> Q17601397.

You have to track what property to look up in the configuration (P359), or maybe better just track the lookup string "haswbstatement:P359=$1" and what property to add based on that string. That gives more flexibility so we might be able to use it for more creative things.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 17 2019, 6:04 PM

When discussing this with Lodewijk we realized that T228327 should probably be implemented too.

Restricted Application added a project: Multimedia. · View Herald TranscriptAug 10 2019, 11:54 PM
Lokal_Profil added a subscriber: Lokal_Profil.EditedAug 22 2019, 6:10 AM

Covered by T224143, I think? Or by this T230563? @Multichill ?

Thos would cover if we know the wikidata Q-id and pass that on through the url parameters.
Unless I misunderstood (@Multichill correct me if I am) what was suggested here was allowing a campaign to have some lookup functionality to convert the identifier to a Q-id.

Covered by T224143, I think? Or by this T230563? @Multichill ?

Both look like hard coded, that's a different workflow. We have 65.000+ Rijksmonumenten, we're not going to hard code these. In the first step we get the id. UploadWizards does an API call based on the ID and offers the depicts suggestion in later step. See task description for details. For https://commons.wikimedia.org/wiki/File:Gendringen_Anholtseweg_78_01_(1).jpg the ID is 523699, this is the Rijksmonument ID. Based on that ID you can resolve the Qid, https://www.wikidata.org/wiki/Q17601397 in this case.

@Cparle: Does this make it clearer?