Compare commits
No commits in common. "abdb1abdbc7e03f822e5a425e09f4fed55533f42" and "1eb36343e3c87b40282577d59d3956ce68d5f325" have entirely different histories.
abdb1abdbc
...
1eb36343e3
9 changed files with 60 additions and 75 deletions
|
@ -135,17 +135,10 @@ div.fic h1 span.ficnoprelim {
|
|||
font-size: 0.6em;
|
||||
}
|
||||
|
||||
div.fic h1 span.abandoned, div.fic h1 span.incomplete {
|
||||
font-weight: normal;
|
||||
color: white;
|
||||
}
|
||||
|
||||
div.fic h1 span.abandoned {
|
||||
font-weight: normal;
|
||||
background-color: #9c0000;
|
||||
}
|
||||
|
||||
div.fic h1 span.incomplete {
|
||||
background-color: #8ab60b;
|
||||
color: white;
|
||||
}
|
||||
|
||||
div.fic ul.ficlinks li, div.fic ul.ficmeta li {
|
||||
|
|
|
@ -65,7 +65,7 @@ def commentpage(ficno,directory,local=False):
|
|||
headerfooter.headerwrite(commentspath + "/index.html","Comments for fic no. " + ficnostring,"Comments for fic no. <span id=\"ficno\">" + ficnostring + "</span>","",False,local)
|
||||
filewrite = open(commentspath + "/index.html", "a")
|
||||
if fffandom or timeelapsed.days < 730:
|
||||
filewrite.write("<h2>Leave a comment</h2>\n<noscript>\n<p><b>JavaScript is unavailable.</b> Please <a href=\"mailto:tre@praze.net\">email me</a> any comments.</p>\n</noscript>\n<p class=\"jsonly\">Comments will be posted manually; please expect a delay between submitting your comment and seeing it below!</p>\n<form id=\"theform\" onsubmit=\"sendContact(event)\" class=\"jsonly\">\n<input type=\"text\" id=\"nameInput\" required placeholder=\"Pseudonym (required)\">\n<input type=\"email\" id=\"emailInput\" placeholder=\"Email (if you want email notification of reply)\">\n<input type=\"text\" id=\"siteInput\" placeholder=\"Site (if you want a link back)\">\n<textarea id=\"messageInput\" rows=\"5\" maxlength=\"4800\" required placeholder=\"Your comment (required, include whatever markup [or down] you like)\"></textarea>\n<button type=\"submit\">Submit</button>\n</form>\n")
|
||||
filewrite.write("<h2>Leave a comment</h2>\n<noscript>\n<p><b>JavaScript is unavailable.</b> Please <a href=\"mailto:tre@praze.net\">email me</a> any comments.</p>\n</noscript>\n<p class=\"jsonly\">Comments will be posted manually; please expect a delay between submitting your comment and seeing it below!</p>\n<form id=\"theform\" onsubmit=\"sendContact(event)\" class=\"jsonly\">\n<input type=\"text\" id=\"nameInput\" required placeholder=\"Pseudonym (required)\">\n<input type=\"email\" id=\"emailInput\" placeholder=\"Email (if you want email notification of reply)\">\n<input type=\"text\" id=\"siteInput\" placeholder=\"Site (if you want a link back)\">\n<textarea id=\"messageInput\" rows=\"5\" required placeholder=\"Your comment (required, include whatever markup [or down] you like)\"></textarea>\n<button type=\"submit\">Submit</button>\n</form>\n")
|
||||
else:
|
||||
try:
|
||||
if fileread.event == "ao3exchange" and (fileread.datewords[0])["date"].year > 2019:
|
||||
|
@ -74,7 +74,7 @@ def commentpage(ficno,directory,local=False):
|
|||
pass
|
||||
try:
|
||||
if fileread.comments:
|
||||
filewrite.write("<h2>Archived comments</h2>\n<p>I often delete copies of my fics syndicated to other websites, so I archive comments here as a way of preserving them. If you left one of these comments and would like it to be removed from the archive, please <a href=\"mailto:tre@praze.net\">email me</a>.</p>\n<p><small>My replies are included only if they were originally posted on this site.</small></p>\n")
|
||||
filewrite.write("<h2>Archived comments</h2>\n<p>If you left one of these comments and would like it to be removed from the archive, please <a href=\"mailto:tre@praze.net\">email me</a>.</p>\n<p><small>My replies are included only if they were originally posted on this site.</small></p>\n")
|
||||
for comment in fileread.comments:
|
||||
filewrite.write("<div class=\"comment\">\n<h1>")
|
||||
if comment["site"] == "dw":
|
||||
|
@ -119,7 +119,7 @@ def commentpage(ficno,directory,local=False):
|
|||
except:
|
||||
pass
|
||||
if fffandom or timeelapsed.days < 730:
|
||||
filewrite.write("<script>\nasync function sendContact(ev) {\nev.preventDefault();\nconst theFic = document\n.getElementById('ficno').innerHTML;\nconst senderName = document\n.getElementById('nameInput').value;\nconst senderAddress = document\n.getElementById('emailInput').value;\nconst senderSite = document\n.getElementById('siteInput').value;\nconst senderMessage = document\n.getElementById('messageInput').value;\nconst webhookUrl = 'https://kes.praze.net/api/v1/statuses';\nconst response = await fetch(webhookUrl, {\nmethod: 'POST',\nheaders: {\n 'Content-Type': 'application/json',\n 'Authorization': 'Bearer OTBKMDFMMJMTMZNKYY0ZMGQZLWJJMJUTYJE0MMY5ZJK3NJU4',\n },\n body: JSON.stringify({'status' : 'new comment on fic ' + theFic + ' from ' + senderName + ' (' + senderAddress + ', ' + senderSite + ')\\n\\n' + senderMessage}),\n});\n\nif (response.ok) {\nalert('Comment submitted, thank you!');\n} else {\nalert('This is fucked, sorry. Email me instead, whatever at praze dot net!');\n}\n\ndocument.getElementById(\"theform\").reset();\n}\n</script>\n")
|
||||
filewrite.write("<script>\nasync function sendContact(ev) {\nev.preventDefault();\nconst theFic = document\n.getElementById('ficno').innerHTML;\nconst senderName = document\n.getElementById('nameInput').value;\nconst senderAddress = document\n.getElementById('emailInput').value;\nconst senderSite = document\n.getElementById('siteInput').value;\nconst senderMessage = document\n.getElementById('messageInput').value;\nconst webhookBody = {\nembeds: [{\ntitle: 'New comment received',\nfields: [\n{ name: 'Fic ID', value: theFic },\n{ name: 'Pseudonym', value: senderName },\n{ name: 'Email', value: senderAddress },\n{ name: 'Site', value: senderSite },\n{ name: 'Comment', value: senderMessage }\n]\n}],\n};\n\nconst webhookUrl = 'https://discord.com/api/webhooks/1110564759109120001/nJRKlR2vGf_kQNNniChju_kt5MA-Y6WC3c-3nTrDuwH8s3Pg4wUfgxwd1SI9ZHicXP0m';\n\nconst response = await fetch(webhookUrl, {\nmethod: 'POST',\nheaders: {\n'Content-Type': 'application/json',\n},\nbody: JSON.stringify(webhookBody),\n});\n\nif (response.ok) {\nalert('Comment submitted, thank you!');\n} else {\nalert('This is fucked, sorry.');\n}\n\ndocument.getElementById(\"theform\").reset();\n}\n</script>\n")
|
||||
filewrite.close()
|
||||
headerfooter.footerwrite(commentspath + "/index.html",False,local)
|
||||
|
||||
|
@ -162,7 +162,7 @@ def commentindex(local=False):
|
|||
# write header
|
||||
headerfooter.headerwrite("build/comments/index.html","Comments","Comments","",False,local)
|
||||
filewrite = open("build/comments/index.html", "a")
|
||||
filewrite.write("<p>I tend to temporarily syndicate my fics to other websites and then delete them, so comments I receive are archived on this site and linked back to the original. If you don’t want your comments from other sources archived here, or if you require any changes to the presentation of your comments, <a href=\"mailto:takedown@praze.net\">please email me</a>. Please note, however, that this website is not indexed by search engines.</p>\n<p>If you haven’t switched off JavaScript, you can leave comments on the relevant comment pages for each fic (where this is enabled). Please leave your email address if you’d like notification of any reply. If you’d like a link from your pseudonym to a website, you can supply this as well, although I reserve the right not to link to certain advertising/tracker-heavy websites.</p>\n<p>Comments are turned off on some older fics.</p>\n")
|
||||
filewrite.write("<p>Comments I receive are archived on this site and linked back to the original. If you don’t want your comments from other sources archived here, or if you require any changes to the presentation of your comments, <a href=\"mailto:takedown@praze.net\">please email me</a>. Please note, however, that this website is not indexed by search engines and I don’t “advertise” it on mainstream social media.</p>\n<p>You can leave comments on the relevant comment pages for each fic (where this is enabled). If you’d like notification of any reply, please leave your email address. If you’d like a link from your pseudonym to a website, you can supply this as well. I’ll happily link to personal websites, Dreamwidth profiles, and (at least for now) AO3 profiles; I’m unlikely to include links to for-profit social media websites, Carrd, or Patreon.</p>\n<p>Comments are turned off on any fic over two years old unless it’s in a Final Fantasy fandom.</p>\n")
|
||||
filewrite.close()
|
||||
headerfooter.footerwrite("build/comments/index.html",False,local)
|
||||
|
||||
|
|
|
@ -86,11 +86,11 @@ def eventlist(local=False):
|
|||
position += 1
|
||||
eventlocation = (eventlist[position])["location"]
|
||||
if eventlocation == "dwjournal":
|
||||
filewrite.write("<span style=\"white-space: nowrap;\" class=\"ljuser\"><a target=\"_blank\" href=\"https://" + theevent.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 target=\"_blank\" href=\"https://"+ theevent.replace("_","-") + ".dreamwidth.org/\"><b>" + theevent.replace("-","_")+ "</b></a></span>")
|
||||
filewrite.write("<span style=\"white-space: nowrap;\" class=\"ljuser\"><a href=\"https://" + theevent.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://"+ theevent.replace("_","-") + ".dreamwidth.org/\"><b>" + theevent.replace("-","_")+ "</b></a></span>")
|
||||
elif eventlocation == "dwcomm":
|
||||
filewrite.write("<span style=\"white-space: nowrap;\" class=\"ljuser\"><a target=\"_blank\" href=\"https://" + theevent.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 target=\"_blank\" href=\"https://" + theevent.replace("_","-") + ".dreamwidth.org/\"><b>" + theevent.replace("-","_") + "</b></a></span>")
|
||||
filewrite.write("<span style=\"white-space: nowrap;\" class=\"ljuser\"><a href=\"https://" + theevent.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://" + theevent.replace("_","-") + ".dreamwidth.org/\"><b>" + theevent.replace("-","_") + "</b></a></span>")
|
||||
elif eventlocation == "ljjournal":
|
||||
filewrite.write("<span style=\"white-space: nowrap;\" class=\"ljuser\"><a target=\"_blank\" href=\"https://" + theevent.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 target=\"_blank\" href=\"https://"+ theevent.replace("_","-") + ".livejournal.com/\"><b>" + theevent.replace("-","_")+ "</b></a></span>")
|
||||
filewrite.write("<span style=\"white-space: nowrap;\" class=\"ljuser\"><a href=\"https://" + theevent.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://"+ theevent.replace("_","-") + ".livejournal.com/\"><b>" + theevent.replace("-","_")+ "</b></a></span>")
|
||||
else:
|
||||
filewrite.write(theevent)
|
||||
filewrite.write("</b> (" + str(len(evententries)) + ": " + ", ".join(eventfandoms) + ")</summary>\n")
|
||||
|
|
7
feed.py
7
feed.py
|
@ -11,7 +11,7 @@ def feedgen(local=False):
|
|||
os.remove("build/feed.xml")
|
||||
# write header
|
||||
header = open("build/feed.xml", "a")
|
||||
header.write("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<rss version=\"2.0\" xmlns:atom=\"http://www.w3.org/2005/Atom\">\n<channel>\n<atom:link href=\"https://tre.praze.net/fic/feed.xml\" rel=\"self\" type=\"application/rss+xml\" />\n<title>Mez’s fic archive</title>\n<link>https://tre.praze.net/fic</link>\n<description>All my fanfiction</description>\n<language>en-gb</language>\n")
|
||||
header.write("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<rss version=\"2.0\" xmlns:atom=\"http://www.w3.org/2005/Atom\">\n<channel>\n<atom:link href=\"https://tre.praze.net/fic/feed.xml\" rel=\"self\" type=\"application/rss+xml\" />\n<title>Tré’s fic archive</title>\n<link>https://tre.praze.net/fic</link>\n<description>All my fanfiction</description>\n<language>en-gb</language>\n")
|
||||
header.close()
|
||||
datelist = []
|
||||
ficcount = 500
|
||||
|
@ -160,7 +160,8 @@ def feedgen(local=False):
|
|||
filewrite.write(", " + thegenre)
|
||||
genred = True
|
||||
filewrite.write("</title>\n<pubDate>")
|
||||
filewrite.write(date.strftime("%a, %-d %b %Y"))
|
||||
futuredate = date + datetime.timedelta(days=2)
|
||||
filewrite.write(futuredate.strftime("%a, %-d %b %Y"))
|
||||
filewrite.write(" 00:00:00 GMT</pubDate>\n<link>")
|
||||
if local:
|
||||
filewrite.write("/home/mdd/Documents/proj/fic-archive/build/")
|
||||
|
@ -184,7 +185,7 @@ def feedgen(local=False):
|
|||
filewrite.write(" in this update")
|
||||
filewrite.write(".")
|
||||
try:
|
||||
filewrite.write(" " + re.sub(" "," ",re.sub("<[^<]+?>","",re.sub("<span class=\"spoiler\">.*</span>","[spoiler]",thefile.summary))))
|
||||
filewrite.write(" " + re.sub("<[^<]+?>","",re.sub("<span class=\"spoiler\">.*</span>","[spoiler]",thefile.summary)))
|
||||
except:
|
||||
filewrite.write(" No summary provided.")
|
||||
try:
|
||||
|
|
|
@ -5,7 +5,7 @@ def headerwrite(output,title,headerone,desc,main=False,local=False,single=False,
|
|||
header.write("/home/mdd/Documents/proj/fic-archive/build/")
|
||||
else:
|
||||
header.write("/fic/")
|
||||
header.write("archive.css\">\n<link rel=\"me\" href=\"https://kes.praze.net/@tre\">\n<link rel=\"alternate\" type=\"application/rss+xml\" title=\"Mez's fic archive\" href=\"https://tre.praze.net/fic/feed.xml\">\n<meta name=\"theme-color\" content=\"#edc4c4\" />\n<title>" + title + "</title>\n<meta property=\"og:title\" content=\"Mez’s fanfiction\">\n<meta property=\"og:type\" content=\"website\">\n<meta property=\"og:image\" content=\"https://tre.praze.net/ab.png\">\n<meta name=\"description\" property=\"og:description\" content=\"Fanfiction on tre.praze.net\">\n<meta property=\"og:locale\" content=\"en_GB\">\n<meta property=\"og:site_name\" content=\"tre.praze.net\">\n<meta name=\"fediverse:creator\" content=\"@tre@praze.net\">\n")
|
||||
header.write("archive.css\">\n<link rel=\"me\" href=\"https://kes.praze.net/@tre\">\n<link rel=\"alternate\" type=\"application/rss+xml\" title=\"Tré's fic archive\" href=\"https://tre.praze.net/fic/feed.xml\">\n<meta name=\"theme-color\" content=\"#edc4c4\" />\n<title>" + title + "</title>\n<meta property=\"og:title\" content=\"Tré’s fanfiction\">\n<meta property=\"og:type\" content=\"website\">\n<meta property=\"og:image\" content=\"https://tre.praze.net/ab.png\">\n<meta name=\"description\" property=\"og:description\" content=\"Fanfiction on tre.praze.net\">\n<meta property=\"og:locale\" content=\"en_GB\">\n<meta property=\"og:site_name\" content=\"tre.praze.net\">\n<meta name=\"fediverse:creator\" content=\"@tre@praze.net\">\n")
|
||||
if single:
|
||||
header.write("<link rel=\"alternate\" type=\"application/activity+json\" href=\"https://fed.brid.gy/r/https://tre.praze.net/fic/single/" + ficnostring + "/\"")
|
||||
header.write("<noscript>\n<style>.jsonly{display:none;}</style>\n</noscript>\n</head>\n<body>\n<div id=\"content\">\n<div id=\"inside\">\n<noscript>\n<div id=\"warning\">\n<p><b>Warning:</b> this part of my site is <b>18+</b>. Fics contain NSFW material and mature themes (death, suicide, mental illness, incest …). Browse at your own risk.</p>\n</div>\n</noscript>\n<h1>" + headerone + "</h1>\n" + desc + "\n")
|
||||
|
@ -39,5 +39,5 @@ def footerwrite(output,main=False,local=False):
|
|||
footer.write("/home/mdd/Documents/proj/fic-archive/build/")
|
||||
else:
|
||||
footer.write("/fic/")
|
||||
footer.write("verify/index.html?returnto=${window.location}`; }\n</script>\n<a href=\"/\"><img src=\"/a.png\" style=\"position:fixed;bottom:2px;right:2px;\" title=\"home\"></a></body>\n</html>")
|
||||
footer.write("verify/index.html?returnto=${window.location}`; }\n</script>\n</body>\n</html>")
|
||||
footer.close()
|
||||
|
|
|
@ -56,9 +56,9 @@ def indexgen(local=False):
|
|||
if os.path.exists("build/index.html"):
|
||||
os.remove("build/index.html")
|
||||
# write header
|
||||
headerfooter.headerwrite("build/index.html","Mez’s fic archive","Mez’s fic archive","",True,local)
|
||||
headerfooter.headerwrite("build/index.html","Tré’s fic archive","Tré’s fic archive","",True,local)
|
||||
filewrite = open("build/index.html", "a")
|
||||
filewrite.write("<p>Here is all my fanfiction! Some of it is also syndicated elsewhere (often temporarily), but this site is the canonical location for everything I’ve written.</p>\n<p xmlns:cc=\"http://creativecommons.org/ns#\" xmlns:dct=\"http://purl.org/dc/terms/\"><strong>Transformative works policy:</strong> The contents of <a property=\"dct:title\" rel=\"cc:attributionURL\" href=\"https://tre.praze.net/fic\">these pages</a> are licensed under <a target=\"_blank\" href=\"https://creativecommons.org/licenses/by-nc/4.0/\" target=\"_blank\" rel=\"license\" style=\"display:inline-block;\">CC BY-NC 4.0. <img style=\"height:22px!important;margin-left:3px;vertical-align:middle;\" src=\"https://mirrors.creativecommons.org/presskit/icons/cc.svg?ref=chooser-v1\" alt=\"\"><img style=\"height:22px!important;margin-left:3px;vertical-align:middle;\" src=\"https://mirrors.creativecommons.org/presskit/icons/by.svg?ref=chooser-v1\" alt=\"\"><img style=\"height:22px!important;margin-left:3px;vertical-align:middle;\" src=\"https://mirrors.creativecommons.org/presskit/icons/nc.svg?ref=chooser-v1\" alt=\"\"></a> In other words, transformative works are permitted as long as there is a clearly visible hyperlink to the original and no financial transactions are involved.</p>\n<p>The code for this archive is available <a target=\"_blank\" href=\"https://git.praze.net/tre/fic-archive\">here</a>. Commenting is switched on for most fics written at least semi-recently – read about that <a href=\"")
|
||||
filewrite.write("<p>Here is all my fanfiction! Some of it is also syndicated elsewhere, but this site is the canonical location for everything I’ve written.</p>\n<p xmlns:cc=\"http://creativecommons.org/ns#\" xmlns:dct=\"http://purl.org/dc/terms/\"><strong>Transformative works policy:</strong> The contents of <a property=\"dct:title\" rel=\"cc:attributionURL\" href=\"https://tre.praze.net/fic\">these pages</a> are licensed under <a href=\"https://creativecommons.org/licenses/by-nc/4.0/\" target=\"_blank\" rel=\"license\" style=\"display:inline-block;\">CC BY-NC 4.0. <img style=\"height:22px!important;margin-left:3px;vertical-align:middle;\" src=\"https://mirrors.creativecommons.org/presskit/icons/cc.svg?ref=chooser-v1\" alt=\"\"><img style=\"height:22px!important;margin-left:3px;vertical-align:middle;\" src=\"https://mirrors.creativecommons.org/presskit/icons/by.svg?ref=chooser-v1\" alt=\"\"><img style=\"height:22px!important;margin-left:3px;vertical-align:middle;\" src=\"https://mirrors.creativecommons.org/presskit/icons/nc.svg?ref=chooser-v1\" alt=\"\"></a> In other words, transformative works are permitted as long as there is a clearly visible hyperlink to the original and no financial transactions are involved.</p>\n<p>The code for this archive is available <a href=\"https://git.praze.net/tre/fic-archive\">here</a>. Commenting is switched on for most fics written at least semi-recently – read about that <a href=\"")
|
||||
if local:
|
||||
filewrite.write("comments/index.html")
|
||||
else:
|
||||
|
@ -96,7 +96,7 @@ def indexgen(local=False):
|
|||
filewrite.write("events/index.html")
|
||||
else:
|
||||
filewrite.write("/fic/events")
|
||||
filewrite.write("\">Events</a></h2>\n<p>Since 2020 I’ve participated in some fandom exchanges and other events. Many of my more recent fics are in this category.</p>\n</div>\n<div class=\"fic\">\n<h2>Other</h2>\n<ul>\n<li>Stats by year: " + (str(statslist(local))) + "</li>\n</ul>\n</div>\n<div align=\"center\">\n<script src=\"https://ficring.neocities.org/ring.js\"></script>\n</div>\n")
|
||||
filewrite.write("\">Events</a></h2>\n<p>Since 2020 I’ve participated in some fandom exchanges and other events. Many of my more recent fics are in this category.</p>\n</div>\n<div class=\"fic\">\n<h2>Other</h2>\n<ul>\n<li>Stats by year: " + (str(statslist(local))) + "</li>\n</ul>\n</div>\n<div align=\"center\">\n<script>\ndocument.write('<script src=\"https://ficring.neocities.org/ring.js\"><\/script>');\n</script>\n</div>\n")
|
||||
filewrite.close()
|
||||
headerfooter.footerwrite("build/index.html",True,local)
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ def linkgen(ficno,output="output.html",local=False):
|
|||
filewrite.write("\">\n")
|
||||
# write html link if there is one
|
||||
if fileread.html:
|
||||
filewrite.write("<li class=\"prazelink\"><a target=\"_blank\" ")
|
||||
filewrite.write("<li class=\"prazelink\"><a ")
|
||||
if fileread.locked:
|
||||
filewrite.write("class=\"locked\" href=\"")
|
||||
if local:
|
||||
|
@ -61,7 +61,7 @@ def linkgen(ficno,output="output.html",local=False):
|
|||
filewrite.write(ficnostring + ".html\">HTML</a></li>\n")
|
||||
# write pdf link if there is one
|
||||
if fileread.pdf:
|
||||
filewrite.write("<li class=\"prazelink\"><a target=\"_blank\" ")
|
||||
filewrite.write("<li class=\"prazelink\"><a ")
|
||||
if fileread.locked:
|
||||
filewrite.write("class=\"locked\" href=\"")
|
||||
if local:
|
||||
|
@ -76,7 +76,7 @@ def linkgen(ficno,output="output.html",local=False):
|
|||
filewrite.write(ficnostring + ".pdf\">PDF</a></li>\n")
|
||||
# write epub link if there is one
|
||||
if fileread.epub:
|
||||
filewrite.write("<li class=\"prazelink\"><a target=\"_blank\" ")
|
||||
filewrite.write("<li class=\"prazelink\"><a ")
|
||||
if fileread.locked:
|
||||
filewrite.write("class=\"locked\" href=\"")
|
||||
if local:
|
||||
|
@ -92,7 +92,7 @@ def linkgen(ficno,output="output.html",local=False):
|
|||
# write ao3 link if there is one
|
||||
try:
|
||||
if fileread.ao3slug:
|
||||
filewrite.write("<li class=\"ao3link\"><a target=\"_blank\" class=\"u-syndication")
|
||||
filewrite.write("<li class=\"ao3link\"><a class=\"u-syndication")
|
||||
try:
|
||||
if fileread.ao3locked:
|
||||
filewrite.write(" locked")
|
||||
|
@ -166,7 +166,7 @@ def linkgen(ficno,output="output.html",local=False):
|
|||
filewrite.write("\">\n")
|
||||
# write html link if there is one
|
||||
if fileread.html:
|
||||
filewrite.write("<li class=\"prazelink\"><a target=\"_blank\" ")
|
||||
filewrite.write("<li class=\"prazelink\"><a ")
|
||||
if fileread.locked:
|
||||
filewrite.write("class=\"locked\" href=\"")
|
||||
if local:
|
||||
|
@ -181,7 +181,7 @@ def linkgen(ficno,output="output.html",local=False):
|
|||
filewrite.write(translationstring + ".html\">HTML</a></li>\n")
|
||||
# write pdf link if there is one
|
||||
if fileread.pdf:
|
||||
filewrite.write("<li class=\"prazelink\"><a target=\"_blank\" ")
|
||||
filewrite.write("<li class=\"prazelink\"><a ")
|
||||
if fileread.locked:
|
||||
filewrite.write("class=\"locked\" href=\"")
|
||||
if local:
|
||||
|
@ -196,7 +196,7 @@ def linkgen(ficno,output="output.html",local=False):
|
|||
filewrite.write(translationstring + ".pdf\">PDF</a></li>\n")
|
||||
# write epub link if there is one
|
||||
if fileread.epub:
|
||||
filewrite.write("<li class=\"prazelink\"><a target=\"_blank\" ")
|
||||
filewrite.write("<li class=\"prazelink\"><a ")
|
||||
if fileread.locked:
|
||||
filewrite.write("class=\"locked\" href=\"")
|
||||
if local:
|
||||
|
@ -212,7 +212,7 @@ def linkgen(ficno,output="output.html",local=False):
|
|||
# write ao3 link if there is one
|
||||
try:
|
||||
if fileread.ao3slug:
|
||||
filewrite.write("<li class=\"ao3link\"><a target=\"_blank\" ")
|
||||
filewrite.write("<li class=\"ao3link\"><a ")
|
||||
if fileread.locked:
|
||||
filewrite.write("class=\"locked\" ")
|
||||
filewrite.write("href=\"https://archiveofourown.org/works/" + str(transread.ao3slug) + "\">AO3</a></li>\n")
|
||||
|
@ -325,8 +325,6 @@ def ficgen(ficno,unique=False,output="output.html",local=False,single=False):
|
|||
pass
|
||||
if fileread.status == "abandoned":
|
||||
filewrite.write(" <span class=\"abandoned\"> (abandoned)</span>")
|
||||
elif fileread.status == "incomplete":
|
||||
filewrite.write(" <span class=\"incomplete\"> (in progress)</span>")
|
||||
filewrite.write("</h1>\n<div class=\"e-content\">\n<ul class=\"ficmeta\">\n<li class=\"ficdate\"><i>Date:</i> ")
|
||||
# write date, date range if ranged or translation
|
||||
if fileread.status == "incomplete":
|
||||
|
@ -503,19 +501,14 @@ def ficgen(ficno,unique=False,output="output.html",local=False,single=False):
|
|||
# write event details if there are any
|
||||
try:
|
||||
if fileread.eventname == "fail-fandomanon":
|
||||
filewrite.write("In response to prompt at <span style=\"white-space: nowrap;\" class=\"ljuser\"><a target=\"_blank\" href=\"https://fail-fandomanon.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 target=\"_blank\" href=\"https://fail-fandomanon.dreamwidth.org/\"><b>fail_fandomanon</b></a></span>: <i>" + fileread.prompt + "</i>.")
|
||||
filewrite.write("In response to prompt at <span style=\"white-space: nowrap;\" class=\"ljuser\"><a href=\"https://fail-fandomanon.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://fail-fandomanon.dreamwidth.org/\"><b>fail_fandomanon</b></a></span>: <i>" + fileread.prompt + "</i>.")
|
||||
try:
|
||||
if fileread.notes:
|
||||
filewrite.write(" ")
|
||||
except:
|
||||
pass
|
||||
elif fileread.eventname == "robotsoup":
|
||||
filewrite.write("Written for <span style=\"white-space: nowrap;\" class=\"ljuser\"><a target=\"_blank\" href=\"https://kalloway.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 target=\"_blank\" href=\"https://kalloway.dreamwidth.org/\"><b>kalloway</b></a></span>’s " + fileread.eventdeets + " fest.")
|
||||
elif fileread.eventname == "#ficwip":
|
||||
filewrite.write("Written for the <a target=\"_blank\" href=\"https://ficwip.carrd.co\">#ficwip</a> event <i>" + fileread.eventdeets + "</i>")
|
||||
if fileread.event == "prompt":
|
||||
filewrite.write(", in response to prompt, <i>" + fileread.prompt + "</i>")
|
||||
filewrite.write(".")
|
||||
filewrite.write("Written for <span style=\"white-space: nowrap;\" class=\"ljuser\"><a href=\"https://kalloway.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://kalloway.dreamwidth.org/\"><b>kalloway</b></a></span>’s " + fileread.eventdeets + " fest.")
|
||||
try:
|
||||
if fileread.notes:
|
||||
filewrite.write(" ")
|
||||
|
@ -525,11 +518,11 @@ def ficgen(ficno,unique=False,output="output.html",local=False,single=False):
|
|||
filewrite.write("Written for ")
|
||||
try:
|
||||
if fileread.eventlocation == "dwcomm":
|
||||
filewrite.write("<span style=\"white-space: nowrap;\" class=\"ljuser\"><a target=\"_blank\" href=\"https://" + fileread.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 target=\"_blank\" href=\"https://" + fileread.eventname.replace("_","-") + ".dreamwidth.org/\"><b>" + fileread.eventname.replace("-","_") + "</b></a></span>")
|
||||
filewrite.write("<span style=\"white-space: nowrap;\" class=\"ljuser\"><a href=\"https://" + fileread.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://" + fileread.eventname.replace("_","-") + ".dreamwidth.org/\"><b>" + fileread.eventname.replace("-","_") + "</b></a></span>")
|
||||
elif fileread.eventlocation == "dwjournal":
|
||||
filewrite.write("<span style=\"white-space: nowrap;\" class=\"ljuser\"><a target=\"_blank\" href=\"https://" + fileread.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 target=\"_blank\" href=\"https://"+ fileread.eventname.replace("_","-") + ".dreamwidth.org/\"><b>" + fileread.eventname.replace("-","_")+ "</b></a></span>")
|
||||
filewrite.write("<span style=\"white-space: nowrap;\" class=\"ljuser\"><a href=\"https://" + fileread.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://"+ fileread.eventname.replace("_","-") + ".dreamwidth.org/\"><b>" + fileread.eventname.replace("-","_")+ "</b></a></span>")
|
||||
elif fileread.eventlocation == "ljjournal":
|
||||
filewrite.write("<span style=\"white-space: nowrap;\" class=\"ljuser\"><a target=\"_blank\" href=\"https://" + fileread.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 target=\"_blank\" href=\"https://"+ fileread.eventname.replace("_","-") + ".livejournal.com/\"><b>" + fileread.eventname.replace("-","_")+ "</b></a></span>")
|
||||
filewrite.write("<span style=\"white-space: nowrap;\" class=\"ljuser\"><a href=\"https://" + fileread.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://"+ fileread.eventname.replace("_","-") + ".livejournal.com/\"><b>" + fileread.eventname.replace("-","_")+ "</b></a></span>")
|
||||
except:
|
||||
if fileread.eventname == "Semaine de la fic française":
|
||||
filewrite.write("<i>Semaine de la fic française</i>")
|
||||
|
@ -548,15 +541,15 @@ def ficgen(ficno,unique=False,output="output.html",local=False,single=False):
|
|||
if fileread.recip:
|
||||
try:
|
||||
if fileread.recipsite == "dw":
|
||||
filewrite.write("<span style=\"white-space: nowrap;\" class=\"ljuser\"><a target=\"_blank\" href=\"https://" + fileread.recip.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 target=\"_blank\" href=\"https://"+ fileread.recip.replace("_","-") + ".dreamwidth.org/\"><b>" + fileread.recip.replace("-","_") + "</b></a></span>")
|
||||
filewrite.write("<span style=\"white-space: nowrap;\" class=\"ljuser\"><a href=\"https://" + fileread.recip.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://"+ fileread.recip.replace("_","-") + ".dreamwidth.org/\"><b>" + fileread.recip.replace("-","_") + "</b></a></span>")
|
||||
elif fileread.recipsite == "ao3":
|
||||
try:
|
||||
if fileread.recippseud:
|
||||
filewrite.write("<span style=\"white-space: nowrap;\" class=\"ljuser\"><a target=\"_blank\" href=\"https://archiveofourown.org/users/" + fileread.recip + "/profile\"><img src=\"https://p.dreamwidth.org/b164c54b26e4/-/archiveofourown.org/favicon.ico\" alt=\"[archiveofourown.org profile]\" width=\"16\" height=\"16\" style=\"vertical-align: text-bottom; border: 0; padding-right: 1px;\"></a><a target=\"_blank\" href=\"https://archiveofourown.org/users/"+ fileread.recip + "/pseuds/" + fileread.recippseud.replace(" ","%20") + "\"><b>" + fileread.recippseud + " (" + fileread.recip + ")</b></a></span>")
|
||||
filewrite.write("<span style=\"white-space: nowrap;\" class=\"ljuser\"><a href=\"https://archiveofourown.org/users/" + fileread.recip + "/profile\"><img src=\"https://p.dreamwidth.org/b164c54b26e4/-/archiveofourown.org/favicon.ico\" alt=\"[archiveofourown.org profile]\" width=\"16\" height=\"16\" style=\"vertical-align: text-bottom; border: 0; padding-right: 1px;\"></a><a href=\"https://archiveofourown.org/users/"+ fileread.recip + "/pseuds/" + fileread.recippseud.replace(" ","%20") + "\"><b>" + fileread.recippseud + " (" + fileread.recip + ")</b></a></span>")
|
||||
except:
|
||||
filewrite.write("<span style=\"white-space: nowrap;\" class=\"ljuser\"><a target=\"_blank\" href=\"https://archiveofourown.org/users/" + fileread.recip + "/profile\"><img src=\"https://p.dreamwidth.org/b164c54b26e4/-/archiveofourown.org/favicon.ico\" alt=\"[archiveofourown.org profile]\" width=\"16\" height=\"16\" style=\"vertical-align: text-bottom; border: 0; padding-right: 1px;\"></a><a target=\"_blank\" href=\"https://archiveofourown.org/users/"+ fileread.recip + "\"><b>" + fileread.recip + "</b></a></span>")
|
||||
filewrite.write("<span style=\"white-space: nowrap;\" class=\"ljuser\"><a href=\"https://archiveofourown.org/users/" + fileread.recip + "/profile\"><img src=\"https://p.dreamwidth.org/b164c54b26e4/-/archiveofourown.org/favicon.ico\" alt=\"[archiveofourown.org profile]\" width=\"16\" height=\"16\" style=\"vertical-align: text-bottom; border: 0; padding-right: 1px;\"></a><a href=\"https://archiveofourown.org/users/"+ fileread.recip + "\"><b>" + fileread.recip + "</b></a></span>")
|
||||
elif fileread.recipsite == "tumblr":
|
||||
filewrite.write("<span style=\"white-space: nowrap;\"><a target=\"_blank\" href=\"https://" + fileread.recip + ".tumblr.com\"><img src=\"https://www.tumblr.com/favicon.ico\" alt=\"[tumblr.com profile]\" style=\"vertical-align: text-bottom; border: 0; padding-right: 1px;\" width=\"16\" height=\"16\"></a><a target=\"_blank\" href=\"https://" + fileread.recip + ".tumblr.com\"><b>" + fileread.recip + "</b></a></span>")
|
||||
filewrite.write("<span style=\"white-space: nowrap;\"><a href=\"https://" + fileread.recip + ".tumblr.com\"><img src=\"https://www.tumblr.com/favicon.ico\" alt=\"[tumblr.com profile]\" style=\"vertical-align: text-bottom; border: 0; padding-right: 1px;\" width=\"16\" height=\"16\"></a><a href=\"https://" + fileread.recip + ".tumblr.com\"><b>" + fileread.recip + "</b></a></span>")
|
||||
except:
|
||||
filewrite.write(fileread.recip)
|
||||
filewrite.write("’s ")
|
||||
|
@ -572,15 +565,15 @@ def ficgen(ficno,unique=False,output="output.html",local=False,single=False):
|
|||
filewrite.write(", a gift for ")
|
||||
try:
|
||||
if fileread.recipsite == "dw":
|
||||
filewrite.write("<span style=\"white-space: nowrap;\" class=\"ljuser\"><a target=\"_blank\" href=\"https://" + fileread.recip.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 target=\"_blank\" href=\"https://"+ fileread.recip.replace("_","-") + ".dreamwidth.org/\"><b>" + fileread.recip.replace("-","_") + "</b></a></span>")
|
||||
filewrite.write("<span style=\"white-space: nowrap;\" class=\"ljuser\"><a href=\"https://" + fileread.recip.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://"+ fileread.recip.replace("_","-") + ".dreamwidth.org/\"><b>" + fileread.recip.replace("-","_") + "</b></a></span>")
|
||||
elif fileread.recipsite == "ao3":
|
||||
try:
|
||||
if fileread.recippseud:
|
||||
filewrite.write("<span style=\"white-space: nowrap;\" class=\"ljuser\"><a target=\"_blank\" href=\"https://archiveofourown.org/users/" + fileread.recip + "/profile\"><img src=\"https://p.dreamwidth.org/b164c54b26e4/-/archiveofourown.org/favicon.ico\" alt=\"[archiveofourown.org profile]\" width=\"16\" height=\"16\" style=\"vertical-align: text-bottom; border: 0; padding-right: 1px;\"></a><a target=\"_blank\" href=\"https://archiveofourown.org/users/"+ fileread.recip + "/pseuds/" + fileread.recippseud.replace(" ","%20") + "\"><b>" + fileread.recippseud + " (" + fileread.recip + ")</b></a></span>")
|
||||
filewrite.write("<span style=\"white-space: nowrap;\" class=\"ljuser\"><a href=\"https://archiveofourown.org/users/" + fileread.recip + "/profile\"><img src=\"https://p.dreamwidth.org/b164c54b26e4/-/archiveofourown.org/favicon.ico\" alt=\"[archiveofourown.org profile]\" width=\"16\" height=\"16\" style=\"vertical-align: text-bottom; border: 0; padding-right: 1px;\"></a><a href=\"https://archiveofourown.org/users/"+ fileread.recip + "/pseuds/" + fileread.recippseud.replace(" ","%20") + "\"><b>" + fileread.recippseud + " (" + fileread.recip + ")</b></a></span>")
|
||||
except:
|
||||
filewrite.write("<span style=\"white-space: nowrap;\" class=\"ljuser\"><a target=\"_blank\" href=\"https://archiveofourown.org/users/" + fileread.recip + "/profile\"><img src=\"https://p.dreamwidth.org/b164c54b26e4/-/archiveofourown.org/favicon.ico\" alt=\"[archiveofourown.org profile]\" width=\"16\" height=\"16\" style=\"vertical-align: text-bottom; border: 0; padding-right: 1px;\"></a><a target=\"_blank\" href=\"https://archiveofourown.org/users/" + fileread.recip + "\"><b>" + fileread.recip + "</b></a></span>")
|
||||
filewrite.write("<span style=\"white-space: nowrap;\" class=\"ljuser\"><a href=\"https://archiveofourown.org/users/" + fileread.recip + "/profile\"><img src=\"https://p.dreamwidth.org/b164c54b26e4/-/archiveofourown.org/favicon.ico\" alt=\"[archiveofourown.org profile]\" width=\"16\" height=\"16\" style=\"vertical-align: text-bottom; border: 0; padding-right: 1px;\"></a><a href=\"https://archiveofourown.org/users/" + fileread.recip + "\"><b>" + fileread.recip + "</b></a></span>")
|
||||
elif fileread.recipsite == "tumblr":
|
||||
filewrite.write("<span style=\"white-space: nowrap;\"><a target=\"_blank\" href=\"https://" + fileread.recip + ".tumblr.com\"><img src=\"https://www.tumblr.com/favicon.ico\" alt=\"[tumblr.com profile]\" style=\"vertical-align: text-bottom; border: 0; padding-right: 1px;\" width=\"16\" height=\"16\"></a><a target=\"_blank\" href=\"https://" + fileread.recip + ".tumblr.com\"><b>" + fileread.recip + "</b></a></span>")
|
||||
filewrite.write("<span style=\"white-space: nowrap;\"><a href=\"https://" + fileread.recip + ".tumblr.com\"><img src=\"https://www.tumblr.com/favicon.ico\" alt=\"[tumblr.com profile]\" style=\"vertical-align: text-bottom; border: 0; padding-right: 1px;\" width=\"16\" height=\"16\"></a><a href=\"https://" + fileread.recip + ".tumblr.com\"><b>" + fileread.recip + "</b></a></span>")
|
||||
except:
|
||||
filewrite.write(fileread.recip)
|
||||
filewrite.write(".")
|
||||
|
|
42
statsgen.py
42
statsgen.py
|
@ -185,31 +185,31 @@ def ficsum(ficcount,year,month=0,showfandom=True,local=False):
|
|||
ficstring += ", "
|
||||
if language:
|
||||
ficstring += language
|
||||
ficstring += "</a> <span class=\"ficinfo\">"
|
||||
ficstring += "</a>"
|
||||
if rating == "g":
|
||||
ficstring += "<span title=\"universal\">🟢</span>"
|
||||
ficstring += " <span style=\"background-color:#8ab60b;color:white; font-family:serif\"> U </span>"
|
||||
elif rating == "t":
|
||||
ficstring += "<span title=\"general\">🟡</span>"
|
||||
ficstring += " <span style=\"background-color:#e8d405;color:white; font-family:serif\"> G </span>"
|
||||
elif rating == "m":
|
||||
ficstring += "<span title=\"mature\">🟠</span>"
|
||||
ficstring += " <span style=\"background-color:#eb7d10;color:white; font-family:serif\"> M </span>"
|
||||
elif rating == "e":
|
||||
ficstring += "<span title=\"explicit\">🔴</span>"
|
||||
ficstring += " <span style=\"background-color:#9c0000;color:white; font-family:serif\"> X </span>"
|
||||
for thegenre in genre:
|
||||
if thegenre == "gen":
|
||||
ficstring += "<span title=\"gen\">⭕</span>"
|
||||
ficstring += " <span style=\"background-color:#8ab60b;color:white; font-family:serif\"> ☉ </span>"
|
||||
elif thegenre == "slash":
|
||||
ficstring += "<span title=\"slash\">👨👨</span>"
|
||||
ficstring += " <span style=\"background-color:#1256b6;color:white; font-family:serif\"> ♂ </span>"
|
||||
elif thegenre == "het":
|
||||
ficstring += "<span title=\"het\">👨👩</span>"
|
||||
ficstring += " <span style=\"background-color:#670840;color:white; font-family:serif\"> ⚤ </span>"
|
||||
elif thegenre == "femslash":
|
||||
ficstring += "<span title=\"femslash\">👩👩</span>"
|
||||
ficstring += " <span style=\"background-color:#d50636;color:white; font-family:serif\"> ♀ </span>"
|
||||
elif thegenre == "poly":
|
||||
ficstring += "<span title=\"poly\">🧑➕</span>"
|
||||
ficstring += " <span><span style=\"background:linear-gradient(0deg, rgba(160,0,24,1) 0%, rgba(160,0,24,1) 49%, rgba(171,203,0,1) 50%, rgba(171,203,0,1) 100%);\"> </span><span style=\"background: linear-gradient(0deg, rgba(0,51,148,1) 0%, rgba(0,51,148,1) 49%, rgba(129,0,108,1) 50%, rgba(129,0,108,1) 100%);\"> </span></span>"
|
||||
elif thegenre == "other":
|
||||
ficstring += "<span title=\"misc. romance/sex\">💖</span>"
|
||||
ficstring += " <span style=\"background-color:black;color:white; font-family:serif\"> ☿ </span>"
|
||||
if warnings:
|
||||
ficstring += "<span title=\"see notes for warnings\">❗</span>"
|
||||
ficstring += "</span> <code>" + str(words) + "</code>"
|
||||
ficstring += " <span style=\"background-color:#eb7d10;color:white; font-family:serif\"> !<small>?</small> </span>"
|
||||
ficstring += " <code>" + str(words) + "</code>"
|
||||
return ficstring
|
||||
|
||||
"""
|
||||
|
@ -476,13 +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 target=\"_blank\" 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 target=\"_blank\" href=\"https://" + (event["eventname"]).replace("_","-") + ".dreamwidth.org/\">" + (event["eventname"]).replace("-","_") + "</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 target=\"_blank\" 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 target=\"_blank\" href=\"https://"+ (event["eventname"]).replace("_","-") + ".dreamwidth.org/\">" + (event["eventname"]).replace("-","_")+ "</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 target=\"_blank\" 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 target=\"_blank\" href=\"https://"+ (event["eventname"]).replace("_","-") + ".livejournal.com/\">" + (event["eventname"]).replace("-","_")+ "</a></span>")
|
||||
elif event["eventname"] == "#ficwip":
|
||||
filewrite.write("<a target=\"_blank\" href=\"https://ficwip.carrd.co\">#ficwip</a>")
|
||||
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 target=\"_blank\" 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 target=\"_blank\" href=\"https://" + (event["eventname"]).replace("_","-") + ".dreamwidth.org/\">" + (event["eventname"]).replace("-","_") + "</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 target=\"_blank\" 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 target=\"_blank\" href=\"https://"+ (event["eventname"]).replace("_","-") + ".dreamwidth.org/\">" + (event["eventname"]).replace("-","_")+ "</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 target=\"_blank\" 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 target=\"_blank\" href=\"https://"+ (event["eventname"]).replace("_","-") + ".livejournal.com/\">" + (event["eventname"]).replace("-","_")+ "</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")
|
||||
|
@ -755,7 +753,7 @@ def yeargen(local=False):
|
|||
filewrite.write("\">" + str(nextyear) + " »</a></span>")
|
||||
except:
|
||||
pass
|
||||
filewrite.write("</p>\n</div>\n<a href=\"/\"><img src=\"/a.png\" style=\"position:fixed;bottom:2px;right:2px;\" title=\"home\"></a></body>\n</html>")
|
||||
filewrite.write("</p>\n</div>\n</body>\n</html>")
|
||||
filewrite.close()
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
|
@ -9,7 +9,7 @@ def verifygen(local=False):
|
|||
# write header
|
||||
headerfooter.headerwrite("build/verify/index.html","Tré’s fic archive","Warning","",True,local)
|
||||
filewrite = open("build/verify/index.html", "a")
|
||||
filewrite.write("<p><strong>Please note before proceeding:</strong></p>\n<p>Some of my fanfiction is NSFW (ranging from slightly obscene language to explicit sex scenes), some is RPF, and some of it contains mature or potentially objectionable themes (death, suicide, mental illness, incest …). Ratings and warnings are given accordingly, <strong>don’t like don’t read</strong>. If you consider yourself to be a minor, kindly gtfo and <em>read some real literature instead</em>. Honestly, it will be much more edifying.</p>\n<label for=\"verifyage-checkbox\">Please tick to confirm you have read this warning and are sufficiently mature to access this content:</label>\n<input type=\"checkbox\" id=\"verifyage-checkbox\">\n<button id=\"verifyage-button\">Let me in!</button>\n<div align=\"center\">\n<script src=\"https://ficring.neocities.org/ring.js\"></script>\n</div>\n</div>\n</div>\n<script>\nvar verifyageButton = document.getElementById(\"verifyage-button\"); var verifyageCheckbox = document.getElementById(\"verifyage-checkbox\"); verifyageButton.addEventListener(\"click\", () => {if (verifyageCheckbox.checked) {localStorage.setItem(\"ageVerified\", \"✓\"); if (window.location = window.location.search.startsWith(\"?returnto=\")) {window.location = window.location.search.substring(\"?returnto=\".length);} else {window.location = \"")
|
||||
filewrite.write("<p><strong>Please note before proceeding:</strong></p>\n<p>Some of my fanfiction is NSFW (ranging from slightly obscene language to explicit sex scenes), some is RPF, and some of it contains mature or potentially objectionable themes (death, suicide, mental illness, incest …). Ratings and warnings are given accordingly, <strong>don’t like don’t read</strong>. If you consider yourself to be a minor, kindly gtfo and <em>read some real literature instead</em>. Honestly, it will be much more edifying.</p>\n<label for=\"verifyage-checkbox\">Please tick to confirm you have read this warning and are sufficiently mature to access this content:</label>\n<input type=\"checkbox\" id=\"verifyage-checkbox\">\n<button id=\"verifyage-button\">Let me in!</button>\n<div align=\"center\">\n<script>\ndocument.write('<script src=\"https://ficring.neocities.org/ring.js\"><\/script>');\n</script>\n</div>\n</div>\n</div>\n<script>\nvar verifyageButton = document.getElementById(\"verifyage-button\"); var verifyageCheckbox = document.getElementById(\"verifyage-checkbox\"); verifyageButton.addEventListener(\"click\", () => {if (verifyageCheckbox.checked) {localStorage.setItem(\"ageVerified\", \"✓\"); if (window.location = window.location.search.startsWith(\"?returnto=\")) {window.location = window.location.search.substring(\"?returnto=\".length);} else {window.location = \"")
|
||||
if local:
|
||||
filewrite.write("/home/mdd/Documents/proj/fic-archive/build/index.html")
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue