.gitignore | ||
archivesearch.py | ||
build.sh | ||
COPYING | ||
fandomsedit.py | ||
feed.py | ||
generate.py | ||
mention.py | ||
new.py | ||
originals-template.py | ||
README.org | ||
sortfics.sh | ||
stats.py | ||
translations-template.py |
Code for my personal fic archive
Significantly redesigned in July 2025.
Preliminaries
This is very much set up for my own use, but the code is public so others can see how this works and build similar things for themselves, if they like.
build.sh
generates files in the build
directory and uploads them to the remote using rclone
.
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 basic auth as specified in my site’s nginx configuration. In the current setup the comments are sent to a private GoToSocial account, so do modify the POST request in the comments pages if you don’t want your own test comments being sent to me, haha.
Requisites: rclone
(just for uploading files to the server), Python 3, and the Python libraries bs4
, datetime
, importlib
, os
, random
, re
, requests
(out of these bs4
and requests
are probably the only ones that require explicit installation).
My use case
- most of my current 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
- HTML, PDF and EPUB formats exist for most fics, but this can be adjusted for individual entries as needed
- whether commenting is enabled on a particular fic depends on a couple of factors