From 9541a7c3aecf41bfe99b8158c208c3298607d4bf Mon Sep 17 00:00:00 2001 From: endorphant Date: Tue, 31 May 2016 15:31:02 -0400 Subject: [PATCH] adding extended feels review options sketching out a submenu format, and testing it by making a new feels reviewing option. if the user is publishing, review feels now includes the option to modify publishing settings for individual entries (which is a function yet to be written.) maybe i'll remember to document this to make a guide for adding new submenus. --- bin/_ttbp.py | 39 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 3 deletions(-) diff --git a/bin/_ttbp.py b/bin/_ttbp.py index 8e61694..ad841d7 100644 --- a/bin/_ttbp.py +++ b/bin/_ttbp.py @@ -344,8 +344,12 @@ def main_menu(): write_entry(os.path.join(DATA, today+".txt")) core.www_neighbors() elif choice == '1': - redraw("your recorded feels, listed by date:\n") - view_feels(USER) + if core.publishing(): + redraw("here are some options for reviewing your feels:\n") + review_menu() + else: + redraw("your recorded feels, listed by date:\n") + view_feels(USER) elif choice == '2': users = core.find_ttbps() redraw("the following "+p.no("user", len(users))+" "+p.plural("is", len(users))+" recording feels on ttbp:\n") @@ -386,7 +390,6 @@ def feedback_menu(): * calls feedback writing function ''' - util.print_menu(SUBJECTS, RAINBOW) choice = raw_input("\npick a category for your feedback: ") @@ -406,6 +409,36 @@ press to open an external text editor. mail will be sent once you save a return feedback_menu() +def review_menu(): + ''' + submenu for reviewing feels. + ''' + + menuOptions = [ + "read over feels", + "modify feels publishing" + ] + + util.print_menu(menuOptions, RAINBOW) + + choice = util.list_select(menuOptions, "what would you like to do with your feels? (or 'back' to return home) ") + + left = "" + + if choice is not False: + if choice == 0: + redraw("your recorded feels, listed by date:\n") + view_feels(USER) + elif choice == 1: + left = DUST+"\n> " + else: + redraw() + return + + redraw(left+"here are some options for reviewing your feels:\n") + return review_menu() + + def view_neighbors(users): ''' generates list of all users on ttbp, sorted by most recent post