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>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
|
<p>you can also try <code>~endorphant/bin/ttbp-beta</code> for a more colorful, but
|
||||||
experience.</p>
|
potentially volatile experience; i sometimes announce in irc or on twitter when
|
||||||
|
i’m testing a new feature.</p>
|
||||||
|
|
||||||
<h3>writing entries</h3>
|
<h3>writing entries</h3>
|
||||||
|
|
||||||
|
@ -77,10 +78,14 @@ you can safely put custom HTML elements!</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
<h3>general tips</h3>
|
<h3>general tips/troubleshooting</h3>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li>add <code>alias ttbp="~endorphant/bin/ttbp"</code> to your .bash_aliases for fewer keystrokes</li>
|
<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>
|
</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
|
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
|
you can also try `~endorphant/bin/ttbp-beta` for a more colorful, but
|
||||||
experience.
|
potentially volatile experience; i sometimes announce in irc or on twitter when
|
||||||
|
i'm testing a new feature.
|
||||||
|
|
||||||
### writing entries
|
### writing entries
|
||||||
|
|
||||||
|
@ -63,9 +64,14 @@ this.**
|
||||||
you can safely put custom HTML elements!
|
you can safely put custom HTML elements!
|
||||||
* to modify the page footer, edit your ~/.ttbp/config/footer.txt
|
* 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
|
* 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
|
### future features
|
||||||
|
|
||||||
|
|
49
bin/_ttbp.py
49
bin/_ttbp.py
|
@ -94,6 +94,7 @@ def redraw(leftover=""):
|
||||||
|
|
||||||
os.system("clear")
|
os.system("clear")
|
||||||
print(BANNER)
|
print(BANNER)
|
||||||
|
print("\t\ttoday is "+ time.strftime("%d %B %Y"))
|
||||||
print(SPACER)
|
print(SPACER)
|
||||||
if leftover:
|
if leftover:
|
||||||
print("> "+leftover+"\n")
|
print("> "+leftover+"\n")
|
||||||
|
@ -329,7 +330,7 @@ def main_menu():
|
||||||
"see credits",
|
"see credits",
|
||||||
"read documentation"]
|
"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)
|
util.print_menu(menuOptions, RAINBOW)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -345,18 +346,18 @@ def main_menu():
|
||||||
core.www_neighbors()
|
core.www_neighbors()
|
||||||
elif choice == '1':
|
elif choice == '1':
|
||||||
if core.publishing():
|
if core.publishing():
|
||||||
intro = "here are some options for reviewing your feels:\n"
|
intro = "here are some options for reviewing your feels:"
|
||||||
redraw(intro)
|
redraw(intro)
|
||||||
review_menu(intro)
|
review_menu(intro)
|
||||||
else:
|
else:
|
||||||
redraw("your recorded feels, listed by date:\n")
|
redraw("your recorded feels, listed by date:")
|
||||||
view_feels(USER)
|
view_feels(USER)
|
||||||
elif choice == '2':
|
elif choice == '2':
|
||||||
users = core.find_ttbps()
|
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)
|
view_neighbors(users)
|
||||||
elif choice == '3':
|
elif choice == '3':
|
||||||
redraw("most recent global entries\n")
|
redraw("most recent global entries")
|
||||||
view_feed()
|
view_feed()
|
||||||
elif choice == '4':
|
elif choice == '4':
|
||||||
graffiti_handler()
|
graffiti_handler()
|
||||||
|
@ -368,7 +369,7 @@ def main_menu():
|
||||||
redraw(EJECT)
|
redraw(EJECT)
|
||||||
redraw()
|
redraw()
|
||||||
elif choice == '6':
|
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()
|
feedback_menu()
|
||||||
elif choice == '7':
|
elif choice == '7':
|
||||||
redraw()
|
redraw()
|
||||||
|
@ -410,7 +411,7 @@ press <enter> to open an external text editor. mail will be sent once you save a
|
||||||
|
|
||||||
return feedback_menu()
|
return feedback_menu()
|
||||||
|
|
||||||
def review_menu(intro):
|
def review_menu(intro=""):
|
||||||
'''
|
'''
|
||||||
submenu for reviewing feels.
|
submenu for reviewing feels.
|
||||||
'''
|
'''
|
||||||
|
@ -426,10 +427,10 @@ def review_menu(intro):
|
||||||
|
|
||||||
if choice is not False:
|
if choice is not False:
|
||||||
if choice == 0:
|
if choice == 0:
|
||||||
redraw("your recorded feels, listed by date:\n")
|
redraw("your recorded feels, listed by date:")
|
||||||
view_feels(USER)
|
view_feels(USER)
|
||||||
elif choice == 1:
|
elif choice == 1:
|
||||||
redraw("here's your current nopub status:\n")
|
redraw("here's your current nopub status:")
|
||||||
set_nopubs()
|
set_nopubs()
|
||||||
else:
|
else:
|
||||||
redraw()
|
redraw()
|
||||||
|
@ -628,19 +629,27 @@ def send_feedback(entered, subject="none"):
|
||||||
subprocess.call([SETTINGS["editor"], temp.name])
|
subprocess.call([SETTINGS["editor"], temp.name])
|
||||||
message = open(temp.name, 'r').read()
|
message = open(temp.name, 'r').read()
|
||||||
|
|
||||||
id = "#"+util.genID(3)
|
if message:
|
||||||
mail = MIMEText(message)
|
id = "#"+util.genID(3)
|
||||||
mail['To'] = FEEDBOX
|
mail = MIMEText(message)
|
||||||
mail['From'] = USER+"@tilde.town"
|
mail['To'] = FEEDBOX
|
||||||
mail['Subject'] = " ".join(["[ttbp]", subject, id])
|
mail['From'] = USER+"@tilde.town"
|
||||||
m = os.popen("/usr/sbin/sendmail -t -oi", 'w')
|
mail['Subject'] = " ".join(["[ttbp]", subject, id])
|
||||||
m.write(mail.as_string())
|
m = os.popen("/usr/sbin/sendmail -t -oi", 'w')
|
||||||
m.close()
|
m.write(mail.as_string())
|
||||||
|
m.close()
|
||||||
|
|
||||||
return """\
|
exit = """\
|
||||||
thanks for writing! for your reference, it's been recorded
|
thanks for writing! for your reference, it's been recorded
|
||||||
> as """+ " ".join([subject, id])+""". i'll try to respond to you soon.\
|
> 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):
|
def list_entries(metas, entries, prompt):
|
||||||
'''
|
'''
|
||||||
|
@ -712,7 +721,7 @@ def graffiti_handler():
|
||||||
'''
|
'''
|
||||||
|
|
||||||
if os.path.isfile(WALL_LOCK):
|
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:
|
else:
|
||||||
subprocess.call(["touch", WALL_LOCK])
|
subprocess.call(["touch", WALL_LOCK])
|
||||||
redraw()
|
redraw()
|
||||||
|
|
Loading…
Reference in New Issue