Last modified: 2014-11-09 17:34:52 UTC
Time is one of the new Wikibase datatypes. harvest_template.py should support importing time. https://www.wikidata.org/wiki/User:Underlying_lk/harvest_template_old.py can be used as reference, but that code combines everything. I split it up in multiple bugs.
What are some example template fields which could be harvested to wikidata? Thinking out loud: if we get precision of date, rather than time, is that good enough? It looks like Underlying_lk's version is only date.
(In reply to John Mark Vandenberg from comment #1) > What are some example template fields which could be harvested to wikidata? For example the date fields in https://en.wikipedia.org/wiki/Template:Persondata or in Dutch https://nl.wikipedia.org/wiki/Sjabloon:Infobox_persoon "geboortedatum" and "sterfdatum" > > Thinking out loud: if we get precision of date, rather than time, is that > good enough? It looks like Underlying_lk's version is only date. For now that's the only thing we can implement anyway. Wikibase doesn't support a precision greater than a day at the moment so we should just focus on the date and ignore the time (for now). I removed https://bugzilla.wikimedia.org/show_bug.cgi?id=64501 btw. This bug doesn't depend on it and it's wontfix anyway.
To see this bug, run $ python pwb.py scripts/harvest_template.py -simulate -family:wikipedia -lang:en -page:MediaWiki -template:Infobox_software released P580
(In reply to John Mark Vandenberg from comment #3) > To see this bug, run > > $ python pwb.py scripts/harvest_template.py -simulate -family:wikipedia > -lang:en -page:MediaWiki -template:Infobox_software released P580 Hmm. That should output 'time is not a supported datatype', but it doesnt. http://git.wikimedia.org/blob/pywikibot%2Fcore.git/master/scripts%2Fharvest_template.py#L171
After bug 71699 was fixed, this now shows the problem $ python pwb.py scripts/harvest_template.py -simulate -family:wikipedia -lang:en -page:MediaWiki -template:Infobox_software released P580 Finding redirects... Retrieving 1 pages from wikipedia:en. >>> MediaWiki <<< time is not a supported datatype.