|
|
|
@ -256,10 +256,8 @@ def yeargen(local=False):
|
|
|
|
|
filewrite = open(yearpath + "/index.html", "a")
|
|
|
|
|
filewrite.write("<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<meta charset=\"UTF-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n<title>Fic stats " + str(year) + "</title>\n<link rel=\"stylesheet\" href=\"")
|
|
|
|
|
if local:
|
|
|
|
|
filewrite.write("/home/mdd/Documents/drive/proj/fic-archive/build/")
|
|
|
|
|
else:
|
|
|
|
|
filewrite.write("/fic/")
|
|
|
|
|
filewrite.write("fic4.css\">\n<link rel=\"me\" href=\"https:/ple.praze.net/users/tre\">\n<link rel=\"stylesheet\" href=\"/fic/edgelord.css\">\n<link rel=\"stylesheet\" href=\"https://fonts.googleapis.com/css2?family=Fugaz+One&family=Inconsolata&family=Lato:ital,wght@0,400;0,700;1,400;1,700&display=swap\">\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/charts.css/dist/charts.min.css\">\n</head>\n<body style=\"--colourone: #990909; --colourtwo: #cf6969;\">\n<div id=\"site-wrapper\">\n<h1>Fic stats for " + str(year) + "</h1>\n")
|
|
|
|
|
filewrite.write("https://tre.praze.net")
|
|
|
|
|
filewrite.write("/main.css\">\n<link rel=\"me\" href=\"https:/ple.praze.net/users/tre\">\n<link rel=\"stylesheet\" href=\"https://fonts.googleapis.com/css2?family=Fugaz+One&family=Inconsolata&family=Lato:ital,wght@0,400;0,700;1,400;1,700&display=swap\">\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/charts.css/dist/charts.min.css\">\n</head>\n<body style=\"--colourone: #990909; --colourtwo: #cf6969;\">\n<div class=\"container\">\n<h1>Fic stats for " + str(year) + "</h1>\n")
|
|
|
|
|
allfics = []
|
|
|
|
|
ficdeets = []
|
|
|
|
|
datesplit = []
|
|
|
|
@ -478,11 +476,11 @@ def yeargen(local=False):
|
|
|
|
|
for event in neweventslist:
|
|
|
|
|
filewrite.write("<tr>\n<th>")
|
|
|
|
|
if event["eventlocation"] == "dwcomm":
|
|
|
|
|
filewrite.write("<span style=\"white-space: nowrap;\" class=\"ljuser\"><a href=\"https://" + (event["eventname"]).replace("_","-") + ".dreamwidth.org/profile\"><img src=\"https://www.dreamwidth.org/img/silk/identity/community.png\" alt=\"[community profile]\" width=\"17\" height=\"17\" style=\"vertical-align: text-bottom; border: 0; padding-right: 1px;\"></a><a href=\"https://" + (event["eventname"]).replace("_","-") + ".dreamwidth.org/\"><b>" + (event["eventname"]).replace("-","_") + "</b></a></span>")
|
|
|
|
|
filewrite.write("<span style=\"white-space: nowrap;\" class=\"ljuser\"><a href=\"https://" + (event["eventname"]).replace("_","-") + ".dreamwidth.org/profile\"><img src=\"https://www.dreamwidth.org/img/silk/identity/community.png\" alt=\"[community profile]\" width=\"17\" height=\"17\" style=\"vertical-align: baseline; border: 0; padding-right: 1px;\"></a><a href=\"https://" + (event["eventname"]).replace("_","-") + ".dreamwidth.org/\">" + (event["eventname"]).replace("-","_") + "</a></span>")
|
|
|
|
|
elif event["eventlocation"] == "dwjournal":
|
|
|
|
|
filewrite.write("<span style=\"white-space: nowrap;\" class=\"ljuser\"><a href=\"https://" + (event["eventname"]).replace("_","-") + ".dreamwidth.org/profile\"><img src=\"https://www.dreamwidth.org/img/silk/identity/user.png\" alt=\"[personal profile]\" width=\"17\" height=\"17\" style=\"vertical-align: text-bottom; border: 0; padding-right: 1px;\"></a><a href=\"https://"+ (event["eventname"]).replace("_","-") + ".dreamwidth.org/\"><b>" + (event["eventname"]).replace("-","_")+ "</b></a></span>")
|
|
|
|
|
filewrite.write("<span style=\"white-space: nowrap;\" class=\"ljuser\"><a href=\"https://" + (event["eventname"]).replace("_","-") + ".dreamwidth.org/profile\"><img src=\"https://www.dreamwidth.org/img/silk/identity/user.png\" alt=\"[personal profile]\" width=\"17\" height=\"17\" style=\"vertical-align: baseline; border: 0; padding-right: 1px;\"></a><a href=\"https://"+ (event["eventname"]).replace("_","-") + ".dreamwidth.org/\">" + (event["eventname"]).replace("-","_")+ "</a></span>")
|
|
|
|
|
elif event["eventlocation"] == "ljjournal":
|
|
|
|
|
filewrite.write("<span style=\"white-space: nowrap;\" class=\"ljuser\"><a href=\"https://" + (event["eventname"]).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://"+ (event["eventname"]).replace("_","-") + ".livejournal.com/\"><b>" + (event["eventname"]).replace("-","_")+ "</b></a></span>")
|
|
|
|
|
filewrite.write("<span style=\"white-space: nowrap;\" class=\"ljuser\"><a href=\"https://" + (event["eventname"]).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: baseline; border: 0; padding-right: 1px;\"></a><a href=\"https://"+ (event["eventname"]).replace("_","-") + ".livejournal.com/\">" + (event["eventname"]).replace("-","_")+ "</a></span>")
|
|
|
|
|
else:
|
|
|
|
|
filewrite.write(event["eventname"])
|
|
|
|
|
filewrite.write("</th>\n<td style=\"--size:calc(" + str(event["words"]) + " / " + str((neweventslist[0])["words"]) + ");\"><span class=\"data\">" + str(event["words"]) + "</span><span class=\"tooltip\">" + str(len(event["ficno"])) + " fic")
|
|
|
|
@ -493,11 +491,11 @@ def yeargen(local=False):
|
|
|
|
|
for event in neweventslist:
|
|
|
|
|
filewrite.write("<h3>")
|
|
|
|
|
if event["eventlocation"] == "dwcomm":
|
|
|
|
|
filewrite.write("<span style=\"white-space: nowrap;\" class=\"ljuser\"><a href=\"https://" + (event["eventname"]).replace("_","-") + ".dreamwidth.org/profile\"><img src=\"https://www.dreamwidth.org/img/silk/identity/community.png\" alt=\"[community profile]\" width=\"17\" height=\"17\" style=\"vertical-align: text-bottom; border: 0; padding-right: 1px;\"></a><a href=\"https://" + (event["eventname"]).replace("_","-") + ".dreamwidth.org/\"><b>" + (event["eventname"]).replace("-","_") + "</b></a></span>")
|
|
|
|
|
filewrite.write("<span style=\"white-space: nowrap;\" class=\"ljuser\"><a href=\"https://" + (event["eventname"]).replace("_","-") + ".dreamwidth.org/profile\"><img src=\"https://www.dreamwidth.org/img/silk/identity/community.png\" alt=\"[community profile]\" width=\"17\" height=\"17\" style=\"vertical-align: baseline; border: 0; padding-right: 1px;\"></a><a href=\"https://" + (event["eventname"]).replace("_","-") + ".dreamwidth.org/\">" + (event["eventname"]).replace("-","_") + "</a></span>")
|
|
|
|
|
elif event["eventlocation"] == "dwjournal":
|
|
|
|
|
filewrite.write("<span style=\"white-space: nowrap;\" class=\"ljuser\"><a href=\"https://" + (event["eventname"]).replace("_","-") + ".dreamwidth.org/profile\"><img src=\"https://www.dreamwidth.org/img/silk/identity/user.png\" alt=\"[personal profile]\" width=\"17\" height=\"17\" style=\"vertical-align: text-bottom; border: 0; padding-right: 1px;\"></a><a href=\"https://"+ (event["eventname"]).replace("_","-") + ".dreamwidth.org/\"><b>" + (event["eventname"]).replace("-","_")+ "</b></a></span>")
|
|
|
|
|
filewrite.write("<span style=\"white-space: nowrap;\" class=\"ljuser\"><a href=\"https://" + (event["eventname"]).replace("_","-") + ".dreamwidth.org/profile\"><img src=\"https://www.dreamwidth.org/img/silk/identity/user.png\" alt=\"[personal profile]\" width=\"17\" height=\"17\" style=\"vertical-align: baseline; border: 0; padding-right: 1px;\"></a><a href=\"https://"+ (event["eventname"]).replace("_","-") + ".dreamwidth.org/\">" + (event["eventname"]).replace("-","_")+ "</a></span>")
|
|
|
|
|
elif event["eventlocation"] == "ljjournal":
|
|
|
|
|
filewrite.write("<span style=\"white-space: nowrap;\" class=\"ljuser\"><a href=\"https://" + (event["eventname"]).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://"+ (event["eventname"]).replace("_","-") + ".livejournal.com/\"><b>" + (event["eventname"]).replace("-","_")+ "</b></a></span>")
|
|
|
|
|
filewrite.write("<span style=\"white-space: nowrap;\" class=\"ljuser\"><a href=\"https://" + (event["eventname"]).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: baseline; border: 0; padding-right: 1px;\"></a><a href=\"https://"+ (event["eventname"]).replace("_","-") + ".livejournal.com/\">" + (event["eventname"]).replace("-","_")+ "</a></span>")
|
|
|
|
|
else:
|
|
|
|
|
filewrite.write(event["eventname"])
|
|
|
|
|
filewrite.write("</h3>\n<ol>\n")
|
|
|
|
|