Last modified: 2014-04-16 09:20:59 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T64011, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 62011 - Make a script to import coordinates from Wikipedia to Wikidata
Make a script to import coordinates from Wikipedia to Wikidata
Status: RESOLVED FIXED
Product: Pywikibot
Classification: Unclassified
Wikidata (Other open bugs)
core-(2.0)
All All
: Unprioritized normal
: ---
Assigned To: Maarten Dammers
:
Depends on: 62105
Blocks:
  Show dependency treegraph
 
Reported: 2014-02-27 18:39 UTC by Maarten Dammers
Modified: 2014-04-16 09:20 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Maarten Dammers 2014-02-27 18:39:04 UTC
legoktm implemented coordinates logic to Pywikibot so you can ask the page for the coordinates, see https://github.com/wikimedia/pywikibot-core/blob/master/pywikibot/page.py#L1155

I have some code lying around here to import coordinates to Wikidata so I can probably glue the two together to make it easy to import
Comment 1 Maarten Dammers 2014-03-01 12:16:21 UTC
Script is about done, but I ran into some Wikidata problems.

I'm getting the coordinate with "coordinate = page.coordinates(primary_only=True) "
Than I'm adding the coordinate as a claim

newclaim = pywikibot.Claim(self.repo, u'P625')
newclaim.setTarget(coordinate)
item.addClaim(newclaim)

And we end up with a nice serialization error (https://www.wikidata.org/w/index.php?title=Q3969823&oldid=113051304). Tracked in 62105
Comment 2 Gerrit Notification Bot 2014-03-02 17:20:44 UTC
Change 116285 had a related patch set uploaded by Multichill:
(bug 62011) Script to import coordinates from Wikipedia to Wikidata

https://gerrit.wikimedia.org/r/116285
Comment 3 Gerrit Notification Bot 2014-03-23 21:51:45 UTC
Change 116285 merged by jenkins-bot:
(bug 62011) Script to import coordinates from Wikipedia to Wikidata

https://gerrit.wikimedia.org/r/116285
Comment 4 Ricordisamoa 2014-04-16 09:20:59 UTC
The basic features are working:
https://www.wikidata.org/w/index.php?diff=120934196&oldid=120933867

If other issues raise up, please file a new bug.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links