Move template files to the main repo; adjust readme for folder structure changes; tweak some wording on the site

master
trémeur 4 months ago
parent e684db95fe
commit cae70a35f9

@ -8,7 +8,7 @@ This is very much set up for my own use, but the code is public so others can se
This is for my personal use and definitely wont work as is for other people, but feel free to dig around in the files. I am an amateur and I almost certainly dont follow best practices in any respect. This is for my personal use and definitely wont work as is for other people, but feel free to dig around in the files. I am an amateur and I almost certainly dont follow best practices in any respect.
Fic metadata lives in =originalsmeta/= following the template, translation metadata in =translationsmeta/=; the filename for each is a unique 3-digit number. Fic files with the corresponding filenames live in =texts= (HTML, PDF, and EPUB are recognised in the script, which then moves them into =build/files/= or =build/secret/= according to metadata). Fic metadata lives in =files/originalsmeta/= following the template, translation metadata in =files/translationsmeta/=; the filename for each is a unique 3-digit number. Fic files with the corresponding filenames live in =files/texts= (HTML, PDF, and EPUB are recognised in the script, which then moves them into =build/files/= or =build/secret/= according to metadata).
On the server my =secret/= folder is protected using =.htpasswd=. In the current setup the comments are sent to my private Discord server using webhooks, so do modify the POST request in the comments pages if you dont want your own test comments being sent to my server, haha. On the server my =secret/= folder is protected using =.htpasswd=. In the current setup the comments are sent to my private Discord server using webhooks, so do modify the POST request in the comments pages if you dont want your own test comments being sent to my server, haha.

@ -162,7 +162,7 @@ def commentindex(local=False):
# write header # write header
headerfooter.headerwrite("build/comments/index.html","Comments","Comments","",False,local) headerfooter.headerwrite("build/comments/index.html","Comments","Comments","",False,local)
filewrite = open("build/comments/index.html", "a") filewrite = open("build/comments/index.html", "a")
filewrite.write("<p>Comments I receive are archived on this site and linked back to the original. If you dont want your comments from other sources archived here, or if you require any changes to the presentation of your comments, <a href=\"mailto:tre@praze.net\">please email me</a>. Please note, however, that this website is not indexed by search engines and the only places I really “advertise” it are Dreamwidth and, sparingly, AO3.</p>\n<p>You can leave comments on the relevant comment pages for each fic. If youd like notification of any reply, please leave your email address. If youd like a link from your pseudonym to a website, you can supply this as well. Ill happily link to personal websites, Dreamwidth profiles, and (at least for now) AO3 profiles; Im 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 its in a Final Fantasy fandom. On AO3, comments are left open on fics written for AO3-hosted gift exchanges that ran in 2020 or later.</p>\n") filewrite.write("<p>Comments I receive are archived on this site and linked back to the original. If you dont 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 dont “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 youd like notification of any reply, please leave your email address. If youd like a link from your pseudonym to a website, you can supply this as well. Ill happily link to personal websites, Dreamwidth profiles, and (at least for now) AO3 profiles; Im 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 its in a Final Fantasy fandom.</p>\n")
filewrite.close() filewrite.close()
headerfooter.footerwrite("build/comments/index.html",False,local) headerfooter.footerwrite("build/comments/index.html",False,local)

@ -58,7 +58,7 @@ def indexgen(local=False):
# write header # write header
headerfooter.headerwrite("build/index.html","Trés fic archive","Tré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 = open("build/index.html", "a")
filewrite.write("<p>Here is all my fanfiction! Much of it is also archived at AO3 under the name <span style=\"white-space: nowrap;\" class=\"ljuser\"><a href=\"https://archiveofourown.org/users/ovely/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/ovely/pseuds/ovely\"><b>ovely</b></a></span>.</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. I authorise transformative works as long as the original is linked 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: if local:
filewrite.write("comments/index.html") filewrite.write("comments/index.html")
else: else:
@ -96,7 +96,7 @@ def indexgen(local=False):
filewrite.write("events/index.html") filewrite.write("events/index.html")
else: else:
filewrite.write("/fic/events") filewrite.write("/fic/events")
filewrite.write("\">Events</a></h2>\n<p>Ive been participating in fandom exchanges and other events since late 2020. Most fics I write these days that arent in FF fandoms are in this category (although a lot of the FF ones are as well).</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.write("\">Events</a></h2>\n<p>Since 2020 Ive 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() filewrite.close()
headerfooter.footerwrite("build/index.html",True,local) headerfooter.footerwrite("build/index.html",True,local)

@ -0,0 +1,49 @@
import datetime
title = "" # just the number is fine
showtitle = False
language = "en"
# translation =
datewords = [{"date":datetime.datetime(YYYY,M,D),"words":}]
# revealdate = datetime.datetime(YYYY,M,D)
# approxdate = ""
status = "complete" # incomplete, abandoned
rating = "" # g, t, m, e
# ratingreason = ""
fandom = [""]
# fandomtext = ""
# charpov = [""]
# charmain = [""]
# charsecondary = [""]
# charmention = [""]
# ship = [""]
genre = [""]
# warnings = ""
time = ""
location = [""]
# locationtext = ""
# summary = ""
# notes = ""
# event = "" # challenge (including fests; anything without a specific prompt), ao3exchange, exchange, prompt
# eventlocation = "" # dwcomm, dwjournal, ljjournal
# eventname = ""
# eventdeets = "" # probably not needed unless its robotsoup
# eventfrequency = "" # "annual" or some custom value like "summer 2022 round" or can leave
# prompt = ""
# recip = ""
# recippseud = ""
# recipsite = "" # ao3, dw, tumblr
locked = False
# ao3slug =
# ao3locked =
html = True
pdf = True
epub = True
# fedislug = ""
# comments = [{"site":"", # ao3, dw, lj, discord
# "registered":, # True or False, not required for discord
# "username":"", # leave out if its a dw/lj anon
# "pseud":"", # optional, ao3 only
# "date":datetime.datetime(),
# "link":"",
# "text":""}]

@ -0,0 +1,11 @@
import datetime
title = ""
showtitle = False
language = "fr"
original =
datewords = [{"date":datetime.datetime(YYYY,M,D),"words":}]
status = "complete" # incomplete, abandoned
summary = ""
ao3slug =
# comments = [] # see originalsmeta/template.py for format
Loading…
Cancel
Save