Browse Source

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

marches
Josh Gordon 3 years ago
parent
commit
1d9ba4ed20
  1. 6
      app/routes.py

6
app/routes.py

@ -90,7 +90,8 @@ def marchWorld(world):
pfile.close()
#image_map = [(10,20,35),(50,40,20)] #("place name",x,y,r)
#image_map = [("Temple of Constant Explosions",10,20,35),("Deep Gnome Workshop",50,40,20)] #(place,x,y,r)
log_list = ["Raiding Cosi"] # :: [AdventureName]
#log_list = ["Raiding Cosi"] # :: [AdventureName]
log_list = json.load(open(worldDir + "log.json",'r')).keys()
return render_template("marchWorld.html",worldname=world,players=player_list,logs=log_list)
@app.route("/marches/worlds/<world>/<logname>")
@ -108,10 +109,11 @@ def marchLog(world,logname):
X = logData[2].split(":")[1]
Y = logData[3].split(":")[1]
logs = []
breakLine = re.compile("^---*$")
for i in range(4,len(logData)):
if len(logData[i]) == 0:
continue
if logData[i] == "-----":
if breakLine.match(logData[i]):
char = logData[i+1]
text = ""
i += 1 #adjust offset in file. We are now at the player's name

Loading…
Cancel
Save