Store all user data in a folder
This commit is contained in:
parent
f92d6fab53
commit
d3d579840a
19 changed files with 84 additions and 151 deletions
9
.gitignore
vendored
9
.gitignore
vendored
|
@ -16,12 +16,5 @@ build/secret/*.epub
|
||||||
build/secret/*.gif
|
build/secret/*.gif
|
||||||
build/secret/*.png
|
build/secret/*.png
|
||||||
build/emacs.jpg
|
build/emacs.jpg
|
||||||
originalsmeta/*
|
files/
|
||||||
!originalsmeta/__init__.py
|
|
||||||
!originalsmeta/template.py
|
|
||||||
texts/*
|
|
||||||
!texts/.gitkeep
|
|
||||||
translationsmeta/*
|
|
||||||
!translationsmeta/__init__.py
|
|
||||||
!translationsmeta/template.py
|
|
||||||
build/stats/*/index.html
|
build/stats/*/index.html
|
|
@ -26,8 +26,8 @@ def charlist(local=False):
|
||||||
ficcountstring = "0" + str(ficcount)
|
ficcountstring = "0" + str(ficcount)
|
||||||
else:
|
else:
|
||||||
ficcountstring = str(ficcount)
|
ficcountstring = str(ficcount)
|
||||||
if os.path.exists("originalsmeta/" + ficcountstring + ".py"):
|
if os.path.exists("files/originalsmeta/" + ficcountstring + ".py"):
|
||||||
ficfile = "originalsmeta." + ficcountstring
|
ficfile = "files.originalsmeta." + ficcountstring
|
||||||
fileread = import_module(ficfile)
|
fileread = import_module(ficfile)
|
||||||
try:
|
try:
|
||||||
if fileread.revealdate > datetime.datetime.now():
|
if fileread.revealdate > datetime.datetime.now():
|
||||||
|
@ -79,8 +79,8 @@ def charlist(local=False):
|
||||||
ficcountstring = "0" + str(ficcount)
|
ficcountstring = "0" + str(ficcount)
|
||||||
else:
|
else:
|
||||||
ficcountstring = str(ficcount)
|
ficcountstring = str(ficcount)
|
||||||
if os.path.exists("originalsmeta/" + ficcountstring + ".py"):
|
if os.path.exists("files/originalsmeta/" + ficcountstring + ".py"):
|
||||||
countfile = "originalsmeta." + ficcountstring
|
countfile = "files.originalsmeta." + ficcountstring
|
||||||
fileread = import_module(countfile)
|
fileread = import_module(countfile)
|
||||||
try:
|
try:
|
||||||
if fileread.revealdate > datetime.datetime.now():
|
if fileread.revealdate > datetime.datetime.now():
|
||||||
|
|
|
@ -27,7 +27,7 @@ def commentpage(ficno,directory,local=False):
|
||||||
else:
|
else:
|
||||||
fffandom = False
|
fffandom = False
|
||||||
except:
|
except:
|
||||||
origfile = "originalsmeta." + str(fileread.original)
|
origfile = "files.originalsmeta." + str(fileread.original)
|
||||||
origread = import_module(origfile)
|
origread = import_module(origfile)
|
||||||
if any(item in fffandoms for item in origread.fandom):
|
if any(item in fffandoms for item in origread.fandom):
|
||||||
fffandom = True
|
fffandom = True
|
||||||
|
@ -143,10 +143,10 @@ def allcomments(local=False):
|
||||||
ficcountstring = "0" + str(ficcount)
|
ficcountstring = "0" + str(ficcount)
|
||||||
else:
|
else:
|
||||||
ficcountstring = str(ficcount)
|
ficcountstring = str(ficcount)
|
||||||
if os.path.exists("originalsmeta/" + ficcountstring + ".py"):
|
if os.path.exists("files/originalsmeta/" + ficcountstring + ".py"):
|
||||||
commentpage(ficcount,"originalsmeta",local)
|
commentpage(ficcount,"files.originalsmeta",local)
|
||||||
elif os.path.exists("translationsmeta/" + ficcountstring + ".py"):
|
elif os.path.exists("files/translationsmeta/" + ficcountstring + ".py"):
|
||||||
commentpage(ficcount,"translationsmeta",local)
|
commentpage(ficcount,"files.translationsmeta",local)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
allcomments()
|
allcomments()
|
||||||
|
|
|
@ -21,8 +21,8 @@ def eventlist(local=False):
|
||||||
ficcountstring = "0" + str(ficcount)
|
ficcountstring = "0" + str(ficcount)
|
||||||
else:
|
else:
|
||||||
ficcountstring = str(ficcount)
|
ficcountstring = str(ficcount)
|
||||||
if os.path.exists("originalsmeta/" + ficcountstring + ".py"):
|
if os.path.exists("files/originalsmeta/" + ficcountstring + ".py"):
|
||||||
ficfile = "originalsmeta." + ficcountstring
|
ficfile = "files.originalsmeta." + ficcountstring
|
||||||
fileread = import_module(ficfile)
|
fileread = import_module(ficfile)
|
||||||
try:
|
try:
|
||||||
if fileread.revealdate > datetime.datetime.now():
|
if fileread.revealdate > datetime.datetime.now():
|
||||||
|
@ -57,8 +57,8 @@ def eventlist(local=False):
|
||||||
ficcountstring = "0" + str(ficcount)
|
ficcountstring = "0" + str(ficcount)
|
||||||
else:
|
else:
|
||||||
ficcountstring = str(ficcount)
|
ficcountstring = str(ficcount)
|
||||||
if os.path.exists("originalsmeta/" + ficcountstring + ".py"):
|
if os.path.exists("files/originalsmeta/" + ficcountstring + ".py"):
|
||||||
countfile = "originalsmeta." + ficcountstring
|
countfile = "files.originalsmeta." + ficcountstring
|
||||||
fileread = import_module(countfile)
|
fileread = import_module(countfile)
|
||||||
try:
|
try:
|
||||||
if fileread.revealdate > datetime.datetime.now():
|
if fileread.revealdate > datetime.datetime.now():
|
||||||
|
|
12
fandoms.py
12
fandoms.py
|
@ -21,8 +21,8 @@ def fandomlist(local=False):
|
||||||
ficcountstring = "0" + str(ficcount)
|
ficcountstring = "0" + str(ficcount)
|
||||||
else:
|
else:
|
||||||
ficcountstring = str(ficcount)
|
ficcountstring = str(ficcount)
|
||||||
if os.path.exists("originalsmeta/" + ficcountstring + ".py"):
|
if os.path.exists("files/originalsmeta/" + ficcountstring + ".py"):
|
||||||
ficfile = "originalsmeta." + ficcountstring
|
ficfile = "files.originalsmeta." + ficcountstring
|
||||||
fileread = import_module(ficfile)
|
fileread = import_module(ficfile)
|
||||||
try:
|
try:
|
||||||
if fileread.revealdate > datetime.datetime.now():
|
if fileread.revealdate > datetime.datetime.now():
|
||||||
|
@ -64,8 +64,8 @@ def fandomlist(local=False):
|
||||||
ficcountstring = "0" + str(ficcount)
|
ficcountstring = "0" + str(ficcount)
|
||||||
else:
|
else:
|
||||||
ficcountstring = str(ficcount)
|
ficcountstring = str(ficcount)
|
||||||
if os.path.exists("originalsmeta/" + ficcountstring + ".py"):
|
if os.path.exists("files/originalsmeta/" + ficcountstring + ".py"):
|
||||||
countfile = "originalsmeta." + ficcountstring
|
countfile = "files.originalsmeta." + ficcountstring
|
||||||
fileread = import_module(countfile)
|
fileread = import_module(countfile)
|
||||||
try:
|
try:
|
||||||
if fileread.revealdate > datetime.datetime.now():
|
if fileread.revealdate > datetime.datetime.now():
|
||||||
|
@ -88,7 +88,7 @@ def fandomlist(local=False):
|
||||||
firstficstring = "0" + str(firstfic)
|
firstficstring = "0" + str(firstfic)
|
||||||
else:
|
else:
|
||||||
firstficstring = str(firstfic)
|
firstficstring = str(firstfic)
|
||||||
firstfile = "originalsmeta." + firstficstring
|
firstfile = "files.originalsmeta." + firstficstring
|
||||||
firstread = import_module(firstfile)
|
firstread = import_module(firstfile)
|
||||||
firstyear = (firstread.datewords[0])["date"].year
|
firstyear = (firstread.datewords[0])["date"].year
|
||||||
lastfic = fandomfics[0]
|
lastfic = fandomfics[0]
|
||||||
|
@ -98,7 +98,7 @@ def fandomlist(local=False):
|
||||||
lastficstring = "0" + str(lastfic)
|
lastficstring = "0" + str(lastfic)
|
||||||
else:
|
else:
|
||||||
lastficstring = str(lastfic)
|
lastficstring = str(lastfic)
|
||||||
lastfile = "originalsmeta." + lastficstring
|
lastfile = "files.originalsmeta." + lastficstring
|
||||||
lastread = import_module(lastfile)
|
lastread = import_module(lastfile)
|
||||||
lastyear = (lastread.datewords[0])["date"].year
|
lastyear = (lastread.datewords[0])["date"].year
|
||||||
if lastyear == firstyear:
|
if lastyear == firstyear:
|
||||||
|
|
18
feed.py
18
feed.py
|
@ -23,8 +23,8 @@ def feedgen(local=False):
|
||||||
ficcountstring = "0" + str(ficcount)
|
ficcountstring = "0" + str(ficcount)
|
||||||
else:
|
else:
|
||||||
ficcountstring = str(ficcount)
|
ficcountstring = str(ficcount)
|
||||||
if os.path.exists("originalsmeta/" + ficcountstring + ".py"):
|
if os.path.exists("files/originalsmeta/" + ficcountstring + ".py"):
|
||||||
ficfile = "originalsmeta." + ficcountstring
|
ficfile = "files.originalsmeta." + ficcountstring
|
||||||
fileread = import_module(ficfile)
|
fileread = import_module(ficfile)
|
||||||
try:
|
try:
|
||||||
if fileread.revealdate <= datetime.datetime.now():
|
if fileread.revealdate <= datetime.datetime.now():
|
||||||
|
@ -32,8 +32,8 @@ def feedgen(local=False):
|
||||||
except:
|
except:
|
||||||
for instalment in fileread.datewords:
|
for instalment in fileread.datewords:
|
||||||
datelist.append(instalment["date"])
|
datelist.append(instalment["date"])
|
||||||
elif os.path.exists("translationsmeta/" + ficcountstring + ".py"):
|
elif os.path.exists("files/translationsmeta/" + ficcountstring + ".py"):
|
||||||
ficfile = "translationsmeta." + ficcountstring
|
ficfile = "files.translationsmeta." + ficcountstring
|
||||||
fileread = import_module(ficfile)
|
fileread = import_module(ficfile)
|
||||||
for instalment in fileread.datewords:
|
for instalment in fileread.datewords:
|
||||||
datelist.append(instalment["date"])
|
datelist.append(instalment["date"])
|
||||||
|
@ -53,8 +53,8 @@ def feedgen(local=False):
|
||||||
else:
|
else:
|
||||||
ficcountstring = str(ficcount)
|
ficcountstring = str(ficcount)
|
||||||
targetfile = 0
|
targetfile = 0
|
||||||
if os.path.exists("originalsmeta/" + ficcountstring + ".py"):
|
if os.path.exists("files/originalsmeta/" + ficcountstring + ".py"):
|
||||||
ficfile = "originalsmeta." + ficcountstring
|
ficfile = "files.originalsmeta." + ficcountstring
|
||||||
fileread = import_module(ficfile)
|
fileread = import_module(ficfile)
|
||||||
try:
|
try:
|
||||||
if fileread.revealdate <= datetime.datetime.now():
|
if fileread.revealdate <= datetime.datetime.now():
|
||||||
|
@ -66,8 +66,8 @@ def feedgen(local=False):
|
||||||
if instalment["date"] == date:
|
if instalment["date"] == date:
|
||||||
if targetfile == 0:
|
if targetfile == 0:
|
||||||
targetfile = ficfile
|
targetfile = ficfile
|
||||||
elif os.path.exists("translationsmeta/" + ficcountstring + ".py"):
|
elif os.path.exists("files/translationsmeta/" + ficcountstring + ".py"):
|
||||||
transfile = "translationsmeta." + ficcountstring
|
transfile = "files.translationsmeta." + ficcountstring
|
||||||
transread = import_module(transfile)
|
transread = import_module(transfile)
|
||||||
for instalment in transread.datewords:
|
for instalment in transread.datewords:
|
||||||
if instalment["date"] == date:
|
if instalment["date"] == date:
|
||||||
|
@ -90,7 +90,7 @@ def feedgen(local=False):
|
||||||
filewrite.write (" (French)")
|
filewrite.write (" (French)")
|
||||||
filewrite.write(": ")
|
filewrite.write(": ")
|
||||||
try:
|
try:
|
||||||
origfile = "originalsmeta." + str(thefile.original)
|
origfile = "files.originalsmeta." + str(thefile.original)
|
||||||
origread = import_module(origfile)
|
origread = import_module(origfile)
|
||||||
try:
|
try:
|
||||||
filewrite.write(origread.fandomtext)
|
filewrite.write(origread.fandomtext)
|
||||||
|
|
|
@ -14,11 +14,11 @@ def statslist(local=False):
|
||||||
ficcountstring = "0" + str(ficcount)
|
ficcountstring = "0" + str(ficcount)
|
||||||
else:
|
else:
|
||||||
ficcountstring = str(ficcount)
|
ficcountstring = str(ficcount)
|
||||||
if os.path.exists("originalsmeta/" + ficcountstring + ".py"):
|
if os.path.exists("files/originalsmeta/" + ficcountstring + ".py"):
|
||||||
ficfile = "originalsmeta." + ficcountstring
|
ficfile = "files.originalsmeta." + ficcountstring
|
||||||
fileread = import_module(ficfile)
|
fileread = import_module(ficfile)
|
||||||
elif os.path.exists("translationsmeta/" + ficcountstring + ".py"):
|
elif os.path.exists("files/translationsmeta/" + ficcountstring + ".py"):
|
||||||
ficfile = "translationsmeta." + ficcountstring
|
ficfile = "files.translationsmeta." + ficcountstring
|
||||||
fileread = import_module(ficfile)
|
fileread = import_module(ficfile)
|
||||||
else:
|
else:
|
||||||
fileread = False
|
fileread = False
|
||||||
|
|
|
@ -17,7 +17,7 @@ def linkgen(ficno,output="output.html",local=False):
|
||||||
else:
|
else:
|
||||||
ficnostring = str(ficno)
|
ficnostring = str(ficno)
|
||||||
# open the file
|
# open the file
|
||||||
ficfile = "originalsmeta." + ficnostring
|
ficfile = "files.originalsmeta." + ficnostring
|
||||||
fileread = import_module(ficfile)
|
fileread = import_module(ficfile)
|
||||||
# open translation file if there is one
|
# open translation file if there is one
|
||||||
try:
|
try:
|
||||||
|
@ -28,7 +28,7 @@ def linkgen(ficno,output="output.html",local=False):
|
||||||
translationstring = "0" + str(fileread.translation)
|
translationstring = "0" + str(fileread.translation)
|
||||||
else:
|
else:
|
||||||
translationstring = str(fileread.translation)
|
translationstring = str(fileread.translation)
|
||||||
translationfile = "translationsmeta." + translationstring
|
translationfile = "files.translationsmeta." + translationstring
|
||||||
transread = import_module(translationfile)
|
transread = import_module(translationfile)
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
@ -259,7 +259,7 @@ def ficgen(ficno,unique=False,output="output.html",local=False):
|
||||||
else:
|
else:
|
||||||
ficnostring = str(ficno)
|
ficnostring = str(ficno)
|
||||||
# open the file
|
# open the file
|
||||||
ficfile = "originalsmeta." + ficnostring
|
ficfile = "files.originalsmeta." + ficnostring
|
||||||
fileread = import_module(ficfile)
|
fileread = import_module(ficfile)
|
||||||
# open translation file if there is one
|
# open translation file if there is one
|
||||||
try:
|
try:
|
||||||
|
@ -270,7 +270,7 @@ def ficgen(ficno,unique=False,output="output.html",local=False):
|
||||||
translationstring = "0" + str(fileread.translation)
|
translationstring = "0" + str(fileread.translation)
|
||||||
else:
|
else:
|
||||||
translationstring = str(fileread.translation)
|
translationstring = str(fileread.translation)
|
||||||
translationfile = "translationsmeta." + translationstring
|
translationfile = "files.translationsmeta." + translationstring
|
||||||
transread = import_module(translationfile)
|
transread = import_module(translationfile)
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
|
@ -25,8 +25,8 @@ def listgen(local=False):
|
||||||
ficcountstring = "0" + str(ficcount)
|
ficcountstring = "0" + str(ficcount)
|
||||||
else:
|
else:
|
||||||
ficcountstring = str(ficcount)
|
ficcountstring = str(ficcount)
|
||||||
if os.path.exists("originalsmeta/" + ficcountstring + ".py"):
|
if os.path.exists("files/originalsmeta/" + ficcountstring + ".py"):
|
||||||
ficfile = "originalsmeta." + ficcountstring
|
ficfile = "files.originalsmeta." + ficcountstring
|
||||||
fileread = import_module(ficfile)
|
fileread = import_module(ficfile)
|
||||||
try:
|
try:
|
||||||
if fileread.revealdate <= datetime.datetime.now():
|
if fileread.revealdate <= datetime.datetime.now():
|
||||||
|
|
|
@ -1,49 +0,0 @@
|
||||||
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 it’s 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 it’s a dw/lj anon
|
|
||||||
# "pseud":"", # optional, ao3 only
|
|
||||||
# "date":datetime.datetime(),
|
|
||||||
# "link":"",
|
|
||||||
# "text":""}]
|
|
8
ships.py
8
ships.py
|
@ -26,8 +26,8 @@ def shiplist(local=False):
|
||||||
ficcountstring = "0" + str(ficcount)
|
ficcountstring = "0" + str(ficcount)
|
||||||
else:
|
else:
|
||||||
ficcountstring = str(ficcount)
|
ficcountstring = str(ficcount)
|
||||||
if os.path.exists("originalsmeta/" + ficcountstring + ".py"):
|
if os.path.exists("files/originalsmeta/" + ficcountstring + ".py"):
|
||||||
ficfile = "originalsmeta." + ficcountstring
|
ficfile = "files.originalsmeta." + ficcountstring
|
||||||
fileread = import_module(ficfile)
|
fileread = import_module(ficfile)
|
||||||
try:
|
try:
|
||||||
if fileread.revealdate > datetime.datetime.now():
|
if fileread.revealdate > datetime.datetime.now():
|
||||||
|
@ -67,8 +67,8 @@ def shiplist(local=False):
|
||||||
ficcountstring = "0" + str(ficcount)
|
ficcountstring = "0" + str(ficcount)
|
||||||
else:
|
else:
|
||||||
ficcountstring = str(ficcount)
|
ficcountstring = str(ficcount)
|
||||||
if os.path.exists("originalsmeta/" + ficcountstring + ".py"):
|
if os.path.exists("files/originalsmeta/" + ficcountstring + ".py"):
|
||||||
countfile = "originalsmeta." + ficcountstring
|
countfile = "files.originalsmeta." + ficcountstring
|
||||||
fileread = import_module(countfile)
|
fileread = import_module(countfile)
|
||||||
try:
|
try:
|
||||||
if fileread.revealdate > datetime.datetime.now():
|
if fileread.revealdate > datetime.datetime.now():
|
||||||
|
|
|
@ -83,10 +83,10 @@ def allsingles(local=False):
|
||||||
ficcountstring = "0" + str(ficcount)
|
ficcountstring = "0" + str(ficcount)
|
||||||
else:
|
else:
|
||||||
ficcountstring = str(ficcount)
|
ficcountstring = str(ficcount)
|
||||||
if os.path.exists("originalsmeta/" + ficcountstring + ".py"):
|
if os.path.exists("files/originalsmeta/" + ficcountstring + ".py"):
|
||||||
singlepage(ficcount,"originalsmeta",local)
|
singlepage(ficcount,"files.originalsmeta",local)
|
||||||
elif os.path.exists("translationsmeta/" + ficcountstring + ".py"):
|
elif os.path.exists("files/translationsmeta/" + ficcountstring + ".py"):
|
||||||
singlepage(ficcount,"translationsmeta",local)
|
singlepage(ficcount,"files.translationsmeta",local)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
allsingles()
|
allsingles()
|
||||||
|
|
26
sortfics.sh
26
sortfics.sh
|
@ -13,27 +13,27 @@ do
|
||||||
ficstring="$i"
|
ficstring="$i"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if compgen -G "texts/${ficstring}.*" > /dev/null
|
if compgen -G "files/texts/${ficstring}.*" > /dev/null
|
||||||
then
|
then
|
||||||
if test -f "originalsmeta/${ficstring}.py"
|
if test -f "files/originalsmeta/${ficstring}.py"
|
||||||
then
|
then
|
||||||
if grep -q "^locked = True" "originalsmeta/${ficstring}.py"
|
if grep -q "^locked = True" "files/originalsmeta/${ficstring}.py"
|
||||||
then
|
then
|
||||||
builddir="secret"
|
builddir="secret"
|
||||||
else
|
else
|
||||||
if grep -q "^locked = False" "originalsmeta/${ficstring}.py"
|
if grep -q "^locked = False" "files/originalsmeta/${ficstring}.py"
|
||||||
then
|
then
|
||||||
builddir="files"
|
builddir="files"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
if test -f "translationsmeta/${ficstring}.py"
|
if test -f "files/translationsmeta/${ficstring}.py"
|
||||||
then
|
then
|
||||||
if grep -q "^locked = True" "translationsmeta/${ficstring}.py"
|
if grep -q "^locked = True" "files/translationsmeta/${ficstring}.py"
|
||||||
then
|
then
|
||||||
builddir="secret"
|
builddir="secret"
|
||||||
else
|
else
|
||||||
if grep -q "^locked = False" "translationsmeta/${ficstring}.py"
|
if grep -q "^locked = False" "files/translationsmeta/${ficstring}.py"
|
||||||
then
|
then
|
||||||
builddir="files"
|
builddir="files"
|
||||||
fi
|
fi
|
||||||
|
@ -44,17 +44,17 @@ do
|
||||||
fi
|
fi
|
||||||
if [ ${builddir} != "null" ]
|
if [ ${builddir} != "null" ]
|
||||||
then
|
then
|
||||||
if test -f "texts/${ficstring}.html"
|
if test -f "files/texts/${ficstring}.html"
|
||||||
then
|
then
|
||||||
mv "texts/${ficstring}.html" "build/${builddir}/"
|
mv "files/texts/${ficstring}.html" "build/${builddir}/"
|
||||||
fi
|
fi
|
||||||
if test -f "texts/${ficstring}.pdf"
|
if test -f "files/texts/${ficstring}.pdf"
|
||||||
then
|
then
|
||||||
mv "texts/${ficstring}.pdf" "build/${builddir}/"
|
mv "files/texts/${ficstring}.pdf" "build/${builddir}/"
|
||||||
fi
|
fi
|
||||||
if test -f "texts/${ficstring}.epub"
|
if test -f "files/texts/${ficstring}.epub"
|
||||||
then
|
then
|
||||||
mv "texts/${ficstring}.epub" "build/${builddir}/"
|
mv "files/texts/${ficstring}.epub" "build/${builddir}/"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
44
statsgen.py
44
statsgen.py
|
@ -16,17 +16,17 @@ def ficsum(ficcount,year,month=0,showfandom=True,local=False):
|
||||||
ficcountstring = "0" + str(ficcount)
|
ficcountstring = "0" + str(ficcount)
|
||||||
else:
|
else:
|
||||||
ficcountstring = str(ficcount)
|
ficcountstring = str(ficcount)
|
||||||
if os.path.exists("originalsmeta/" + ficcountstring + ".py"):
|
if os.path.exists("files/originalsmeta/" + ficcountstring + ".py"):
|
||||||
ficfile = "originalsmeta." + ficcountstring
|
ficfile = "files.originalsmeta." + ficcountstring
|
||||||
fileread = import_module(ficfile)
|
fileread = import_module(ficfile)
|
||||||
elif os.path.exists("translationsmeta/" + ficcountstring + ".py"):
|
elif os.path.exists("files/translationsmeta/" + ficcountstring + ".py"):
|
||||||
ficfile = "translationsmeta." + ficcountstring
|
ficfile = "files.translationsmeta." + ficcountstring
|
||||||
fileread = import_module(ficfile)
|
fileread = import_module(ficfile)
|
||||||
else:
|
else:
|
||||||
fileread = False
|
fileread = False
|
||||||
if fileread:
|
if fileread:
|
||||||
try:
|
try:
|
||||||
theorig = "originalsmeta." + str(fileread.original)
|
theorig = "files.originalsmeta." + str(fileread.original)
|
||||||
origfile = import_module(theorig)
|
origfile = import_module(theorig)
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
@ -227,11 +227,11 @@ def yeargen(local=False):
|
||||||
ficcountstring = "0" + str(ficcount)
|
ficcountstring = "0" + str(ficcount)
|
||||||
else:
|
else:
|
||||||
ficcountstring = str(ficcount)
|
ficcountstring = str(ficcount)
|
||||||
if os.path.exists("originalsmeta/" + ficcountstring + ".py"):
|
if os.path.exists("files/originalsmeta/" + ficcountstring + ".py"):
|
||||||
ficfile = "originalsmeta." + ficcountstring
|
ficfile = "files.originalsmeta." + ficcountstring
|
||||||
fileread = import_module(ficfile)
|
fileread = import_module(ficfile)
|
||||||
elif os.path.exists("translationsmeta/" + ficcountstring + ".py"):
|
elif os.path.exists("files/translationsmeta/" + ficcountstring + ".py"):
|
||||||
ficfile = "translationsmeta." + ficcountstring
|
ficfile = "files.translationsmeta." + ficcountstring
|
||||||
fileread = import_module(ficfile)
|
fileread = import_module(ficfile)
|
||||||
else:
|
else:
|
||||||
fileread = False
|
fileread = False
|
||||||
|
@ -270,11 +270,11 @@ def yeargen(local=False):
|
||||||
ficcountstring = "0" + str(ficcount)
|
ficcountstring = "0" + str(ficcount)
|
||||||
else:
|
else:
|
||||||
ficcountstring = str(ficcount)
|
ficcountstring = str(ficcount)
|
||||||
if os.path.exists("originalsmeta/" + ficcountstring + ".py"):
|
if os.path.exists("files/originalsmeta/" + ficcountstring + ".py"):
|
||||||
ficfile = "originalsmeta." + ficcountstring
|
ficfile = "files.originalsmeta." + ficcountstring
|
||||||
fileread = import_module(ficfile)
|
fileread = import_module(ficfile)
|
||||||
elif os.path.exists("translationsmeta/" + ficcountstring + ".py"):
|
elif os.path.exists("files/translationsmeta/" + ficcountstring + ".py"):
|
||||||
ficfile = "translationsmeta." + ficcountstring
|
ficfile = "files.translationsmeta." + ficcountstring
|
||||||
fileread = import_module(ficfile)
|
fileread = import_module(ficfile)
|
||||||
else:
|
else:
|
||||||
fileread = False
|
fileread = False
|
||||||
|
@ -292,11 +292,11 @@ def yeargen(local=False):
|
||||||
allfics.append(ficcountstring)
|
allfics.append(ficcountstring)
|
||||||
allfics = sorted(list(dict.fromkeys(allfics)))
|
allfics = sorted(list(dict.fromkeys(allfics)))
|
||||||
for fic in allfics:
|
for fic in allfics:
|
||||||
if os.path.exists("originalsmeta/" + fic + ".py"):
|
if os.path.exists("files/originalsmeta/" + fic + ".py"):
|
||||||
ficfile = "originalsmeta." + fic
|
ficfile = "files.originalsmeta." + fic
|
||||||
fileread = import_module(ficfile)
|
fileread = import_module(ficfile)
|
||||||
elif os.path.exists("translationsmeta/" + fic + ".py"):
|
elif os.path.exists("files/translationsmeta/" + fic + ".py"):
|
||||||
ficfile = "translationsmeta." + fic
|
ficfile = "files.translationsmeta." + fic
|
||||||
fileread = import_module(ficfile)
|
fileread = import_module(ficfile)
|
||||||
else:
|
else:
|
||||||
fileread = False
|
fileread = False
|
||||||
|
@ -320,7 +320,7 @@ def yeargen(local=False):
|
||||||
except:
|
except:
|
||||||
try:
|
try:
|
||||||
if fileread.original:
|
if fileread.original:
|
||||||
theorig = "originalsmeta." + str(fileread.original)
|
theorig = "files.originalsmeta." + str(fileread.original)
|
||||||
origfile = import_module(theorig)
|
origfile = import_module(theorig)
|
||||||
try:
|
try:
|
||||||
fandom = origfile.fandom
|
fandom = origfile.fandom
|
||||||
|
@ -534,11 +534,11 @@ def yeargen(local=False):
|
||||||
# read the file back in to get the right word count, because dicts are dynamic somehow??
|
# read the file back in to get the right word count, because dicts are dynamic somehow??
|
||||||
thedate = fic["date"]
|
thedate = fic["date"]
|
||||||
thefic = fic["number"]
|
thefic = fic["number"]
|
||||||
if os.path.exists("originalsmeta/" + thefic + ".py"):
|
if os.path.exists("files/originalsmeta/" + thefic + ".py"):
|
||||||
ficfile = "originalsmeta." + thefic
|
ficfile = "files.originalsmeta." + thefic
|
||||||
fileread = import_module(ficfile)
|
fileread = import_module(ficfile)
|
||||||
elif os.path.exists("translationsmeta/" + thefic + ".py"):
|
elif os.path.exists("files/translationsmeta/" + thefic + ".py"):
|
||||||
ficfile = "translationsmeta." + thefic
|
ficfile = "files.translationsmeta." + thefic
|
||||||
fileread = import_module(ficfile)
|
fileread = import_module(ficfile)
|
||||||
else:
|
else:
|
||||||
fileread = False
|
fileread = False
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
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
|
|
|
@ -23,8 +23,8 @@ def bywords(local=False):
|
||||||
ficcountstring = "0" + str(ficcount)
|
ficcountstring = "0" + str(ficcount)
|
||||||
else:
|
else:
|
||||||
ficcountstring = str(ficcount)
|
ficcountstring = str(ficcount)
|
||||||
if os.path.exists("originalsmeta/" + ficcountstring + ".py"):
|
if os.path.exists("files/originalsmeta/" + ficcountstring + ".py"):
|
||||||
ficfile = "originalsmeta." + ficcountstring
|
ficfile = "files.originalsmeta." + ficcountstring
|
||||||
fileread = import_module(ficfile)
|
fileread = import_module(ficfile)
|
||||||
try:
|
try:
|
||||||
if fileread.revealdate > datetime.datetime.now():
|
if fileread.revealdate > datetime.datetime.now():
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue