question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Have build_wikidata.js script fetch *:wikipedia tags

See original GitHub issue

I get it - people don’t want to add brand:wikipedia / operator:wikipedia etc tags because they are redundant #4672

We are adding them anyway because many people expect the OSM tags to be mostly human-readable, and Wikidata tags are not human-readable. But I can’t just leave Pull Requests sitting unmerged because people don’t want to supply this tag. 😓

So I’m thinking of just having the build_wikidata script look up missing Wikipedia tags for us. This approach also has the benefit of catching Wikipedia pages that have been added after the Wikidata pages.

My plan is to write some extremely dumb code to just choose a reasonable Wikipedia tag. I’m not going to write code to try to guess which Wikipedia page is the best one based on what languages are spoken in what countries and for what items - this is too hard.

It will not be as good as having a human pick a value, but at least then I won’t have to hold up the project for unmerged Pull Requests.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
bhouselcommented, Nov 20, 2020

Ok I built this… 🎉 I did a dryrun just now (script does no updates) and it seems to work pretty well.

The actual number of missing wikipedia tags that it catches is pretty small, so I feel confident that I can just look them over when I run the script and adjust anything that looks really wrong. I think I prefer this approach over adding notes that will probably never get removed.

For what it’s worth, each time the build_wikidata is run, it finds a lot of stuff that needs attention and I think it would be nice to put these results somewhere for people to see it.

Most of the warnings are about brands’ Facebook or Twitter accounts being suspended, so really anybody could go to the Wikidata pages and remove or fix these.

0reactions
bhouselcommented, Nov 20, 2020

For what it’s worth, each time the build_wikidata is run, it finds a lot of stuff that needs attention and I think it would be nice >to put these results somewhere for people to see it.

Most of the warnings are about brands’ Facebook or Twitter accounts being suspended, so really anybody could go to the >Wikidata pages and remove or fix these.

I pasted the output of this script into a gist: https://gist.github.com/bhousel/de4fddf31dbef99daa6e700f2f4264bb I’m kind of amazed that the “just lookup *:wikipedia tags” code worked as well as it did 😆

Does this mean that if a Facebook / Twitter account is now found to be suspended, would this counter update accordingly to reflect that?

Yes, the numbers would update. build_wikidata.js updates dist/wikidata.json. Then nsi.guide react code calculates those numbers based on whatever it finds in dist/wikidata.json

Perhaps the place where the logo is previously shown on the NSI web site could be replaced with a question mark icon to indicate something that used to be available here is no longer accessible, as a hint / invitation to open up the Wikidata page itself to check?

Maybe, but we’d have to change some things somehow. Currently if the item doesn’t have a facebook/twitter anymore, those things just don’t get put into dist/wikidata.json.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fetch a Wikipedia webpage with AJAX or fetch()
I want to dynamically fetch a Wikipedia webpage in the browser in order to further process the XHTML with XSLTProcessor. Unfortunately, this ...
Read more >
Wikipedia:User scripts/Guide
This page is about writing user scripts for use on Wikipedia. For instructions on how to install user scripts, see How do you...
Read more >
Script to Fetch Wikipedia Summary from Keyword
It fetches the summary of a Wikipedia article in one cell based on a query in another using the public MediaWiki API. example....
Read more >
Vanilla JavaScript Search App | Wikipedia API - YouTube
In this project we will build a search app using HTML5, Sass, JavaScript and the Wikipedia API.
Read more >
Wiki.js | Wiki.js
This documentation site is running on Wiki.js! ... Folder Structure & Tags Learn how to categorize your pages for an easier browsing experience....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found