Last modified: 2014-11-09 17:34:52 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 T66503, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 64503 - Add datatype time to harvest_template.py for importing dates
Add datatype time to harvest_template.py for importing dates
Status: NEW
Product: Pywikibot
Classification: Unclassified
Wikidata (Other open bugs)
core-(2.0)
All All
: High enhancement
: ---
Assigned To: Pywikipedia bugs
:
Depends on: 64502
Blocks:
  Show dependency treegraph
 
Reported: 2014-04-27 13:14 UTC by Maarten Dammers
Modified: 2014-11-09 17:34 UTC (History)
4 users (show)

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


Attachments

Description Maarten Dammers 2014-04-27 13:14:06 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.
Comment 1 John Mark Vandenberg 2014-05-25 23:46:22 UTC
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.
Comment 2 Maarten Dammers 2014-07-26 09:29:15 UTC
(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.
Comment 3 John Mark Vandenberg 2014-10-04 11:35:07 UTC
To see this bug, run

$ python pwb.py scripts/harvest_template.py -simulate -family:wikipedia -lang:en -page:MediaWiki -template:Infobox_software released P580
Comment 4 John Mark Vandenberg 2014-10-04 11:39:53 UTC
(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
Comment 5 John Mark Vandenberg 2014-11-09 17:34:52 UTC
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.

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


Navigation
Links