Skip to content
Please note that GitHub no longer supports your web browser.

We recommend upgrading to the latest Google Chrome or Firefox.

Learn more
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate (some) example lists by way of queries #918

Open
Daniel-Mietchen opened this issue Nov 16, 2019 · 0 comments

Comments

@Daniel-Mietchen
Copy link
Collaborator

@Daniel-Mietchen Daniel-Mietchen commented Nov 16, 2019

The examples we currently have are rather static. We could make them more dynamic by generating some of them dynamically based on queries.

Here is a query that gives all pages on the English Wikipedia that have a Scholia template:

SELECT ?item WHERE {
    SERVICE wikibase:mwapi {
      bd:serviceParam wikibase:endpoint "en.wikipedia.org" .
      bd:serviceParam wikibase:api "Generator" .
      bd:serviceParam mwapi:generator "search" .
      bd:serviceParam mwapi:gsrsearch "hastemplate:Scholia" .
      bd:serviceParam mwapi:gsrlimit "max" .
      ?item wikibase:apiOutputItem mwapi:item .
      ?pageid wikibase:apiOutput "@pageid" .
      ?ns wikibase:apiOutput "@ns" .
    }
}
#LIMIT 1000 # The MWAPI call returns a maximum of 10000 results

This could then be filtered further, e.g. to fit the landing pages of the various aspects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
1 participant
You can’t perform that action at this time.