Add code for showing comment replies; show characters in stats page summaries for shipfic if no named ship

master
trémeur 2 years ago
parent c10e39197c
commit 48534c366f

@ -110,6 +110,10 @@ def commentpage(ficno,directory,local=False):
except: except:
pass pass
filewrite.write("</h1>\n<p>" + comment["text"] + "</p>\n</div>\n") filewrite.write("</h1>\n<p>" + comment["text"] + "</p>\n</div>\n")
try:
filewrite.write("<div class=\"comment reply\">\n<h1>Reply</h1>\n<p>" + comment["reply"] + "</p>\n</div>")
except:
pass
except: except:
pass pass
if fffandom or timeelapsed.days < 730: if fffandom or timeelapsed.days < 730:

@ -40,8 +40,20 @@ def ficsum(ficcount,year,month=0,showfandom=True,local=False):
if "gen" not in origfile.genre: if "gen" not in origfile.genre:
try: try:
thechars = origfile.ship[0] thechars = origfile.ship[0]
except:
chars = []
try:
chars.extend(origfile.charpov)
except:
pass
try:
chars.extend(origfile.charmain)
except: except:
pass pass
if chars != []:
thechars = ", ".join(chars)
else:
thechars = ""
else: else:
chars = [] chars = []
try: try:
@ -63,8 +75,20 @@ def ficsum(ficcount,year,month=0,showfandom=True,local=False):
if "gen" not in fileread.genre: if "gen" not in fileread.genre:
try: try:
thechars = fileread.ship[0] thechars = fileread.ship[0]
except:
chars = []
try:
chars.extend(fileread.charpov)
except:
pass
try:
chars.extend(fileread.charmain)
except: except:
pass pass
if chars != []:
thechars = ", ".join(chars)
else:
thechars = ""
else: else:
chars = [] chars = []
try: try:

Loading…
Cancel
Save