Tidy Imports
This commit is contained in:
parent
4447e6cd1f
commit
a76ff29d4b
|
@ -1,4 +1,3 @@
|
||||||
from util import hook
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import re
|
import re
|
||||||
|
@ -6,6 +5,8 @@ import json
|
||||||
import time
|
import time
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
|
from util import hook
|
||||||
|
|
||||||
|
|
||||||
@hook.command(autohelp=False, permissions=["permissions_users"])
|
@hook.command(autohelp=False, permissions=["permissions_users"])
|
||||||
def permissions(inp, bot=None, notice=None):
|
def permissions(inp, bot=None, notice=None):
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
from util import hook
|
|
||||||
import random
|
import random
|
||||||
|
|
||||||
|
from util import hook
|
||||||
|
|
||||||
|
|
||||||
with open("plugins/data/larts.txt") as f:
|
with open("plugins/data/larts.txt") as f:
|
||||||
larts = [line.strip() for line in f.readlines()
|
larts = [line.strip() for line in f.readlines()
|
||||||
if not line.startswith("//")]
|
if not line.startswith("//")]
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
from util import hook
|
|
||||||
import random
|
import random
|
||||||
|
|
||||||
|
from util import hook
|
||||||
|
|
||||||
|
|
||||||
@hook.command(autohelp=False)
|
@hook.command(autohelp=False)
|
||||||
def coin(inp, action=None):
|
def coin(inp, action=None):
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
import time
|
import time
|
||||||
|
|
||||||
from util import hook
|
from util import hook
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# CTCP responses
|
# CTCP responses
|
||||||
@hook.regex(r'^\x01VERSION\x01$')
|
@hook.regex(r'^\x01VERSION\x01$')
|
||||||
def ctcp_version(inp, notice=None):
|
def ctcp_version(inp, notice=None):
|
||||||
|
|
|
@ -4,6 +4,7 @@ import re
|
||||||
|
|
||||||
from util import hook
|
from util import hook
|
||||||
|
|
||||||
|
|
||||||
socket.setdefaulttimeout(10)
|
socket.setdefaulttimeout(10)
|
||||||
|
|
||||||
nick_re = re.compile(":(.+?)!")
|
nick_re = re.compile(":(.+?)!")
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import re
|
import re
|
||||||
|
from fnmatch import fnmatch
|
||||||
|
|
||||||
from util import hook
|
from util import hook
|
||||||
from fnmatch import fnmatch
|
|
||||||
|
|
||||||
|
|
||||||
@hook.sieve
|
@hook.sieve
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import base64
|
import base64
|
||||||
|
|
||||||
from util import hook
|
from util import hook
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
# Plugin by GhettoWizard and Scaevolus
|
# Plugin by GhettoWizard and Scaevolus
|
||||||
import re
|
import re
|
||||||
|
|
||||||
from util import hook
|
from util import hook
|
||||||
from util import http
|
from util import http
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
from util import hook, http, text
|
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
from util import hook, http, text
|
||||||
|
|
||||||
|
|
||||||
api_url = "http://encyclopediadramatica.se/api.php?action=opensearch"
|
api_url = "http://encyclopediadramatica.se/api.php?action=opensearch"
|
||||||
ed_url = "http://encyclopediadramatica.se/"
|
ed_url = "http://encyclopediadramatica.se/"
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
import random
|
import random
|
||||||
|
|
||||||
from util import hook, text
|
from util import hook, text
|
||||||
|
|
||||||
|
|
||||||
color_codes = {
|
color_codes = {
|
||||||
"<r>": "\x02\x0305",
|
"<r>": "\x02\x0305",
|
||||||
"<g>": "\x02\x0303",
|
"<g>": "\x02\x0303",
|
||||||
|
|
|
@ -1,13 +1,15 @@
|
||||||
from util import hook
|
|
||||||
from Crypto import Random
|
|
||||||
from Crypto.Cipher import AES
|
|
||||||
from Crypto.Protocol.KDF import PBKDF2
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import base64
|
import base64
|
||||||
import json
|
import json
|
||||||
import hashlib
|
import hashlib
|
||||||
|
|
||||||
|
from Crypto import Random
|
||||||
|
from Crypto.Cipher import AES
|
||||||
|
from Crypto.Protocol.KDF import PBKDF2
|
||||||
|
|
||||||
|
from util import hook
|
||||||
|
|
||||||
|
|
||||||
# helper functions to pad and unpad a string to a specified block size
|
# helper functions to pad and unpad a string to a specified block size
|
||||||
# <http://stackoverflow.com/questions/12524994/encrypt-decrypt-using-pycrypto-aes-256>
|
# <http://stackoverflow.com/questions/12524994/encrypt-decrypt-using-pycrypto-aes-256>
|
||||||
BS = AES.block_size
|
BS = AES.block_size
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
# Written by Scaevolus 2010
|
# Written by Scaevolus 2010
|
||||||
from util import hook, http, text, pyexec
|
|
||||||
import string
|
import string
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
from util import hook, http, text, pyexec
|
||||||
|
|
||||||
|
|
||||||
re_lineends = re.compile(r'[\r\n]*')
|
re_lineends = re.compile(r'[\r\n]*')
|
||||||
|
|
||||||
# some simple "shortcodes" for formatting purposes
|
# some simple "shortcodes" for formatting purposes
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
from util import hook, http
|
|
||||||
from urllib import quote_plus
|
from urllib import quote_plus
|
||||||
|
|
||||||
|
from util import hook, http
|
||||||
|
|
||||||
|
|
||||||
api_url = "http://api.fishbans.com/stats/{}/"
|
api_url = "http://api.fishbans.com/stats/{}/"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
from util import hook
|
|
||||||
import random
|
import random
|
||||||
|
|
||||||
|
from util import hook
|
||||||
|
|
||||||
|
|
||||||
with open("plugins/data/fortunes.txt") as f:
|
with open("plugins/data/fortunes.txt") as f:
|
||||||
fortunes = [line.strip() for line in f.readlines()
|
fortunes = [line.strip() for line in f.readlines()
|
||||||
if not line.startswith("//")]
|
if not line.startswith("//")]
|
||||||
|
|
|
@ -1,10 +1,13 @@
|
||||||
from util import hook, http
|
|
||||||
import os.path
|
import os.path
|
||||||
import pygeoip
|
|
||||||
import json
|
import json
|
||||||
import gzip
|
import gzip
|
||||||
from StringIO import StringIO
|
from StringIO import StringIO
|
||||||
|
|
||||||
|
import pygeoip
|
||||||
|
|
||||||
|
from util import hook, http
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# load region database
|
# load region database
|
||||||
with open("./plugins/data/geoip_regions.json", "rb") as f:
|
with open("./plugins/data/geoip_regions.json", "rb") as f:
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
from util import hook, http
|
|
||||||
import json
|
import json
|
||||||
import urllib2
|
import urllib2
|
||||||
|
|
||||||
|
from util import hook, http
|
||||||
|
|
||||||
|
|
||||||
shortcuts = {"cloudbot": "ClouDev/CloudBot"}
|
shortcuts = {"cloudbot": "ClouDev/CloudBot"}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import random
|
import random
|
||||||
|
|
||||||
from util import hook, http, text
|
from util import hook, http, text
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,7 @@ import re
|
||||||
|
|
||||||
from util import hook, http
|
from util import hook, http
|
||||||
|
|
||||||
|
|
||||||
max_length = 100
|
max_length = 100
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import re
|
import re
|
||||||
|
|
||||||
from util import hook
|
from util import hook
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
from util import hook, http, timeformat
|
|
||||||
from urllib import urlencode
|
from urllib import urlencode
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
from util import hook, http, timeformat
|
||||||
|
|
||||||
|
|
||||||
hulu_re = (r'(.*://)(www.hulu.com|hulu.com)(.*)', re.I)
|
hulu_re = (r'(.*://)(www.hulu.com|hulu.com)(.*)', re.I)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
import json
|
import json
|
||||||
from util import hook
|
|
||||||
from fnmatch import fnmatch
|
from fnmatch import fnmatch
|
||||||
|
|
||||||
|
from util import hook
|
||||||
|
|
||||||
|
|
||||||
@hook.sieve
|
@hook.sieve
|
||||||
def ignore_sieve(bot, input, func, type, args):
|
def ignore_sieve(bot, input, func, type, args):
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
# IMDb lookup plugin by Ghetto Wizard (2011) and blha303 (2013)
|
# IMDb lookup plugin by Ghetto Wizard (2011) and blha303 (2013)
|
||||||
|
|
||||||
from util import hook, http, text
|
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
from util import hook, http, text
|
||||||
|
|
||||||
|
|
||||||
id_re = re.compile("tt\d+")
|
id_re = re.compile("tt\d+")
|
||||||
imdb_re = (r'(.*:)//(imdb.com|www.imdb.com)(:[0-9]+)?(.*)', re.I)
|
imdb_re = (r'(.*:)//(imdb.com|www.imdb.com)(:[0-9]+)?(.*)', re.I)
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
from util import hook, http, web
|
|
||||||
import re
|
import re
|
||||||
import random
|
import random
|
||||||
|
|
||||||
|
from util import hook, http, web
|
||||||
|
|
||||||
|
|
||||||
base_url = "http://reddit.com/r/{}/.json"
|
base_url = "http://reddit.com/r/{}/.json"
|
||||||
imgur_re = re.compile(r'http://(?:i\.)?imgur\.com/(a/)?(\w+\b(?!/))\.?\w?')
|
imgur_re = re.compile(r'http://(?:i\.)?imgur\.com/(a/)?(\w+\b(?!/))\.?\w?')
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
from util import hook, http
|
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
from util import hook, http
|
||||||
|
|
||||||
|
|
||||||
@hook.command(autohelp=False)
|
@hook.command(autohelp=False)
|
||||||
def kernel(inp, reply=None):
|
def kernel(inp, reply=None):
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
from util import hook, textgen
|
|
||||||
import json
|
import json
|
||||||
|
|
||||||
|
from util import hook, textgen
|
||||||
|
|
||||||
|
|
||||||
def get_generator(_json, variables):
|
def get_generator(_json, variables):
|
||||||
data = json.loads(_json)
|
data = json.loads(_json)
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
from util import hook, http, timesince
|
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
|
from util import hook, http, timesince
|
||||||
|
|
||||||
|
|
||||||
api_url = "http://ws.audioscrobbler.com/2.0/?format=json"
|
api_url = "http://ws.audioscrobbler.com/2.0/?format=json"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
from util import hook, http, web, text
|
|
||||||
import time
|
import time
|
||||||
import random
|
import random
|
||||||
|
|
||||||
|
from util import hook, http, web, text
|
||||||
|
|
||||||
|
|
||||||
## CONSTANTS
|
## CONSTANTS
|
||||||
|
|
||||||
base_url = "http://api.bukget.org/3/"
|
base_url = "http://api.bukget.org/3/"
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
""" plugin by _303 (?)
|
""" plugin by _303 (?)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from util import hook
|
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
from util import hook
|
||||||
|
|
||||||
|
|
||||||
pattern = re.compile(r'^(?P<count>\d+)x (?P<name>.+?): (?P<ingredients>.*)$')
|
pattern = re.compile(r'^(?P<count>\d+)x (?P<name>.+?): (?P<ingredients>.*)$')
|
||||||
|
|
||||||
recipelist = []
|
recipelist = []
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
# TODO: Rewrite this whole mess
|
# TODO: Rewrite this whole mess
|
||||||
from util import hook
|
|
||||||
import socket
|
import socket
|
||||||
import struct
|
import struct
|
||||||
import json
|
import json
|
||||||
|
|
||||||
|
from util import hook
|
||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import DNS
|
import DNS
|
||||||
# Please remember to install the dependancy 'pydns'
|
# Please remember to install the dependancy 'pydns'
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
from util import hook, http
|
|
||||||
import json
|
import json
|
||||||
|
|
||||||
|
from util import hook, http
|
||||||
|
|
||||||
|
|
||||||
@hook.command(autohelp=False)
|
@hook.command(autohelp=False)
|
||||||
def mcstatus(inp):
|
def mcstatus(inp):
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
from util import hook, http, text
|
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
from util import hook, http, text
|
||||||
|
|
||||||
|
|
||||||
api_url = "http://minecraft.gamepedia.com/api.php?action=opensearch"
|
api_url = "http://minecraft.gamepedia.com/api.php?action=opensearch"
|
||||||
mc_url = "http://minecraft.gamepedia.com/"
|
mc_url = "http://minecraft.gamepedia.com/"
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
# Plugin by Infinity - <https://github.com/infinitylabs/UguuBot>
|
# Plugin by Infinity - <https://github.com/infinitylabs/UguuBot>
|
||||||
|
|
||||||
import random
|
import random
|
||||||
|
|
||||||
from util import hook, http
|
from util import hook, http
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
from util import hook, text, textgen
|
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
from util import hook, text, textgen
|
||||||
|
|
||||||
|
|
||||||
GEN_DIR = "./plugins/data/name_files/"
|
GEN_DIR = "./plugins/data/name_files/"
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
from util import hook, http, text, web
|
|
||||||
import json
|
import json
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
from util import hook, http, text, web
|
||||||
|
|
||||||
|
|
||||||
## CONSTANTS
|
## CONSTANTS
|
||||||
|
|
||||||
ITEM_URL = "http://www.newegg.com/Product/Product.aspx?Item={}"
|
ITEM_URL = "http://www.newegg.com/Product/Product.aspx?Item={}"
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
import re
|
import re
|
||||||
|
|
||||||
from util import hook, http
|
from util import hook, http
|
||||||
|
|
||||||
|
|
||||||
newgrounds_re = (r'(.*:)//(www.newgrounds.com|newgrounds.com)(:[0-9]+)?(.*)', re.I)
|
newgrounds_re = (r'(.*:)//(www.newgrounds.com|newgrounds.com)(:[0-9]+)?(.*)', re.I)
|
||||||
valid = set('0123456789')
|
valid = set('0123456789')
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
from util import hook
|
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
from util import hook
|
||||||
|
|
||||||
|
|
||||||
db_inited = False
|
db_inited = False
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
from util import hook, http, web
|
|
||||||
from bs4 import BeautifulSoup
|
from bs4 import BeautifulSoup
|
||||||
|
|
||||||
|
from util import hook, http, web
|
||||||
|
|
||||||
|
|
||||||
api_url = "http://osrc.dfm.io/{}/stats"
|
api_url = "http://osrc.dfm.io/{}/stats"
|
||||||
user_url = "http://osrc.dfm.io/{}"
|
user_url = "http://osrc.dfm.io/{}"
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
# TODO: Add some kind of pronounceable password generation
|
# TODO: Add some kind of pronounceable password generation
|
||||||
# TODO: Improve randomness
|
# TODO: Improve randomness
|
||||||
from util import hook
|
|
||||||
import string
|
import string
|
||||||
import random
|
import random
|
||||||
|
|
||||||
|
from util import hook
|
||||||
|
|
||||||
|
|
||||||
@hook.command
|
@hook.command
|
||||||
def password(inp, notice=None):
|
def password(inp, notice=None):
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
# ping plugin by neersighted
|
# ping plugin by neersighted
|
||||||
from util import hook
|
|
||||||
import subprocess
|
import subprocess
|
||||||
import re
|
import re
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
from util import hook
|
||||||
|
|
||||||
|
|
||||||
ping_regex = re.compile(r"(\d+.\d+)/(\d+.\d+)/(\d+.\d+)/(\d+.\d+)")
|
ping_regex = re.compile(r"(\d+.\d+)/(\d+.\d+)/(\d+.\d+)/(\d+.\d+)")
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
# coding=utf-8
|
# coding=utf-8
|
||||||
from util import hook
|
|
||||||
import re
|
import re
|
||||||
import random
|
import random
|
||||||
|
|
||||||
|
from util import hook
|
||||||
|
|
||||||
|
|
||||||
potatoes = ['AC Belmont', 'AC Blue Pride', 'AC Brador', 'AC Chaleur', 'AC Domino', 'AC Dubuc', 'AC Glacier Chip',
|
potatoes = ['AC Belmont', 'AC Blue Pride', 'AC Brador', 'AC Chaleur', 'AC Domino', 'AC Dubuc', 'AC Glacier Chip',
|
||||||
'AC Maple Gold', 'AC Novachip', 'AC Peregrine Red', 'AC Ptarmigan', 'AC Red Island', 'AC Saguenor',
|
'AC Maple Gold', 'AC Novachip', 'AC Peregrine Red', 'AC Ptarmigan', 'AC Red Island', 'AC Saguenor',
|
||||||
'AC Stampede Russet', 'AC Sunbury', 'Abeille', 'Abnaki', 'Acadia', 'Acadia Russet', 'Accent',
|
'AC Stampede Russet', 'AC Sunbury', 'Abeille', 'Abnaki', 'Acadia', 'Acadia Russet', 'Accent',
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
from util import hook, http, timesince
|
|
||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
|
from util import hook, http, timesince
|
||||||
|
|
||||||
|
|
||||||
@hook.command("scene")
|
@hook.command("scene")
|
||||||
@hook.command
|
@hook.command
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
import urllib
|
import urllib
|
||||||
import json
|
import json
|
||||||
import re
|
import re
|
||||||
from util import hook
|
|
||||||
import oauth2 as oauth
|
import oauth2 as oauth
|
||||||
|
|
||||||
|
from util import hook
|
||||||
|
|
||||||
|
|
||||||
def getdata(inp, types, api_key, api_secret):
|
def getdata(inp, types, api_key, api_secret):
|
||||||
consumer = oauth.Consumer(api_key, api_secret)
|
consumer = oauth.Consumer(api_key, api_secret)
|
||||||
|
|
|
@ -5,6 +5,7 @@ import re
|
||||||
|
|
||||||
from util import hook, timesince
|
from util import hook, timesince
|
||||||
|
|
||||||
|
|
||||||
db_ready = False
|
db_ready = False
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
from util import hook, textgen
|
|
||||||
import json
|
import json
|
||||||
|
|
||||||
|
from util import hook, textgen
|
||||||
|
|
||||||
|
|
||||||
def get_generator(_json, variables):
|
def get_generator(_json, variables):
|
||||||
data = json.loads(_json)
|
data = json.loads(_json)
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
from util import hook, text
|
|
||||||
import random
|
import random
|
||||||
|
|
||||||
|
from util import hook, text
|
||||||
|
|
||||||
|
|
||||||
with open("plugins/data/slogans.txt") as f:
|
with open("plugins/data/slogans.txt") as f:
|
||||||
slogans = [line.strip() for line in f.readlines()
|
slogans = [line.strip() for line in f.readlines()
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
from util import hook, http, web, text
|
|
||||||
from urllib import urlencode
|
from urllib import urlencode
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
from util import hook, http, web, text
|
||||||
|
|
||||||
|
|
||||||
sc_re = (r'(.*:)//(www.)?(soundcloud.com)(.*)', re.I)
|
sc_re = (r'(.*:)//(www.)?(soundcloud.com)(.*)', re.I)
|
||||||
api_url = "http://api.soundcloud.com"
|
api_url = "http://api.soundcloud.com"
|
||||||
sndsc_re = (r'(.*:)//(www.)?(snd.sc)(.*)', re.I)
|
sndsc_re = (r'(.*:)//(www.)?(snd.sc)(.*)', re.I)
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
from util import hook
|
|
||||||
from enchant.checker import SpellChecker
|
from enchant.checker import SpellChecker
|
||||||
|
|
||||||
import enchant
|
import enchant
|
||||||
|
|
||||||
|
from util import hook
|
||||||
|
|
||||||
|
|
||||||
locale = "en_US"
|
locale = "en_US"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import re
|
import re
|
||||||
|
from urllib import urlencode
|
||||||
|
|
||||||
from util import hook, http, web
|
from util import hook, http, web
|
||||||
from urllib import urlencode
|
|
||||||
|
|
||||||
gateway = 'http://open.spotify.com/{}/{}' # http spotify gw address
|
gateway = 'http://open.spotify.com/{}/{}' # http spotify gw address
|
||||||
spuri = 'spotify:{}:{}'
|
spuri = 'spotify:{}:{}'
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
from bs4 import BeautifulSoup, NavigableString, Tag
|
||||||
|
|
||||||
from util import hook, http, web
|
from util import hook, http, web
|
||||||
from util.text import truncate_str
|
from util.text import truncate_str
|
||||||
from bs4 import BeautifulSoup, NavigableString, Tag
|
|
||||||
|
|
||||||
|
|
||||||
steam_re = (r'(.*:)//(store.steampowered.com)(:[0-9]+)?(.*)', re.I)
|
steam_re = (r'(.*:)//(store.steampowered.com)(:[0-9]+)?(.*)', re.I)
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
from util import hook, http, text
|
|
||||||
import csv
|
import csv
|
||||||
import StringIO
|
import StringIO
|
||||||
|
|
||||||
|
from util import hook, http, text
|
||||||
|
|
||||||
|
|
||||||
gauge_url = "http://www.mysteamgauge.com/search?username={}"
|
gauge_url = "http://www.mysteamgauge.com/search?username={}"
|
||||||
|
|
||||||
api_url = "http://mysteamgauge.com/user/{}.csv"
|
api_url = "http://mysteamgauge.com/user/{}.csv"
|
||||||
|
|
|
@ -2,9 +2,10 @@ import os
|
||||||
import re
|
import re
|
||||||
import time
|
import time
|
||||||
import platform
|
import platform
|
||||||
from util import hook
|
|
||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
|
|
||||||
|
from util import hook
|
||||||
|
|
||||||
|
|
||||||
def convert_kilobytes(kilobytes):
|
def convert_kilobytes(kilobytes):
|
||||||
if kilobytes >= 1024:
|
if kilobytes >= 1024:
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
from util import hook, http
|
|
||||||
import time
|
import time
|
||||||
|
|
||||||
|
from util import hook, http
|
||||||
from util.text import capitalize_first
|
from util.text import capitalize_first
|
||||||
|
|
||||||
|
|
||||||
api_url = 'http://api.wolframalpha.com/v2/query?format=plaintext'
|
api_url = 'http://api.wolframalpha.com/v2/query?format=plaintext'
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
from util import hook, http, urlnorm
|
|
||||||
from bs4 import BeautifulSoup
|
from bs4 import BeautifulSoup
|
||||||
|
|
||||||
|
from util import hook, http, urlnorm
|
||||||
|
|
||||||
|
|
||||||
@hook.command
|
@hook.command
|
||||||
def title(inp):
|
def title(inp):
|
||||||
|
|
|
@ -9,6 +9,7 @@ from zipfile import ZipFile
|
||||||
from cStringIO import StringIO
|
from cStringIO import StringIO
|
||||||
|
|
||||||
from lxml import etree
|
from lxml import etree
|
||||||
|
|
||||||
from util import hook, http
|
from util import hook, http
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
import re
|
import re
|
||||||
from util import hook, http
|
|
||||||
from HTMLParser import HTMLParser
|
from HTMLParser import HTMLParser
|
||||||
|
|
||||||
|
from util import hook, http
|
||||||
|
|
||||||
|
|
||||||
twitch_re = (r'(.*:)//(twitch.tv|www.twitch.tv)(:[0-9]+)?(.*)', re.I)
|
twitch_re = (r'(.*:)//(twitch.tv|www.twitch.tv)(:[0-9]+)?(.*)', re.I)
|
||||||
multitwitch_re = (r'(.*:)//(www.multitwitch.tv|multitwitch.tv)/(.*)', re.I)
|
multitwitch_re = (r'(.*:)//(www.multitwitch.tv|multitwitch.tv)/(.*)', re.I)
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,12 @@
|
||||||
from util import hook, timesince
|
|
||||||
import tweepy
|
|
||||||
import re
|
import re
|
||||||
import random
|
import random
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
|
import tweepy
|
||||||
|
|
||||||
|
from util import hook, timesince
|
||||||
|
|
||||||
|
|
||||||
TWITTER_RE = (r"(?:(?:www.twitter.com|twitter.com)/(?:[-_a-zA-Z0-9]+)/status/)([0-9]+)", re.I)
|
TWITTER_RE = (r"(?:(?:www.twitter.com|twitter.com)/(?:[-_a-zA-Z0-9]+)/status/)([0-9]+)", re.I)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
from util import hook, http, text
|
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
from util import hook, http, text
|
||||||
|
|
||||||
|
|
||||||
base_url = 'http://www.urbandictionary.com/iphone/search/define'
|
base_url = 'http://www.urbandictionary.com/iphone/search/define'
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
from util import hook, text
|
|
||||||
import hashlib
|
import hashlib
|
||||||
import collections
|
import collections
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
from util import hook, text
|
||||||
|
|
||||||
|
|
||||||
# variables
|
# variables
|
||||||
|
|
||||||
colors = collections.OrderedDict([
|
colors = collections.OrderedDict([
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
from util import hook, http, web
|
|
||||||
import json
|
import json
|
||||||
import urllib2
|
import urllib2
|
||||||
|
|
||||||
|
from util import hook, http, web
|
||||||
|
|
||||||
|
|
||||||
def get_sound_info(game, search):
|
def get_sound_info(game, search):
|
||||||
search = search.replace(" ", "+")
|
search = search.replace(" ", "+")
|
||||||
|
|
Reference in New Issue