forked from endorphant/ttbp
incrementing to 0.8.7
fixed bug in patching utility that caused publishing setting to not be saved.master
parent
82172e4a29
commit
22676344c9
26
bin/_ttbp.py
26
bin/_ttbp.py
|
@ -19,7 +19,7 @@ LIVE = "http://tilde.town/~"
|
|||
FEEDBACK = os.path.join("/home", "endorphant", "ttbp-mail")
|
||||
FEEDBOX = "endorphant@tilde.town"
|
||||
USERFILE = os.path.join("/home", "endorphant", "projects", "ttbp", "users.txt")
|
||||
VERSION = "0.8.6"
|
||||
VERSION = "0.8.7"
|
||||
|
||||
p = inflect.engine()
|
||||
|
||||
|
@ -304,6 +304,8 @@ def view_neighbors(users):
|
|||
|
||||
for user in users:
|
||||
userRC = json.load(open(os.path.join("/home", user, ".ttbp", "config", "ttbprc")))
|
||||
url="\t\t\t\t"
|
||||
if userRC.get("publish dir"):
|
||||
url = LIVE+user+"/"+userRC.get("publish dir")
|
||||
count = 0
|
||||
lastfile = ""
|
||||
|
@ -409,7 +411,7 @@ press <enter> to begin recording your feels.
|
|||
if publishing():
|
||||
core.load_files()
|
||||
core.write("index.html")
|
||||
left = "posted to "+LIVE+USER+"/"+SETTINGS["publish dir"]+"/index.html"
|
||||
left = "posted to "+LIVE+USER+"/"+SETTINGS["publish dir"]+"/index.html\n\n>"
|
||||
redraw(left + " thanks for sharing your feels!")
|
||||
|
||||
return
|
||||
|
@ -733,14 +735,15 @@ def update_version():
|
|||
|
||||
print("ttbp had some updates!")
|
||||
|
||||
# from 0.8.5 to 0.8.6:
|
||||
if not os.path.isfile(versionFile):
|
||||
print("\ngive me a second to update you from version 0.8.5 to "+VERSION+"...\n")
|
||||
print("\ngive me a second to update you to version "+VERSION+"...\n")
|
||||
|
||||
time.sleep(1)
|
||||
print("...")
|
||||
time.sleep(2)
|
||||
|
||||
if not os.path.isfile(versionFile):
|
||||
# from 0.8.5 to 0.8.6:
|
||||
|
||||
# change style.css location
|
||||
if os.path.isfile(os.path.join(WWW, "style.css")):
|
||||
subprocess.call(["mv", os.path.join(WWW, "style.css"), CONFIG])
|
||||
|
@ -765,6 +768,19 @@ def update_version():
|
|||
print("\nnew feature!\n")
|
||||
SETTINGS.update({"publishing":select_publishing()})
|
||||
update_publishing()
|
||||
ttbprc = open(TTBPRC, "w")
|
||||
ttbprc.write(json.dumps(SETTINGS, sort_keys=True, indent=2, separators=(',',':')))
|
||||
ttbprc.close()
|
||||
|
||||
else: # version at least 0.8.6
|
||||
# from 0.8.6 to 0.8.7
|
||||
if open(versionFile, 'r').read() == "0.8.6":
|
||||
print("\nresetting your publishing settings...\n")
|
||||
SETTINGS.update({"publishing":select_publishing()})
|
||||
update_publishing()
|
||||
ttbprc = open(TTBPRC, "w")
|
||||
ttbprc.write(json.dumps(SETTINGS, sort_keys=True, indent=2, separators=(',',':')))
|
||||
ttbprc.close()
|
||||
|
||||
|
||||
# increment user versionfile
|
||||
|
|
|
@ -5,5 +5,5 @@
|
|||
| |___ |___ |___ | [__ |___ |\ | | __ | |\ | |___ |
|
||||
| | |___ |___ |___ ___] |___ | \| |__] | | \| |___ |
|
||||
| |
|
||||
| ver 0.8.6 (almost stable) |
|
||||
| ver 0.8.7 (almost stable) |
|
||||
|__________________________________________________________|
|
||||
|
|
24
bin/ttbp.py
24
bin/ttbp.py
|
@ -19,7 +19,7 @@ LIVE = "http://tilde.town/~"
|
|||
FEEDBACK = os.path.join("/home", "endorphant", "ttbp-mail")
|
||||
FEEDBOX = "endorphant@tilde.town"
|
||||
USERFILE = os.path.join("/home", "endorphant", "projects", "ttbp", "users.txt")
|
||||
VERSION = "0.8.6"
|
||||
VERSION = "0.8.7"
|
||||
|
||||
p = inflect.engine()
|
||||
|
||||
|
@ -302,6 +302,8 @@ def view_neighbors(users):
|
|||
|
||||
for user in users:
|
||||
userRC = json.load(open(os.path.join("/home", user, ".ttbp", "config", "ttbprc")))
|
||||
url="\t\t\t\t"
|
||||
if userRC.get("publish dir"):
|
||||
url = LIVE+user+"/"+userRC.get("publish dir")
|
||||
count = 0
|
||||
lastfile = ""
|
||||
|
@ -731,14 +733,15 @@ def update_version():
|
|||
|
||||
print("ttbp had some updates!")
|
||||
|
||||
# from 0.8.5 to 0.8.6:
|
||||
if not os.path.isfile(versionFile):
|
||||
print("\ngive me a second to update you from version 0.8.5 to "+VERSION+"...\n")
|
||||
print("\ngive me a second to update you to version "+VERSION+"...\n")
|
||||
|
||||
time.sleep(1)
|
||||
print("...")
|
||||
time.sleep(2)
|
||||
|
||||
if not os.path.isfile(versionFile):
|
||||
# from 0.8.5 to 0.8.6:
|
||||
|
||||
# change style.css location
|
||||
if os.path.isfile(os.path.join(WWW, "style.css")):
|
||||
subprocess.call(["mv", os.path.join(WWW, "style.css"), CONFIG])
|
||||
|
@ -763,6 +766,19 @@ def update_version():
|
|||
print("\nnew feature!\n")
|
||||
SETTINGS.update({"publishing":select_publishing()})
|
||||
update_publishing()
|
||||
ttbprc = open(TTBPRC, "w")
|
||||
ttbprc.write(json.dumps(SETTINGS, sort_keys=True, indent=2, separators=(',',':')))
|
||||
ttbprc.close()
|
||||
|
||||
else: # version at least 0.8.6
|
||||
# from 0.8.6 to 0.8.7
|
||||
if open(versionFile, 'r').read() == "0.8.6":
|
||||
print("\nresetting your publishing settings...\n")
|
||||
SETTINGS.update({"publishing":select_publishing()})
|
||||
update_publishing()
|
||||
ttbprc = open(TTBPRC, "w")
|
||||
ttbprc.write(json.dumps(SETTINGS, sort_keys=True, indent=2, separators=(',',':')))
|
||||
ttbprc.close()
|
||||
|
||||
|
||||
# increment user versionfile
|
||||
|
|
Loading…
Reference in New Issue