fuddl / wd

a browser extension for wikidata
https://wikidata.org/wiki/Wikidata:Tools/Wikidata_for_Firefox
GNU General Public License v3.0
36 stars 6 forks source link

More URL default properties #98

Closed slweeb closed 1 year ago

slweeb commented 1 year ago

Currently there are 5 default options when nothing is found on a webpage: full work available at URL, described at URL, official website, URL, and official blog

There are some more that would be useful:

There are even more ones that could potentially be added: https://www.wikidata.org/wiki/Wikidata:WikiProject_Websites/Property_autolist

Those are the most important, though.

fuddl commented 1 year ago

I could also query all existing url properties of offer them to the user. this way it would update without my intervention.

slweeb commented 1 year ago

That would be nice, I just didn't know if it would be too unwieldy.

fuddl commented 1 year ago

lets have a look

fuddl commented 1 year ago

lets quite a lot. also very unhelpfully specific. what do the properties we like have in common?

slweeb commented 1 year ago

the ones we like shouldn't have a URL match pattern, so things like P7294 would be excluded. this might bring it down a lot

fuddl commented 1 year ago

that removes 8

slweeb commented 1 year ago

it might help to also add a filter for P5008 Q15831464 (on focus list of WikiProject Websites), i recently added these statements to properties like these

fuddl commented 1 year ago

this an also removing links that should point to images (since the extension should not execute on images)

fuddl commented 1 year ago

also removing sandbox properties

slweeb commented 1 year ago

this one works really well

fuddl commented 1 year ago

looks smart but P2699 is missing

slweeb commented 1 year ago

P2699 was missing Wikidata property related to websites, it shows up now

fuddl commented 1 year ago

lets add an order. I'd like the property most likely to be used at the top. Can we get the list ordered by the number of statements?

slweeb commented 1 year ago

i'm not really good at queries so i'm not sure how, we could probably ask at WD:Request a query to modify it

fuddl commented 1 year ago

again removing the one with a match pattern

fuddl commented 1 year ago

i'm not really good at queries so i'm not sure how, we could probably ask at WD:Request a query to modify it

will you? should I?

slweeb commented 1 year ago

i'll do it right now, they're pretty quick

slweeb commented 1 year ago

https://www.wikidata.org/wiki/Wikidata:Request_a_query#Sort_properties_in_query_by_amount_of_uses

fuddl commented 1 year ago

the query seems a little expensive. the first time it's fired, Its gonna be slow

slweeb commented 1 year ago

hm yeah for sure, perhaps sorting by the ID could be similar?

fuddl commented 1 year ago

hm yeah for sure, perhaps sorting by the ID could be similar?

Might be the cheper way to get almost the same result. I need another question answered.

slweeb commented 1 year ago

they're quite fast huh

fuddl commented 1 year ago

So, the final query run for every website ā€“ not found by a different resolver before ā€“ could look like this:

SELECT ?item ?property WHERE {
    {
        ?item ?predicate <https://www.wikidata.org/wiki/Wikidata:Main_Page>.
    } UNION {
        ?item ?predicate <https://www.wikidata.org/wiki/Wikidata:Main_Page/>.
    } UNION {
        ?item ?predicate <http://www.wikidata.org/wiki/Wikidata:Main_Page>.
    } UNION {
        ?item ?predicate <http://www.wikidata.org/wiki/Wikidata:Main_Page/>.
    } UNION {
        ?item ?predicate <http://wikidata.org/wiki/Wikidata:Main_Page>.
    } UNION {
        ?item ?predicate <http://wikidata.org/wiki/Wikidata:Main_Page/>.
    }
    ?property wikibase:directClaim ?predicate.
    FILTER(?property IN (wd:P856, wd:P963, wd:P973, wd:P1065, wd:P1401, wd:P1581, wd:P1896, wd:P2078, wd:P2699, wd:P4238, wd:P4945, wd:P5282, wd:P6269, wd:P6378, wd:P6818, wd:P7014, wd:P7101, wd:P8214, wd:P8768, wd:P8934, wd:P9138, wd:P9214, wd:P9361, wd:P9494, wd:P9601, wd:P9732, wd:P9771, wd:P9904, wd:P10027, wd:P10214, wd:P10225, wd:P10311))
}
LIMIT 1

I hope it is a good idea šŸ˜…šŸ˜¬

Screenshot 2022-10-21 at 18 28 02

fuddl commented 1 year ago

@slweeb please try version .279

slweeb commented 1 year ago

sorry for the delay! it doesn't look like that version is out on the chrome webstore?

fuddl commented 1 year ago

Iā€™m afraid the update is still pending

fuddl commented 1 year ago

should be public now

slweeb commented 1 year ago

there seems to be some weird behavior when opening the dropdown menu, looks like its loading more items and refreshing. it works though!

fuddl commented 1 year ago

This is indeed a known problem with all dropdowns in chrome