From 80d1d93d9d8d6d08287d7b0901ae0c7ccb4d1886 Mon Sep 17 00:00:00 2001 From: endorphant Date: Fri, 12 Oct 2018 21:34:10 -0400 Subject: [PATCH] adding subscription menu stub --- ttbp/ttbp.py | 43 ++++++++++++++++++++++++++++++++++++++----- 1 file changed, 38 insertions(+), 5 deletions(-) diff --git a/ttbp/ttbp.py b/ttbp/ttbp.py index 5658c5a..3db1cc8 100644 --- a/ttbp/ttbp.py +++ b/ttbp/ttbp.py @@ -529,10 +529,11 @@ def main_menu(): ''' menuOptions = [ - "record your feels", + "record some feels", "manage your feels", "check out your neighbors", "browse global feels", + "visit your subscriptions", "scribble some graffiti", "change your settings", "send some feedback", @@ -569,17 +570,21 @@ def main_menu(): redraw("most recent global entries") view_global_feed() elif choice == '4': - graffiti_handler() + intro = "here are some options for managing your subscriptions" + redraw(intro) + subscription_handler(intro) elif choice == '5': + graffiti_handler() + elif choice == '6': redraw("now changing your settings. press if you didn't mean to do this.") core.load(setup()) # reload settings to core - elif choice == '6': + elif choice == '7': redraw("you're about to send mail to ~endorphant about ttbp") feedback_menu() - elif choice == '7': + elif choice == '8': redraw() show_credits() - elif choice == '8': + elif choice == '9': subprocess.call(["lynx", os.path.join(config.INSTALL_PATH, "..", "doc", "manual.html")]) redraw() elif choice in QUITS: @@ -690,6 +695,34 @@ def review_menu(intro=""): redraw(top+intro) return review_menu(intro) +def subscription_handler(intro=""): + ''' + submenu for managing subscriptions + ''' + + menuOptions = [ + "view subscribed feed", + "manage subscriptions" + ] + + util.print_menu(menuOptions, SETTINGS.get("rainbows", False)) + + choice = util.list_select(menuOptions, "what would you like to do with your subscriptions? (or 'q' to return home) ") + + top = "" + + if choice is not False: + if choice == 0: + print(DUST) + elif choice == 1: + print(DUST) + else: + redraw() + return + + redraw(top+intro) + return subscription_handler(intro) + def view_neighbors(users, prompt): ''' generates list of all users on ttbp, sorted by most recent post