wikifirc

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

commit ba89f5fce1aeb13895c2c9c60dbcbdcb7cd8536a
parent 516f93285941df27568d747e9490af6bd64410b4
Author: Antoine Amarilli <a3nm@a3nm.net>
Date:   Tue, 15 Nov 2016 11:26:43 +0100

acknowledge commands

Diffstat:
wikifirc | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/wikifirc b/wikifirc @@ -98,7 +98,7 @@ if __name__ == "__main__": line = f.readline() if not line: break - register(pages, line.rstrip()) + register(pages, line.rstrip(), None) f.close() except FileNotFoundError: pass @@ -124,10 +124,12 @@ if __name__ == "__main__": value = ' '.join(fields[1:]) if command == "user": # register it as a user + print("== I started to follow user %s" % value) for namespace in user_namespaces: register(pages, namespace + value, fout) elif command == "page": # register it as a page + print("== I started to follow page %s" % value) register(pages, value, fout) else: # bad command, fail noisily @@ -138,6 +140,7 @@ if __name__ == "__main__": line = Change(project, data) # a user is followed if its user page is followed if user_namespaces[0] + line.username in pages: + print("== I started to follow page %s" % line.page) register(pages, line.page, fout) if line.page in pages: print(line)