Allow link to extra notes page, sort comments by chapter if applicable
This commit is contained in:
parent
a66d108921
commit
761bfe0672
2 changed files with 17 additions and 0 deletions
16
new.py
16
new.py
|
@ -107,6 +107,10 @@ while ficcount > 0:
|
|||
ficdict["summary"] = fileread.summary
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
ficdict["extralink"] = fileread.extralink
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
if fileread.eventname == "bethefirst":
|
||||
ficdict["event"] = "Be The First"
|
||||
|
@ -254,6 +258,10 @@ while ficcount > 0:
|
|||
ficdict["comments"] = False
|
||||
except:
|
||||
ficdict["comments"] = False
|
||||
try:
|
||||
ficdict["comments"] = sorted(ficdict["comments"],key=lambda d: d["chapter"])
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
ficdict["cssoverride"] = fileread.cssoverride
|
||||
except:
|
||||
|
@ -615,6 +623,10 @@ for fic in ficlist:
|
|||
ficpage.write(" version: <a href=\"/fic/" + stringno(fic["transid"]) + "\">" + stringno(fic["transid"]) + "</a></li>")
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
ficpage.write("\n<li>See <a href=\"" + fic["extralink"] + "\">here</a> for additional notes.</li>")
|
||||
except:
|
||||
pass
|
||||
allowcomments = False
|
||||
havecomments = False
|
||||
commentlink = False
|
||||
|
@ -824,6 +836,10 @@ for fic in ficlist:
|
|||
elif fic["french"] == "translation":
|
||||
transpage.write("English")
|
||||
transpage.write(" version: <a href=\"/fic/" + stringno(fic["id"]) + "\">" + stringno(fic["id"]) + "</a></li>")
|
||||
try:
|
||||
transpage.write("\n<li>See <a href=\"" + fic["extralink"] + "\">here</a> for additional notes.</li>")
|
||||
except:
|
||||
pass
|
||||
allowcomments = False
|
||||
havecomments = False
|
||||
commentlink = False
|
||||
|
|
|
@ -17,6 +17,7 @@ fandom = [""]
|
|||
genre = [""] # ship category comes first, 1 more is displayed
|
||||
warnstring = 9000000000 # 9 is a dummy; then sex (0–3), death, mental health, bigotry, vomiting, consent, underage, incest, amputation (all others being 0–2)
|
||||
# summary = ""
|
||||
# extralink = ""
|
||||
# event = "" # challenge (including fests; anything without a specific prompt), ao3exchange, exchange, prompt
|
||||
# eventname = ""
|
||||
# prompt = ""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue