From f758ec46ad3d29753056fc042f792eb9d0b1f6f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?tr=C3=A9meur?= Date: Sat, 6 Apr 2024 19:03:38 +0100 Subject: [PATCH] Add links to singles pages and to fedi posts where applicable --- README.org | 6 +++--- makeheader.py | 21 ++++++++++++++++++--- originalsmeta/template.py | 1 + 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/README.org b/README.org index 1793d09..273c062 100644 --- a/README.org +++ b/README.org @@ -22,11 +22,11 @@ Requisites: =rclone= (just for uploading files to the server), Python 3. - some but not all of my fics are on AO3; HTML, PDF and EPUB formats exist for most, but this can be adjusted for individual entries as needed - whether commenting is enabled on a particular fic depends on a couple of factors -** Future plans [2/6] +** Future plans [3/6] - [X] +redirect to a consent page using local storage (h/t [[https://www.fancoders.com/][Fandom Coders]])+ - [ ] pages for times and locations in FF fandoms - [X] +possibly a page for non-FF fandoms (as if I even care about these lol)+ -- [ ] python-based browser for loading in fic metadata and grabbing stats (“what were my top ships in 2022” etc.) +- [ ] python-based browser for loading in fic metadata and grabbing stats (“what were my top ships in 2022” etc.) – in progress - [ ] drabble wall -- [ ] link to singles pages from headers? on the number? +- [X] +link to singles pages from headers? on the number?+ diff --git a/makeheader.py b/makeheader.py index b2df402..7ceb279 100644 --- a/makeheader.py +++ b/makeheader.py @@ -102,6 +102,11 @@ def linkgen(ficno,output="output.html",local=False): filewrite.write("href=\"https://archiveofourown.org/works/" + str(fileread.ao3slug) + "\">AO3\n") except: pass + # write fedi share link if there is one + try: + filewrite.write("
  • fedi
  • \n") + except: + pass # determine if comments page if any(item in fffandoms for item in fileread.fandom): filewrite.write("
  • \n

    no. " + ficnostring) - # write ficno including translation if there is one + filewrite.write(">\n

    no. " + ficnostring + "") try: - filewrite.write("/" + translationstring) + if translationstring: + filewrite.write("/" + translationstring + "") except: pass filewrite.write("") diff --git a/originalsmeta/template.py b/originalsmeta/template.py index 0eeeb5b..3f44c8d 100644 --- a/originalsmeta/template.py +++ b/originalsmeta/template.py @@ -39,6 +39,7 @@ locked = False 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 it’s a dw/lj anon