瀏覽代碼

--tag-categories should examine the root as wel

tags/v0.3
Ben Kurtovic 7 年之前
父節點
當前提交
d910c6a96e
共有 1 個檔案被更改,包括 4 行新增2 行删除
  1. +4
    -2
      earwigbot/tasks/wikiproject_tagger.py

+ 4
- 2
earwigbot/tasks/wikiproject_tagger.py 查看文件

@@ -221,14 +221,16 @@ class WikiProjectTagger(Task):
def process_category(self, page, job, recursive):
"""Try to tag all pages in the given category."""
self.logger.info(u"Processing category: [[%s]]", page.title)
if job.tag_categories:
self.process_page(member, job, is_category=True)
for member in page.get_members():
if member.namespace == constants.NS_CATEGORY:
if job.tag_categories:
self.process_page(member, job, is_category=True)
if recursive is True:
self.process_category(member, job, True)
elif recursive > 0:
self.process_category(member, job, recursive - 1)
elif job.tag_categories:
self.process_page(member, job, is_category=True)
else:
self.process_page(member, job)



Loading…
取消
儲存