Skip to content

Commit

Permalink
[wikipedia, wiktionary] Make .w do wikipedia rather than wikitonary
Browse files Browse the repository at this point in the history
Also add .wt, .define, and .dict for wiktionary
  • Loading branch information
embolalia committed Feb 18, 2013
1 parent 88d0d30 commit b68569d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion wikipedia.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__':
Expand Down
6 changes: 3 additions & 3 deletions wiktionary.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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()

0 comments on commit b68569d

Please sign in to comment.