jayvdb added a comment.
I'd split the code into three methods (which can be placed anywhere)
1. reduce template wikitext value to a normal text string (remove wiki markup) - probably textlib.py,
2. convert string to a date class using dateutil (https://labix.org/python-dateutil) - datetime, or class with better date support like https://pypi.python.org/pypi/jdcal/) - probably date.py,
3. convert datetime to WbTime (a @ classmethod)
TASK DETAIL
https://phabricator.wikimedia.org/T66502
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: jayvdb
Cc: pywikipedia-bugs, Ladsgroup, Multichill, Ricordisamoa, jayvdb
Multichill created this task.
Multichill added a subscriber: Multichill.
Multichill added projects: pywikibot-core, Pywikibot-Wikidata.
Multichill changed Security from none to none.
TASK DESCRIPTION
The current WikidataQueryPageGenerator in pagegenerators.py tries to return pages on connected sites. Sometimes we want Wikidata items. If site is a Basesite, the generator shouldn't try to do "link = page.getSitelink(site)", but just return the Wikidata item.
TASK DETAIL
https://phabricator.wikimedia.org/T76944
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
To: Multichill
Cc: Aklapper, Multichill, jayvdb, pywikipedia-bugs