From b68569d2c79ff396d88a9e6803bd925a142694b7 Mon Sep 17 00:00:00 2001 From: Edward Powell Date: Mon, 18 Feb 2013 12:14:47 -0500 Subject: [PATCH] [wikipedia, wiktionary] Make .w do wikipedia rather than wikitonary Also add .wt, .define, and .dict for wiktionary --- wikipedia.py | 2 +- wiktionary.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/wikipedia.py b/wikipedia.py index 44d93653d0..2ae1a8d20c 100644 --- a/wikipedia.py +++ b/wikipedia.py @@ -175,7 +175,7 @@ def wik(willie, trigger): willie.say(result) else: willie.say('Can\'t find anything in Wikipedia for "%s".' % origterm) -wik.commands = ['wiki', 'wik'] +wik.commands = ['wiki', 'wik', 'w'] wik.priority = 'high' if __name__ == '__main__': diff --git a/wiktionary.py b/wiktionary.py index b7ef822e41..a4a23a61b8 100644 --- a/wiktionary.py +++ b/wiktionary.py @@ -70,7 +70,7 @@ def format(word, definitions, number=2): result += ', '.join(n) return result.strip(' .,') -def w(willie, trigger): +def wiktionary(willie, trigger): """Look up a word on Wiktionary.""" word = trigger.group(2) if word is None: @@ -91,8 +91,8 @@ def w(willie, trigger): if len(result) > 300: result = result[:295] + '[...]' willie.say(result) -w.commands = ['w'] -w.example = '.w bailiwick' +wiktionary.commands = ['wt', 'define', 'dict'] +wiktionary.example = '.wt bailiwick' if __name__ == '__main__': print __doc__.strip()