huggle3-qt-lx icon indicating copy to clipboard operation
huggle3-qt-lx copied to clipboard

Easy button to open linked Wikidata item

Open addshore opened this issue 6 years ago • 8 comments

While patrolling enwiki vandalism it would be great to be able to quickly open Wikidata for the respected article to allow checking of facts, for example when a data of birth is changed, i want to go to wikidata, look at the references and see what is actually right.

addshore avatar Dec 24 '18 12:12 addshore

OK can you explain how that can be done? How do you even retrieve name of that "linked Wikidata item"

benapetr avatar Dec 24 '18 13:12 benapetr

https://www.wikidata.org/wiki/Special:ItemByTitle/enwiki/Berlin for example would work :)

addshore avatar Dec 24 '18 14:12 addshore

But it would also be cool to only show the link if the article is actually linked to a wikidata item. In which case you would need an API lookup, the entity ID attached to the page can be found through the pageprops api afaik. I wouldn't want to add another API call, but perhaps we can bundle it into one that is already happening?

addshore avatar Dec 24 '18 14:12 addshore

I don't know if this is possible to bundle and I don't even know the API call, that link you gave me is definitely not an API :P

Given that wikidata is very WMF specific thing, this should be made as an extension, but that's just a self-note

benapetr avatar Dec 24 '18 14:12 benapetr

I don't know if this is possible to bundle and I don't even know the API call, that link you gave me is definitely not an API :P

Well, this is the link the button would need to link to ;) But no, not really an API. is there currently an API query that is made for each diff the user looks at?

Given that wikidata is very WMF specific thing, this should be made as an extension, but that's just a self-note

A Wikidata support extension could generally be quite a good idea.

addshore avatar Dec 24 '18 14:12 addshore

@addshore there is several API calls done for each diff, this one is done for each https://github.com/huggle/huggle3-qt-lx/blob/master/src/huggle_core/wikiedit.cpp#L611

benapetr avatar Dec 27 '18 17:12 benapetr

there are 2 api calls at least since MW no longer support obtaining of diff via same query as revision info, we also do other separate API queries, for each diff we also retrieve info about user who made it, their talk page (to parse warnings) and also page history to find who is founder of page

benapetr avatar Dec 27 '18 17:12 benapetr

@addshore if you are coming to hackathon this year we could create this extension in JS engine ;)

benapetr avatar May 11 '19 03:05 benapetr