wikifirc

filter irc.wikimedia.org on specific pages and users
git clone https://a3nm.net/git/wikifirc/
Log | Files | Refs | README

commit 5f3b51a0f52f10f88e78206efa31f3a52856f715
parent 5eb5ac3b35255f2de238154c76c93ff8d6f92e9e
Author: Antoine Amarilli <a3nm@a3nm.net>
Date:   Tue, 15 Nov 2016 12:06:57 +0100

do not talk about pages that are already followed

Diffstat:
wikifirc | 7++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/wikifirc b/wikifirc @@ -151,14 +151,15 @@ if __name__ == "__main__": line = Change(project, data) # a user is followed if its user page is followed if user_namespaces[0] + capitalize(line.username) in pages: + new_page = capitalize(line.page) # do not follow special pages special = False for special_namespace in special_namespaces: if line.page.startswith(special_namespace): special = True - if not special: - print("== I started to follow page %s" % line.page) - register(pages, line.page, fout) + if not special and not new_page in pages: + print("== I started to follow page %s" % new_page) + register(pages, new_page, fout) if line.page in pages: print(line)