From cbe4e3177e56cd28aafdb3941a80a6ce1062a66e Mon Sep 17 00:00:00 2001 From: Andy Eff Date: Wed, 20 Nov 2013 22:20:54 +0000 Subject: [PATCH 1/2] uhh --- plugins/metacritic.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/plugins/metacritic.py b/plugins/metacritic.py index 0168230..eb27114 100755 --- a/plugins/metacritic.py +++ b/plugins/metacritic.py @@ -9,15 +9,17 @@ from util import hook, http @hook.command('mc') @hook.command def metacritic(inp): - """mc [all|movie|tv|album|x360|ps3|wii|pc|ds|3ds|vita] + """mc [all|movie|tv|album|x360|ps3|pc|gba|ds|3ds|wii|vita|wiiu|xone|ps4] <title> Gets rating for <title> from metacritic on the specified medium.""" + # if the results suck, it's metacritic's fault args = inp.strip() - game_platforms = ('x360', 'ps3', 'pc', 'ds', 'wii', '3ds', 'gba', - 'psp', 'vita') + + game_platforms = ('x360', 'ps3', 'pc', 'gba', 'ds', '3ds', 'wii', + 'vita', 'wiiu', 'xone', 'ps4') all_platforms = game_platforms + ('all', 'movie', 'tv', 'album') @@ -128,7 +130,7 @@ def metacritic(inp): release = None try: - score = result.find_class('metascore')[0].text_content() + score = result.find_class('metascore_w')[0].text_content() except IndexError: score = None From 2e66e03c7d8a17dd10f123c3b6f08063d8502dcb Mon Sep 17 00:00:00 2001 From: thenoodle68 <me@fletcherjamesboyd.com> Date: Thu, 28 Nov 2013 18:48:11 +0800 Subject: [PATCH 2/2] Add litecoin command reading from BTC-E --- plugins/bitcoin.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/plugins/bitcoin.py b/plugins/bitcoin.py index 9ed6fbc..b06e3ee 100755 --- a/plugins/bitcoin.py +++ b/plugins/bitcoin.py @@ -14,3 +14,11 @@ def bitcoin(inp, message=None): } message("Current: \x0307{!s}\x0f - High: \x0307{!s}\x0f" " - Low: \x0307{!s}\x0f - Volume: {!s}".format(ticker['buy'], ticker['high'], ticker['low'], ticker['vol'])) + +@hook.command(autohelp=False) +def litecoin(inp, message=None): + """litecoin -- gets current exchange rate for litecoins from BTC-E""" + data = http.get_json("https://btc-e.com/api/2/ltc_usd/ticker") + ticker = data['ticker'] + message("Current: \x0307${!s}\x0f - High: \x0307${!s}\x0f" + " - Low: \x0307${!s}\x0f - Volume: {!s}LTC".format(ticker['buy'],ticker['high'],ticker['low'],ticker['vol_cur']))