When adding an image on Wikidata, it would be nice to have a gadget able to suggest to add the depicted (P180) on Wikimedia Commons too.
| Image (`P18`) on Wikidata | → | Depicted (`P180`) on Wikimedia Commons |
|---------------------------|---|----------------------------------------|
| | | |
| {F35178452} | → | {F35178461} |
== Suggested pseudo-code ==
1. (base case) assume that the depicted __cannot__ be proposed
2. after a Wikidata user saves an image (`P18` statement)
1. query image statements from Wikimedia Commons ([[https://commons.wikimedia.org/w/api.php?action=help&modules=wbgetclaims|API wbgetclaims]]: [[ https://commons.wikimedia.org/w/api.php?action=wbgetclaims&entity=M30087096 | example request]] for [[https://commons.wikimedia.org/w/index.php?title=File:Barack_Obama_with_artistic_gymnastic_McKayla_Maroney_2.jpg&action=info| this file]])
1. check if the image already has at least one "depicted" (`P180`) statement
1. if not:
1. ✅ assume that the depicted __can__ be proposed in Wikimedia Commons
2. if yes (this code branch can be omitted in the first version):
1. check whenever __none__ of the depicted entities is: the original entity (e.g. Barack Obama) __or__ something even more specific (e.g. about cats, let's say kitten, Tibetan cat, etc. · [[ https://w.wiki/5Cwb | example SPARQL query to find more specific elements ]])
2. ✅ assume that the depicted __can__ be proposed in Wikimedia Commons
When we know that the depicted can be proposed in Wikimedia Commons, I expect an [[ https://www.mediawiki.org/wiki/OOUI/Windows/Simple_messages | OOUI simple message ]] asking something like:
> **How does this image represent [ENTITY LABEL]?**
> Buttons: `[Normally, or not particularly]` · `[Main subject]`
Then save the statement as not prominent (rank = `normal`) or (rank = `preferred`).
---
(We can also think of a vice-versa gadget from Wikimedia Commons, but this Task is about designing a gadget for Wikidata)
---
What do you think about?