|
|
@ -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
|
|
|
|