aboutsummaryrefslogtreecommitdiffstats
path: root/extract_token_from_browser.py
diff options
context:
space:
mode:
Diffstat (limited to 'extract_token_from_browser.py')
-rwxr-xr-xextract_token_from_browser.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/extract_token_from_browser.py b/extract_token_from_browser.py
index 7a9f09d..d571120 100755
--- a/extract_token_from_browser.py
+++ b/extract_token_from_browser.py
@@ -45,7 +45,11 @@ local_config_str = con.execute(local_storage_query).fetchone()[0]
con.close()
local_config = json.loads(local_config_str)
-
-for team in local_config["teams"].values():
- if not team["id"].startswith("E"):
- print(f"{team['name']}: /slack register {team['token']}:{cookie_d_value}")
+teams = [
+ team for team in local_config["teams"].values() if not team["id"].startswith("E")
+]
+register_commands = [
+ f"{team['name']}:\n/slack register {team['token']}:{cookie_d_value}"
+ for team in teams
+]
+print("\n\n".join(register_commands))