code for my very abstruse python-based static site generator
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
trémeur 5bbece2ebe Tweaks to stats display on homepage 1 year ago
build Add page for FF fics by wordcount, deal with spoilers in RSS feed, change wording in a few places 1 year ago
originalsmeta Make AO3 slug optional in the template; correct links to translated fics in RSS feed 2 years ago
texts Add files 2 years ago
translationsmeta Add files 2 years ago
.gitignore Add archive CSS to git 2 years ago
COPYING Add files 2 years ago
README.org Add link to stats pages from index 1 year ago
build.sh Add local CSS option + emacs badge 2 years ago
characters.py Add FF16 2 years ago
commentpage.py Add page for FF fics by wordcount, deal with spoilers in RSS feed, change wording in a few places 1 year ago
events.py Account for unrevealed exchange/challenge fics, change some wording 2 years ago
fandoms.py Add page for FF fics by wordcount, deal with spoilers in RSS feed, change wording in a few places 1 year ago
feed.py Add page for FF fics by wordcount, deal with spoilers in RSS feed, change wording in a few places 1 year ago
generate.py Add page for FF fics by wordcount, deal with spoilers in RSS feed, change wording in a few places 1 year ago
headerfooter.py Add age verification gate and some noscript fallbacks 2 years ago
indexgen.py Tweaks to stats display on homepage 1 year ago
makeheader.py Add option for locking fics on AO3 but not here 2 years ago
masterlist.py Add page for FF fics by wordcount, deal with spoilers in RSS feed, change wording in a few places 1 year ago
ships.py Add FF16 2 years ago
sortfics.sh Sort fandoms properly, don’t return false positives for locked fics 1 year ago
statsgen.py Correct stats page links for translations 2 years ago
verifygen.py Add age verification gate and some noscript fallbacks 2 years ago
wordcount.py Add page for FF fics by wordcount, deal with spoilers in RSS feed, change wording in a few places 1 year ago

README.org

Code for my personal fic archive

Preliminaries

build.sh generates files in the build directory and uploads them to the remote using rclone. To build locally for testing, run python3 generate.py local, which generates links that point straight to index.html instead of the containing directory.

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).

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.

Requisites: rclone (just for uploading files to the server), Python 3.

My use case

  • most of my fandoms are numbered parts of a bigger franchise
  • some of my fics have both English and French versions
  • I have a lot of juvenilia that I want to place behind a veneer of protection
  • all my fics are (currently) on AO3, most have HTML versions, newer ones also have EPUB and PDF versions
  • I have weird rules about comments and sometimes turn them off after a certain period

Future plans [2/3]

  • redirect to a consent page using local storage (h/t Fandom Coders)
  • pages for times and locations in FF fandoms
  • possibly a page for non-FF fandoms (as if I even care about these lol)