From 0cbb1836becae36c1570a1fd3e0cfd6734f241a4 Mon Sep 17 00:00:00 2001 From: endorphant Date: Tue, 3 May 2016 13:52:07 -0400 Subject: [PATCH] sorting user list in preparation for neighbor browsing --- bin/ttbp.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/ttbp.py b/bin/ttbp.py index b85c670..b4436a4 100644 --- a/bin/ttbp.py +++ b/bin/ttbp.py @@ -307,6 +307,8 @@ def send_feedback(subject="none", mailbox=os.path.join(FEEDBACK, USER+"-"+time.s def view_neighbors(users): + userList = [] + for user in users: userRC = json.load(open(os.path.join("/home", user, ".ttbp", "config", "ttbprc"))) url = LIVE+user+"/"+userRC["publish dir"] @@ -320,7 +322,10 @@ def view_neighbors(users): user = "~"+user if len(user) < 8: user += "\t" - print("\t"+user+"\t"+url+pad+"\t("+p.no("feel", count)+")") + userList.append("\t"+user+"\t"+url+pad+"\t("+p.no("feel", count)+")") + + userList.sort() + print_menu(userList) raw_input("\n\npress to go back home.\n\n") redraw()