jenkins-bot has submitted this change and it was merged.
Change subject: Improvements for featured.py - Extract only wikipedia sites from wikidata repo - Bugfix for site variable ......................................................................
Improvements for featured.py - Extract only wikipedia sites from wikidata repo - Bugfix for site variable
Change-Id: I848c9f03e042fc11a3a7bc798521b1bcf73c8ad8 --- M scripts/featured.py 1 file changed, 10 insertions(+), 6 deletions(-)
Approvals: Merlijn van Deen: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/featured.py b/scripts/featured.py index 0c3ed50..411308d 100644 --- a/scripts/featured.py +++ b/scripts/featured.py @@ -291,7 +291,7 @@ task = 'good' if not self.hastemplate(task): pywikibot.output(u'\nNOTE: % arcticles are not implemented at %.' - % (task, site)) + % (task, self.site)) return
if self.getOption('fromall'): @@ -300,8 +300,10 @@ dp.get()
### Quick and dirty hack - any ideas? - self.fromlang = [key.replace('wiki', '').replace('_', '-') - for key in dp.sitelinks.keys()] + # use wikipedia sites only + self.fromlang = [lang.replace('_', '-') for (lang, fam) in + [key.split('wiki') for key in dp.sitelinks.keys()] + if not fam] else: return # 2DO self.fromlang.sort() @@ -326,7 +328,7 @@ task = 'featured' if not self.hastemplate(task): pywikibot.output(u'\nNOTE: % arcticles are not implemented at %.' - % (task, site)) + % (task, self.site)) return
if self.getOption('fromall'): @@ -335,8 +337,10 @@ dp.get()
### Quick and dirty hack - any ideas? - self.fromlang = [key.replace('wiki', '').replace('_', '-') - for key in dp.sitelinks.keys()] + # use wikipedia sites only + self.fromlang = [lang.replace('_', '-') for (lang, fam) in + [key.split('wiki') for key in dp.sitelinks.keys()] + if not fam] else: return # 2DO self.fromlang.sort()