Store all user data in a folder

This commit is contained in:
mez 2024-08-06 19:37:17 +01:00
parent f92d6fab53
commit d3d579840a
19 changed files with 84 additions and 151 deletions

View file

@ -21,8 +21,8 @@ def fandomlist(local=False):
ficcountstring = "0" + str(ficcount)
else:
ficcountstring = str(ficcount)
if os.path.exists("originalsmeta/" + ficcountstring + ".py"):
ficfile = "originalsmeta." + ficcountstring
if os.path.exists("files/originalsmeta/" + ficcountstring + ".py"):
ficfile = "files.originalsmeta." + ficcountstring
fileread = import_module(ficfile)
try:
if fileread.revealdate > datetime.datetime.now():
@ -64,8 +64,8 @@ def fandomlist(local=False):
ficcountstring = "0" + str(ficcount)
else:
ficcountstring = str(ficcount)
if os.path.exists("originalsmeta/" + ficcountstring + ".py"):
countfile = "originalsmeta." + ficcountstring
if os.path.exists("files/originalsmeta/" + ficcountstring + ".py"):
countfile = "files.originalsmeta." + ficcountstring
fileread = import_module(countfile)
try:
if fileread.revealdate > datetime.datetime.now():
@ -88,7 +88,7 @@ def fandomlist(local=False):
firstficstring = "0" + str(firstfic)
else:
firstficstring = str(firstfic)
firstfile = "originalsmeta." + firstficstring
firstfile = "files.originalsmeta." + firstficstring
firstread = import_module(firstfile)
firstyear = (firstread.datewords[0])["date"].year
lastfic = fandomfics[0]
@ -98,7 +98,7 @@ def fandomlist(local=False):
lastficstring = "0" + str(lastfic)
else:
lastficstring = str(lastfic)
lastfile = "originalsmeta." + lastficstring
lastfile = "files.originalsmeta." + lastficstring
lastread = import_module(lastfile)
lastyear = (lastread.datewords[0])["date"].year
if lastyear == firstyear: