display cleanup, readme update
TIGHTENING UP SOME GRAPHICS also catching blank message for feedback and updating the docs and adding date printing to redraw/bannermaster
parent
b144a1a7d9
commit
84700451c7
11
README.html
11
README.html
|
@ -5,8 +5,9 @@ this project.</p>
|
|||
|
||||
<p>to use, run <code>~endorphant/bin/ttbp</code> while logged in to tilde.town</p>
|
||||
|
||||
<p>you can also try <code>~endorphant/bin/ttbp-beta</code> for a more unstable, bleeding-edge
|
||||
experience.</p>
|
||||
<p>you can also try <code>~endorphant/bin/ttbp-beta</code> for a more colorful, but
|
||||
potentially volatile experience; i sometimes announce in irc or on twitter when
|
||||
i’m testing a new feature.</p>
|
||||
|
||||
<h3>writing entries</h3>
|
||||
|
||||
|
@ -77,10 +78,14 @@ you can safely put custom HTML elements!</li>
|
|||
</ul>
|
||||
|
||||
|
||||
<h3>general tips</h3>
|
||||
<h3>general tips/troubleshooting</h3>
|
||||
|
||||
<ul>
|
||||
<li>add <code>alias ttbp="~endorphant/bin/ttbp"</code> to your .bash_aliases for fewer keystrokes</li>
|
||||
<li>(similarly, <code>alias ttbp-beta="~endorphant/bin/ttbp-beta"</code>)</li>
|
||||
<li>if the date looks like it’s ahead or behind, it’s because you haven’t set
|
||||
your local timezone yet. here are some
|
||||
<a href="timezone%0Asetting%20instructions">http://www.cyberciti.biz/faq/linux-unix-set-tz-environment-variable/</a>.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
|
12
README.md
12
README.md
|
@ -5,8 +5,9 @@ this project.
|
|||
|
||||
to use, run `~endorphant/bin/ttbp` while logged in to tilde.town
|
||||
|
||||
you can also try `~endorphant/bin/ttbp-beta` for a more unstable, bleeding-edge
|
||||
experience.
|
||||
you can also try `~endorphant/bin/ttbp-beta` for a more colorful, but
|
||||
potentially volatile experience; i sometimes announce in irc or on twitter when
|
||||
i'm testing a new feature.
|
||||
|
||||
### writing entries
|
||||
|
||||
|
@ -63,9 +64,14 @@ this.**
|
|||
you can safely put custom HTML elements!
|
||||
* to modify the page footer, edit your ~/.ttbp/config/footer.txt
|
||||
|
||||
### general tips
|
||||
### general tips/troubleshooting
|
||||
|
||||
* add `alias ttbp="~endorphant/bin/ttbp"` to your .bash_aliases for fewer keystrokes
|
||||
* (similarly, `alias ttbp-beta="~endorphant/bin/ttbp-beta"`)
|
||||
* if the date looks like it's ahead or behind, it's because you haven't set
|
||||
your local timezone yet. here are some
|
||||
[http://www.cyberciti.biz/faq/linux-unix-set-tz-environment-variable/](timezone
|
||||
setting instructions).
|
||||
|
||||
### future features
|
||||
|
||||
|
|
31
bin/_ttbp.py
31
bin/_ttbp.py
|
@ -94,6 +94,7 @@ def redraw(leftover=""):
|
|||
|
||||
os.system("clear")
|
||||
print(BANNER)
|
||||
print("\t\ttoday is "+ time.strftime("%d %B %Y"))
|
||||
print(SPACER)
|
||||
if leftover:
|
||||
print("> "+leftover+"\n")
|
||||
|
@ -329,7 +330,7 @@ def main_menu():
|
|||
"see credits",
|
||||
"read documentation"]
|
||||
|
||||
print("you're at ttbp home. remember, you can always press <ctrl-c> to come back here.\n\n")
|
||||
print("you're at ttbp home. remember, you can always press <ctrl-c> to come back here.\n")
|
||||
util.print_menu(menuOptions, RAINBOW)
|
||||
|
||||
try:
|
||||
|
@ -345,18 +346,18 @@ def main_menu():
|
|||
core.www_neighbors()
|
||||
elif choice == '1':
|
||||
if core.publishing():
|
||||
intro = "here are some options for reviewing your feels:\n"
|
||||
intro = "here are some options for reviewing your feels:"
|
||||
redraw(intro)
|
||||
review_menu(intro)
|
||||
else:
|
||||
redraw("your recorded feels, listed by date:\n")
|
||||
redraw("your recorded feels, listed by date:")
|
||||
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")
|
||||
redraw("the following "+p.no("user", len(users))+" "+p.plural("is", len(users))+" recording feels on ttbp:")
|
||||
view_neighbors(users)
|
||||
elif choice == '3':
|
||||
redraw("most recent global entries\n")
|
||||
redraw("most recent global entries")
|
||||
view_feed()
|
||||
elif choice == '4':
|
||||
graffiti_handler()
|
||||
|
@ -368,7 +369,7 @@ def main_menu():
|
|||
redraw(EJECT)
|
||||
redraw()
|
||||
elif choice == '6':
|
||||
redraw("you're about to send mail to ~endorphant about ttbp\n")
|
||||
redraw("you're about to send mail to ~endorphant about ttbp")
|
||||
feedback_menu()
|
||||
elif choice == '7':
|
||||
redraw()
|
||||
|
@ -410,7 +411,7 @@ press <enter> to open an external text editor. mail will be sent once you save a
|
|||
|
||||
return feedback_menu()
|
||||
|
||||
def review_menu(intro):
|
||||
def review_menu(intro=""):
|
||||
'''
|
||||
submenu for reviewing feels.
|
||||
'''
|
||||
|
@ -426,10 +427,10 @@ def review_menu(intro):
|
|||
|
||||
if choice is not False:
|
||||
if choice == 0:
|
||||
redraw("your recorded feels, listed by date:\n")
|
||||
redraw("your recorded feels, listed by date:")
|
||||
view_feels(USER)
|
||||
elif choice == 1:
|
||||
redraw("here's your current nopub status:\n")
|
||||
redraw("here's your current nopub status:")
|
||||
set_nopubs()
|
||||
else:
|
||||
redraw()
|
||||
|
@ -628,6 +629,7 @@ def send_feedback(entered, subject="none"):
|
|||
subprocess.call([SETTINGS["editor"], temp.name])
|
||||
message = open(temp.name, 'r').read()
|
||||
|
||||
if message:
|
||||
id = "#"+util.genID(3)
|
||||
mail = MIMEText(message)
|
||||
mail['To'] = FEEDBOX
|
||||
|
@ -637,10 +639,17 @@ def send_feedback(entered, subject="none"):
|
|||
m.write(mail.as_string())
|
||||
m.close()
|
||||
|
||||
return """\
|
||||
exit = """\
|
||||
thanks for writing! for your reference, it's been recorded
|
||||
> as """+ " ".join([subject, id])+""". i'll try to respond to you soon.\
|
||||
"""
|
||||
else:
|
||||
exit = """\
|
||||
i didn't send your blank message. if you made a mistake, please try
|
||||
running through the feedback option again!\
|
||||
"""
|
||||
|
||||
return exit
|
||||
|
||||
def list_entries(metas, entries, prompt):
|
||||
'''
|
||||
|
@ -712,7 +721,7 @@ def graffiti_handler():
|
|||
'''
|
||||
|
||||
if os.path.isfile(WALL_LOCK):
|
||||
redraw("sorry, "+chatter.say("friend")+", but someone's there right now. try again in a few!\n")
|
||||
redraw("sorry, "+chatter.say("friend")+", but someone's there right now. try again in a few!")
|
||||
else:
|
||||
subprocess.call(["touch", WALL_LOCK])
|
||||
redraw()
|
||||
|
|
Loading…
Reference in New Issue