forked from endorphant/ttbp
adding some feels count checks
parent
d646175312
commit
7c85c0b689
48
ttbp/ttbp.py
48
ttbp/ttbp.py
|
@ -540,14 +540,11 @@ def main_menu():
|
||||||
write_entry(os.path.join(config.USER_DATA, today+".txt"))
|
write_entry(os.path.join(config.USER_DATA, today+".txt"))
|
||||||
core.www_neighbors()
|
core.www_neighbors()
|
||||||
elif choice == '1':
|
elif choice == '1':
|
||||||
if len(os.listdir(config.USER_DATA)) > 0:
|
intro = "here are some options for managing your feels:"
|
||||||
intro = "here are some options for managing your feels:"
|
redraw(intro)
|
||||||
redraw(intro)
|
review_menu(intro)
|
||||||
review_menu(intro)
|
core.load_files()
|
||||||
core.load_files()
|
core.write("index.html")
|
||||||
core.write("index.html")
|
|
||||||
else:
|
|
||||||
redraw("you don't have any feels to manage, "+chatter.say("friend"))
|
|
||||||
elif choice == '2':
|
elif choice == '2':
|
||||||
users = core.find_ttbps()
|
users = core.find_ttbps()
|
||||||
prompt = "the following {usercount} {are} recording feels on ttbp:".format(
|
prompt = "the following {usercount} {are} recording feels on ttbp:".format(
|
||||||
|
@ -616,7 +613,8 @@ def review_menu(intro=""):
|
||||||
"modify feels publishing",
|
"modify feels publishing",
|
||||||
"backup your feels",
|
"backup your feels",
|
||||||
"delete feels by day",
|
"delete feels by day",
|
||||||
"purge all feels"
|
"purge all feels",
|
||||||
|
"import a feels backup",
|
||||||
]
|
]
|
||||||
|
|
||||||
util.print_menu(menuOptions, SETTINGS.get("rainbows", False))
|
util.print_menu(menuOptions, SETTINGS.get("rainbows", False))
|
||||||
|
@ -624,22 +622,38 @@ def review_menu(intro=""):
|
||||||
choice = util.list_select(menuOptions, "what would you like to do with your feels? (or 'back' to return home) ")
|
choice = util.list_select(menuOptions, "what would you like to do with your feels? (or 'back' to return home) ")
|
||||||
|
|
||||||
top = ""
|
top = ""
|
||||||
|
hasfeels = len(os.listdir(config.USER_DATA)) > 0
|
||||||
|
nofeels = "you don't have any feels to work with, "+chatter.say("friend")+"\n\n> "
|
||||||
|
|
||||||
if choice is not False:
|
if choice is not False:
|
||||||
if choice == 0:
|
if choice == 0:
|
||||||
redraw("your recorded feels, listed by date:")
|
if hasfeels:
|
||||||
view_feels(config.USER)
|
redraw("your recorded feels, listed by date:")
|
||||||
|
view_feels(config.USER)
|
||||||
|
else:
|
||||||
|
top = nofeels
|
||||||
elif choice == 1:
|
elif choice == 1:
|
||||||
redraw("publishing status of your feels:")
|
if hasfeels:
|
||||||
list_nopubs(config.USER)
|
redraw("publishing status of your feels:")
|
||||||
|
list_nopubs(config.USER)
|
||||||
|
else:
|
||||||
|
top = nofeels
|
||||||
elif choice == 2:
|
elif choice == 2:
|
||||||
redraw("FEELS BACKUP")
|
if hasfeels:
|
||||||
backup_feels()
|
redraw("FEELS BACKUP")
|
||||||
|
backup_feels()
|
||||||
|
else:
|
||||||
|
top = nofeels
|
||||||
elif choice == 3:
|
elif choice == 3:
|
||||||
top = DUST
|
top = DUST
|
||||||
elif choice == 4:
|
elif choice == 4:
|
||||||
redraw("!!!PURGING ALL FEELS!!!")
|
if hasfeels:
|
||||||
purge_feels()
|
redraw("!!!PURGING ALL FEELS!!!")
|
||||||
|
purge_feels()
|
||||||
|
else:
|
||||||
|
top = nofeels
|
||||||
|
elif choice == 5:
|
||||||
|
top = DUST
|
||||||
else:
|
else:
|
||||||
redraw()
|
redraw()
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue