Add option for comments from discord

master
trémeur 1 year ago
parent 5bbece2ebe
commit 015f478ea7

@ -87,6 +87,8 @@ def commentpage(ficno,directory,local=False):
filewrite.write("<span style=\"white-space: nowrap;\" class=\"ljuser\"><a href=\"https://" + comment["username"].replace("_","-") + ".livejournal.com/profile\"><img src=\"https://www.dreamwidth.org/img/external/lj-userinfo.gif\" alt=\"[personal profile]\" width=\"17\" height=\"17\" style=\"vertical-align: text-bottom; border: 0; padding-right: 1px;\" /></a><a href=\"https://" + comment["username"].replace("_","-") + ".livejournal.com/\"><b>" + comment["username"].replace("-","_")+ "</b></a></span>")
else:
filewrite.write("<span style=\"white-space: nowrap;\" class=\"ljuser\"><img src=\"https://www.dreamwidth.org/img/external/lj-userinfo.gif\" alt=\"[personal profile]\" width=\"17\" height=\"17\" style=\"vertical-align: text-bottom; border: 0; padding-right: 1px;\" /><b>anonymous</b></a></span>")
elif comment["site"] == "discord":
filewrite.write("<span style=\"white-space: nowrap;\" class=\"ljuser\"><img src=\"https://www.dreamwidth.org/img/profile_icons/discord.png\" alt=\"[personal profile]\" width=\"17\" height=\"17\" style=\"vertical-align: text-bottom; border: 0; padding-right: 1px; background-color: white; border-radius: 10%;\" /><b>" + comment["username"] + "</b></span>")
elif comment["site"] == "ao3":
if comment["registered"]:
try:

@ -1,6 +1,6 @@
import datetime
title = ""
title = "" # just the number is fine
showtitle = False
language = "en"
# translation =
@ -24,7 +24,7 @@ location = [""]
# locationtext = ""
# summary = ""
# notes = ""
# event = "" # challenge (including fests), ao3exchange, exchange, prompt
# event = "" # challenge (including fests; anything without a specific prompt), ao3exchange, exchange, prompt
# eventlocation = "" # dwcomm, dwjournal, ljjournal
# eventname = ""
# eventdeets = "" # probably not needed unless its robotsoup
@ -39,8 +39,8 @@ locked = False
html = True
pdf = True
epub = True
# comments = [{"site":"", # ao3, dw, lj
# "registered":, # True or False
# comments = [{"site":"", # ao3, dw, lj, discord
# "registered":, # True or False, not required for discord
# "username":"", # leave out if its a dw/lj anon
# "pseud":"", # optional, ao3 only
# "date":datetime.datetime(),

Loading…
Cancel
Save