Open external links in new tabs, set correct dates for RSS feed

master
trémeur 3 weeks ago
parent 6502979225
commit 1830a5f64d

@ -135,12 +135,19 @@ div.fic h1 span.ficnoprelim {
font-size: 0.6em;
}
div.fic h1 span.abandoned {
div.fic h1 span.abandoned, div.fic h1 span.incomplete {
font-weight: normal;
background-color: #9c0000;
color: white;
}
div.fic h1 span.abandoned {
background-color: #9c0000;
}
div.fic h1 span.incomplete {
background-color: #8ab60b;
}
div.fic ul.ficlinks li, div.fic ul.ficmeta li {
list-style: none;
}

@ -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 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>")
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>")
elif eventlocation == "dwcomm":
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>")
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>")
elif eventlocation == "ljjournal":
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>")
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>")
else:
filewrite.write(theevent)
filewrite.write("</b> (" + str(len(evententries)) + ": " + ", ".join(eventfandoms) + ")</summary>\n")

@ -160,8 +160,7 @@ def feedgen(local=False):
filewrite.write(", " + thegenre)
genred = True
filewrite.write("</title>\n<pubDate>")
futuredate = date + datetime.timedelta(days=2)
filewrite.write(futuredate.strftime("%a, %-d %b %Y"))
filewrite.write(date.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/")

@ -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</body>\n</html>")
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.close()

@ -58,7 +58,7 @@ def indexgen(local=False):
# write header
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, but this site is the canonical location for everything Ive 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=\"")
filewrite.write("<p>Here is all my fanfiction! Some of it is also syndicated elsewhere, but this site is the canonical location for everything Ive 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=\"")
if local:
filewrite.write("comments/index.html")
else:

@ -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 ")
filewrite.write("<li class=\"prazelink\"><a target=\"_blank\" ")
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 ")
filewrite.write("<li class=\"prazelink\"><a target=\"_blank\" ")
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 ")
filewrite.write("<li class=\"prazelink\"><a target=\"_blank\" ")
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 class=\"u-syndication")
filewrite.write("<li class=\"ao3link\"><a target=\"_blank\" 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 ")
filewrite.write("<li class=\"prazelink\"><a target=\"_blank\" ")
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 ")
filewrite.write("<li class=\"prazelink\"><a target=\"_blank\" ")
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 ")
filewrite.write("<li class=\"prazelink\"><a target=\"_blank\" ")
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 ")
filewrite.write("<li class=\"ao3link\"><a target=\"_blank\" ")
if fileread.locked:
filewrite.write("class=\"locked\" ")
filewrite.write("href=\"https://archiveofourown.org/works/" + str(transread.ao3slug) + "\">AO3</a></li>\n")
@ -325,6 +325,8 @@ 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":
@ -501,16 +503,16 @@ 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 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>.")
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>.")
try:
if fileread.notes:
filewrite.write(" ")
except:
pass
elif fileread.eventname == "robotsoup":
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.")
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 href=\"https://ficwip.carrd.co\">#ficwip</a> event <i>" + fileread.eventdeets + "</i>")
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(".")
@ -523,11 +525,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 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>")
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>")
elif fileread.eventlocation == "dwjournal":
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>")
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>")
elif fileread.eventlocation == "ljjournal":
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>")
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>")
except:
if fileread.eventname == "Semaine de la fic française":
filewrite.write("<i>Semaine de la fic française</i>")
@ -546,15 +548,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 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>")
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>")
elif fileread.recipsite == "ao3":
try:
if fileread.recippseud:
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>")
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>")
except:
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>")
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>")
elif fileread.recipsite == "tumblr":
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>")
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>")
except:
filewrite.write(fileread.recip)
filewrite.write("s ")
@ -570,15 +572,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 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>")
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>")
elif fileread.recipsite == "ao3":
try:
if fileread.recippseud:
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>")
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>")
except:
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>")
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>")
elif fileread.recipsite == "tumblr":
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>")
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>")
except:
filewrite.write(fileread.recip)
filewrite.write(".")

@ -476,13 +476,13 @@ 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: baseline; border: 0; padding-right: 1px;\"></a><a href=\"https://" + (event["eventname"]).replace("_","-") + ".dreamwidth.org/\">" + (event["eventname"]).replace("-","_") + "</a></span>")
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>")
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: baseline; border: 0; padding-right: 1px;\"></a><a href=\"https://"+ (event["eventname"]).replace("_","-") + ".dreamwidth.org/\">" + (event["eventname"]).replace("-","_")+ "</a></span>")
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>")
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: baseline; border: 0; padding-right: 1px;\"></a><a href=\"https://"+ (event["eventname"]).replace("_","-") + ".livejournal.com/\">" + (event["eventname"]).replace("-","_")+ "</a></span>")
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 href=\"https://ficwip.carrd.co\">#ficwip</a>")
filewrite.write("<a target=\"_blank\" href=\"https://ficwip.carrd.co\">#ficwip</a>")
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 +493,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: baseline; border: 0; padding-right: 1px;\"></a><a href=\"https://" + (event["eventname"]).replace("_","-") + ".dreamwidth.org/\">" + (event["eventname"]).replace("-","_") + "</a></span>")
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>")
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: baseline; border: 0; padding-right: 1px;\"></a><a href=\"https://"+ (event["eventname"]).replace("_","-") + ".dreamwidth.org/\">" + (event["eventname"]).replace("-","_")+ "</a></span>")
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>")
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: baseline; border: 0; padding-right: 1px;\"></a><a href=\"https://"+ (event["eventname"]).replace("_","-") + ".livejournal.com/\">" + (event["eventname"]).replace("-","_")+ "</a></span>")
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>")
else:
filewrite.write(event["eventname"])
filewrite.write("</h3>\n<ol>\n")
@ -755,7 +755,7 @@ def yeargen(local=False):
filewrite.write("\">" + str(nextyear) + " »</a></span>")
except:
pass
filewrite.write("</p>\n</div>\n</body>\n</html>")
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.close()
if __name__ == "__main__":

Loading…
Cancel
Save