fixing merge

master
Vincent Zeng 2018-02-28 11:38:22 -05:00
commit 4c711c532b
3 changed files with 32 additions and 12 deletions

View File

@ -76,13 +76,13 @@ NOPUB = os.path.join(USER_CONFIG, "nopub")
## UI
BANNER = '''
__________________________________________________________
___________________________________________________________
| |
| the tilde.town |
| ____ ____ ____ _ ____ ____ _ _ ____ _ _ _ ____ |
| |___ |___ |___ | [__ |___ |\ | | __ | |\ | |___ |
| | |___ |___ |___ ___] |___ | \| |__] | | \| |___ |
| ver 0.11.0 (rainbows) |
| ver 0.11.1 (rainbows) |
|__________________________________________________________|
'''.lstrip()
@ -139,4 +139,11 @@ version 0.9.3 features:
* ~login created centralfeels, which is an opt-in collection of
html-published feels; create a blank file called '.centralfeels' in
your home directory if you'd like to be included!""",
"0.11.1": """
~[version 0.11.1 update]~
* a quick patch to correct a directory listing error, nothing too
exciting
* general PSA: feel free to use the github repo for bugs/feature requests:
https://github.com/modgethanc/ttbp/issues""",
}

View File

@ -405,7 +405,10 @@ def www_neighbors():
url = config.LIVE+user+"/"+userRC["publish dir"]
lastfile = ""
files = os.listdir(os.path.join("/home", user, ".ttbp", "entries"))
try:
files = os.listdir(os.path.join("/home", user, ".ttbp", "entries"))
except OSError:
files = []
files.sort()
for filename in files:
if valid(filename):

View File

@ -50,7 +50,7 @@ from . import chatter
from . import gopher
from . import util
__version__ = "0.11.0"
__version__ = "0.11.1"
__author__ = "endorphant <endorphant@tilde.town)"
p = inflect.engine()
@ -217,8 +217,6 @@ def check_init():
* checks for last run version
'''
global SETTINGS
print("\n\n")
if os.path.exists(os.path.join(os.path.expanduser("~"),".ttbp")):
if config.USER == "endorphant":
@ -230,10 +228,10 @@ def check_init():
## ttbp env validation
if not user_up_to_date():
update_user_version()
elif not valid_setup():
if not valid_setup():
setup_repair()
else:
input("press <enter> to explore your feels.\n\n")
core.load(SETTINGS)
@ -637,7 +635,10 @@ def view_neighbors(users, prompt):
url = config.LIVE+user+"/"+userRC.get("publish dir")
## find last entry
files = os.listdir(os.path.join("/home", user, ".ttbp", "entries"))
try:
files = os.listdir(os.path.join("/home", user, ".ttbp", "entries"))
except OSError:
files = []
files.sort()
lastfile = ""
for filename in files:
@ -918,7 +919,10 @@ def view_feed():
for townie in core.find_ttbps():
entryDir = os.path.join("/home", townie, ".ttbp", "entries")
filenames = os.listdir(entryDir)
try:
filenames = os.listdir(entryDir)
except OSError:
filenames = []
for entry in filenames:
## hardcoded display cutoff at 30 days
@ -1268,19 +1272,25 @@ you're all good to go, """+chatter.say("friend")+"""! please contact ~endorphant
something strange happened to you during this update.
""")
if z < 1 or y < 10:
if y < 10:
# version 0.10.1 patch notes
print(config.UPDATES["0.10.1"])
if y < 11:
# version 0.11.1 patch notes
# version 0.11.0 patch notes
print(config.UPDATES["0.11.0"])
if y < 11 or z < 1:
# version 0.11.1 patch notes
print(config.UPDATES["0.11.1"])
confirm = ""
while confirm not in ("x", "<x>", "X", "<X>"):
confirm = input("\nplease type <x> when you've finished reading about the updates! ")
print("\n\n")
open(versionFile, "w").write(__version__)
#####