forked from endorphant/ttbp
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.master
parent
758a10a123
commit
9541a7c3ae
39
bin/_ttbp.py
39
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 <enter> 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
|
||||
|
|
Loading…
Reference in New Issue