Browse Source

Merge branch 'marches' of https://gitea.cslabs.clarkson.edu/jogordo/DnD_Archive into marches

marches
Josh Gordon 3 years ago
parent
commit
395371b85a
  1. 18
      app/routes.py

18
app/routes.py

@ -99,6 +99,24 @@ def marchLog(world,logname):
#... code
#logname is title of adventure
#log type is (DateString,X,Y,[(Name,Text)])
worldDir = "../Worlds/"+world + "/"
lookup = json.load(open(worldDir + "log.json", 'r'))
logFile = open(worldDir+ "logs/" + lookup[logname],'r')
logData = logFile.read().split('\n')
X,Y = ""
date = ""
nom = ""
for i in logData:
tmp = i
tmp = tmp.split(":")
if tmp[0].lower() == "name":
nom = tmp[1]
else if tmp[0].lower() == "date":
date = tmp[1]
else if tmp[0].lower() == "x":
X = tmp[1]
else if tmp[0].lower() == "y":
Y = tmp[1]
return render_template("marchLog.html",worldname=world,log=("current time",40,50,[("Lorem","ipsum. this is some data. data data data."),("Anthony","Someone's gonna see this code and theyre gonna shoot me")]))
def bucket_route(uri, dir, sing=None):

Loading…
Cancel
Save