Thursday, May 30, 2013

#WMhack - produce a list that shares a #Wikidata attribute

At the Amsterdam hackathon it became clear that Wikidata can be used as a powerful tool to improve Wikipedia. The idea of a hackathon is that you go home with new hacks and, I want to share a really nice one. It is a list. A list that indicates every known link within Wikidata from a given topic.

The cool thing is that it is the standard MediaWiki "what links here" functionality.

When you copy the "following pages" for this item, you can use the "text to columns" functionality to get something that you can use. With search and replace you can build a string that looks like this..
 {{#invoke:Available|link|Q48210}}
Many of such strings together produce a list when the Lua module Available is present on your Wiki.

When you see the Q numbers, there is no article about the subject. When you see a name in red, the label exists in Wikidata but there is no article registered for this subject. When you see a link in blue, there is a label and, there is an article.

This is a genuine hack that is really useful to complete articles on the same set of Wikidata items in any and all Wikipedias.
Thanks,
       GerardM

No comments: