From 015f478ea7e78ac8358cc93d5ee29f85a5342389 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?tr=C3=A9meur?= Date: Mon, 31 Jul 2023 19:27:59 +0100 Subject: [PATCH] Add option for comments from discord --- commentpage.py | 6 ++++-- originalsmeta/template.py | 8 ++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/commentpage.py b/commentpage.py index 6cabf0d..c76ebc1 100644 --- a/commentpage.py +++ b/commentpage.py @@ -84,13 +84,15 @@ def commentpage(ficno,directory,local=False): filewrite.write("\"[personalanonymous") elif comment["site"] == "lj": if comment["registered"]: - filewrite.write("\"[personal" + comment["username"].replace("-","_")+ "") + filewrite.write("\"[personal" + comment["username"].replace("-","_")+ "") else: filewrite.write("\"[personalanonymous") + elif comment["site"] == "discord": + filewrite.write("\"[personal" + comment["username"] + "") elif comment["site"] == "ao3": if comment["registered"]: try: - filewrite.write("\"[archiveofourown.org" + comment["pseud"] + " (" + comment["username"] + ")") + filewrite.write("\"[archiveofourown.org" + comment["pseud"] + " (" + comment["username"] + ")") except: filewrite.write("\"[archiveofourown.org" + comment["username"] + "") else: diff --git a/originalsmeta/template.py b/originalsmeta/template.py index 755cab2..0eeeb5b 100644 --- a/originalsmeta/template.py +++ b/originalsmeta/template.py @@ -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 it’s 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 it’s a dw/lj anon # "pseud":"", # optional, ao3 only # "date":datetime.datetime(),