瀏覽代碼

#wikipedia-en-afc -> #wikipedia-en-afc-feed

tags/v0.1^2
Ben Kurtovic 13 年之前
父節點
當前提交
c48073515b
共有 2 個檔案被更改,包括 11 行新增10 行删除
  1. +10
    -10
      earwigbot/rules.py
  2. +1
    -0
      earwigbot/wiki/copyright.py

+ 10
- 10
earwigbot/rules.py 查看文件

@@ -53,33 +53,33 @@ def process(rc):
comment = rc.comment.lower()

if "!earwigbot" in rc.msg.lower():
chans.update(("##earwigbot", "#wikipedia-en-afc"))
chans.update(("##earwigbot", "#wikipedia-en-afc-feed"))

if r_page.search(page_name):
tasks.start("afc_copyvios", page=rc.page)
chans.add("#wikipedia-en-afc")
#tasks.start("afc_copyvios", page=rc.page)
chans.add("#wikipedia-en-afc-feed")

elif r_ffu.match(page_name):
chans.add("#wikipedia-en-afc")
chans.add("#wikipedia-en-afc-feed")

elif page_name.startswith("template:afc submission"):
chans.add("#wikipedia-en-afc")
chans.add("#wikipedia-en-afc-feed")

elif rc.flags == "move" and (r_move1.match(comment) or
r_move2.match(comment)):
p = r_moved_pages.findall(rc.comment)[0]
chans.add("#wikipedia-en-afc")
chans.add("#wikipedia-en-afc-feed")

elif rc.flags == "delete" and r_delete.match(comment):
p = r_deleted_page.findall(rc.comment)[0]
chans.add("#wikipedia-en-afc")
chans.add("#wikipedia-en-afc-feed")

elif rc.flags == "restore" and r_restore.match(comment):
p = r_restored_page.findall(rc.comment)[0]
tasks.start("afc_copyvios", page=p)
chans.add("#wikipedia-en-afc")
#tasks.start("afc_copyvios", page=p)
chans.add("#wikipedia-en-afc-feed")

elif rc.flags == "protect" and r_protect.match(comment):
chans.add("#wikipedia-en-afc")
chans.add("#wikipedia-en-afc-feed")

return chans

+ 1
- 0
earwigbot/wiki/copyright.py 查看文件

@@ -191,6 +191,7 @@ class CopyrightMixin(object):
urls = search(chunks.pop(0))
urls = [url for url in urls if url not in handled_urls]
for url in urls:
handled_urls.append(url)
confidence = self._copyvio_compare_content(content, url)
if confidence > best_confidence:
best_confidence = confidence


Loading…
取消
儲存