breaking out static text

master
Vincent Zeng 2018-03-11 20:17:20 -04:00
parent 782c86d66c
commit f117f6998f
2 changed files with 44 additions and 37 deletions

View File

@ -1,6 +1,7 @@
from __future__ import absolute_import from __future__ import absolute_import
import os import os
import sys import sys
import time
from .. import util from .. import util
@ -82,10 +83,44 @@ ___________________________________________________________
| ____ ____ ____ _ ____ ____ _ _ ____ _ _ _ ____ | | ____ ____ ____ _ ____ ____ _ _ ____ _ _ _ ____ |
| |___ |___ |___ | [__ |___ |\ | | __ | |\ | |___ | | |___ |___ |___ | [__ |___ |\ | | __ | |\ | |___ |
| | |___ |___ |___ ___] |___ | \| |__] | | \| |___ | | | |___ |___ |___ ___] |___ | \| |__] | | \| |___ |
| ver 0.11.2 (rainbows) | | ver 0.11.3 (rainbows) |
|__________________________________________________________| |__________________________________________________________|
'''.lstrip() '''.lstrip()
## page texts
credits = """
ttbp was written for tilde.town by ~endorphant in python. the codebase is
publicly available on github at https://github.com/modgethanc/ttbp
other contributors:
~vilmibm, packaging help and gopher support
~sanqui, the bug swatter
~sinacutie, for css updates
if you have ideas for ttbp, you are welcome to contact me to discuss them;
please send me tildemail or open a github issue. i am not a very experienced
developer, and ttbp is one of my first public-facing projects, so i appreciate
your patience while i learn how to be a better developer!
i'd love to hear about your ideas and brainstorm about new features!
thanks to everyone who reads, listens, writes, and feels."""
recording = """
feels will be recorded for today, {today}.
if you've already started recording feels for this day, you
can pick up where you left off.
you can write your feels in plaintext, markdown, html, or a mixture of
these.
press <enter> to begin recording your feels in your chosen text
editor.
""".format(today=time.strftime("%d %B %Y"))
## update announcements ## update announcements
UPDATES = { UPDATES = {

View File

@ -754,25 +754,7 @@ def show_credits():
prints author acknowledgements and commentary prints author acknowledgements and commentary
''' '''
print(""" print(config.credits)
ttbp was written for tilde.town by ~endorphant in python. the codebase is
publicly available on github at https://github.com/modgethanc/ttbp
other contributors:
~vilmibm, packaging help and gopher support
~sanqui, the bug swatter
~sinacutie, for css updates
if you have ideas for ttbp, you are welcome to contact me to discuss them;
please send me tildemail or open a github issue. i am not a very experienced
developer, and ttbp is one of my first public-facing projects, so i appreciate
your patience while i learn how to be a better developer!
i'd love to hear about your ideas and brainstorm about new features!
thanks to everyone who reads, listens, writes, and feels.\
""")
input("\n\npress <enter> to go back home.\n\n") input("\n\npress <enter> to go back home.\n\n")
redraw() redraw()
@ -785,19 +767,7 @@ def write_entry(entry=os.path.join(config.USER_DATA, "test.txt")):
main feels-recording handler main feels-recording handler
''' '''
entered = input(""" entered = input(config.recording)
feels will be recorded for today, {today}.
if you've already started recording feels for this day, you
can pick up where you left off.
you can write your feels in plaintext, markdown, html, or a mixture of
these.
press <enter> to begin recording your feels in your chosen text
editor.
""".format(today=time.strftime("%d %B %Y")))
if entered: if entered:
entryFile = open(entry, "a") entryFile = open(entry, "a")
@ -807,6 +777,8 @@ editor.
left = "" left = ""
core.load_files()
if SETTINGS.get("post as nopub"): if SETTINGS.get("post as nopub"):
core.toggle_nopub(os.path.basename(entry)) core.toggle_nopub(os.path.basename(entry))
else: else:
@ -821,7 +793,7 @@ editor.
gopher.publish_gopher('feels', core.get_files()) gopher.publish_gopher('feels', core.get_files())
left += " also posted to your ~/public_gopher!\n" left += " also posted to your ~/public_gopher!\n"
core.load_files() #core.load_files()
redraw(left + " thanks for sharing your feels!") redraw(left + " thanks for sharing your feels!")
return return
@ -1108,14 +1080,14 @@ def select_publish_dir():
publishDir = os.path.join(config.PUBLIC, choice) publishDir = os.path.join(config.PUBLIC, choice)
while os.path.exists(publishDir): while os.path.exists(publishDir):
second = input("\n"+publishDir+"""\ second = input("""
already exists! {pDir} already exists!
setting this as your publishing directory means this program may setting this as your publishing directory means this program may
delete or overwrite file there! delete or overwrite file there!
if you're sure you want to use it, hit <enter> to confirm. if you're sure you want to use it, hit <enter> to confirm.
otherwise, pick another location: """) otherwise, pick another location: """.format(pDir=publishDir)
if second == "": if second == "":
break break