about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2021-08-10 04:16:22 -0700
committerKartik K. Agaram <vc@akkartik.com>2021-08-10 04:16:22 -0700
commitd94eb48b92dd6f98a79ede01394f6369372813e5 (patch)
treee2e56c6eb0edac413bddb607afbbb4980d84da1f
parentcb38fc348ba8493dcf202fbb4ff2697a0f955e67 (diff)
downloadmu-d94eb48b92dd6f98a79ede01394f6369372813e5.tar.gz
.
-rw-r--r--browse_slack/convert_slack.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/browse_slack/convert_slack.py b/browse_slack/convert_slack.py
index 99a4af1b..84358d2d 100644
--- a/browse_slack/convert_slack.py
+++ b/browse_slack/convert_slack.py
@@ -32,6 +32,8 @@ from os import listdir
 from os.path import isfile, join, basename, splitext
 from urllib.parse import urlparse
 
+channels = {channel['id']: channel['name'] for channel in json.load(open('channels.json'))}
+
 items = []
 
 def look_up_ppm_image(url):
@@ -57,8 +59,6 @@ def load_users():
                 user_id[user['id']] = length
                 length += 1
 
-channels = {channel['id']: channel['name'] for channel in json.load(open('channels.json'))}
-
 def contents(filename):
     with open(filename) as f:
         for item in json.load(f):