Skip to content

Commit

Permalink
Added WoWI autocompetion
Browse files Browse the repository at this point in the history
  • Loading branch information
AcidWeb committed Sep 11, 2019
1 parent 316377c commit f7ef661
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CB/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = '2.2.1'
__version__ = '2.3.0'
__license__ = 'GPLv3'
__copyright__ = '2019, Paweł Jastrzębski <[email protected]>'
__docformat__ = 'restructuredtext en'
Expand Down
8 changes: 7 additions & 1 deletion CurseBreaker.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ def __init__(self):
self.tableData = None
self.table = None
self.cfSlugs = None
self.wowiSlugs = None
self.completer = None
self.chandle = windll.kernel32.GetStdHandle(-11)
sys.tracebacklimit = 0
Expand Down Expand Up @@ -191,13 +192,16 @@ def setup_console(self, buffer=False):
os.system('mode con: cols=100 lines=50')

def setup_completer(self):
if not self.cfSlugs:
if not self.cfSlugs or not self.wowiSlugs:
# noinspection PyBroadException
try:
self.cfSlugs = pickle.load(gzip.open(io.BytesIO(
requests.get('https://storage.googleapis.com/cursebreaker/cfslugs.pickle.gz').content)))
self.wowiSlugs = pickle.load(gzip.open(io.BytesIO(
requests.get('https://storage.googleapis.com/cursebreaker/wowislugs.pickle.gz').content)))
except Exception:
self.cfSlugs = []
self.wowiSlugs = []
commands = ['install', 'uninstall', 'update', 'force_update', 'wa_update', 'status', 'orphans', 'search',
'toggle_backup', 'toggle_dev', 'toggle_wa', 'set_wa_api', 'set_wa_wow_account', 'uri_integration',
'help', 'exit']
Expand All @@ -207,6 +211,8 @@ def setup_completer(self):
f'toggle_dev {addon["Name"]}', f'status {addon["Name"]}'])
for item in self.cfSlugs:
commands.append(f'install cf:{item}')
for item in self.wowiSlugs:
commands.append(f'install wowi:{item}')
commands.extend(['install ElvUI', 'install ElvUI:Dev', 'install TukUI'])
wa = WeakAuraUpdater('', '', '')
accounts = wa.get_accounts()
Expand Down

0 comments on commit f7ef661

Please sign in to comment.