User talk:Magnus Manske/import statements.js

From Wikidata
Jump to navigation Jump to search

Very useful[edit]

This tool is really useful. Why not add it to the Wikidata:Tools list?

I suppose it would be a lot of work with keeping it up-to-date with new properties, and new infobox mapping at Wd:phase 2. People might want to add infobox mapping from all Wikipedias? Do you think some kind of collaborative development would be an option?

The tool does not work if the infobox parameter is assigned text mixed with linked articles (items) and templates for formatting. For example the property "fields" in "Infobox scientist" in en:Isaac Newton. It would be nice if the text could be skipped, and each linked article would be extracted.

Extracting references/footnotes is very important, but i guess it might be difficult. Mange01 (talk) 20:01, 10 March 2013 (UTC)[reply]

Prevent importing self-referential items[edit]

I added the following code at line 179 to stop importing items that point to the same page (e.g. Q586745 has a "family" link to itself).

var valueJSON = JSON.parse(value);

if (valueJSON['entity-type'] === 'item' && ('q' + valueJSON['numeric-id']) === entity){
	console.log ( "Self-referential claim: " + entity ) ;
	return;
}

Inductiveload (talk) 23:18, 17 March 2013 (UTC)[reply]

Some problems with Spanish names[edit]

I have trying it on several, including this one: https://www.wikidata.org/wiki/Q2602284 It says "could not find en.wikipedia page, aborting" Any idea?--J. J. Merelo (talk) 18:19, 11 February 2017 (UTC)[reply]