diff --git a/README.org b/README.org index 2822412..e7dbdeb 100644 --- a/README.org +++ b/README.org @@ -15,6 +15,7 @@ Rename =variables-template.py= to =variables.py= and edit: - =domain=: =https://yourdomain.tld= without trailing slash - =rclonesiteroot=: path =rclone= uses to access your webserver - =description=: content for the “about” section (can include HTML tags) +- =startyear=: year from which to begin tracking (an integer) - =hue=: theme colour expressed as a hue from 0 to 360 - =consoles=: add or remove consoles following the format provided (=.png= images must be added to the build directory with a filename corresponding with the value of ="img"= for each console) *** The rest diff --git a/gamesort.py b/gamesort.py index d7dfa29..9b65a95 100644 --- a/gamesort.py +++ b/gamesort.py @@ -8,7 +8,7 @@ Load in the list of games from a set of .org files. thisyear = datetime.now().strftime("%Y") -year = 2016 +year = variables.startyear - 1 concernedfiles = [] diff --git a/history.py b/history.py index ca6f775..73070e0 100644 --- a/history.py +++ b/history.py @@ -25,7 +25,7 @@ def history(local=False): feedwrite.write("\n\n \n \n Static backlog\n " + variables.domain + variables.serverpath + "backlog\n Feed for gaming updates\n en-gb") theyear = int(gamesort.thisyear) - while theyear > 2016: + while theyear >= variables.startyear: yearlist = [] enddate = datetime.strptime((str(theyear) + "-12-31"),"%Y-%m-%d") startdate = datetime.strptime((str(theyear) + "-01-01"),"%Y-%m-%d") diff --git a/variables-template.py b/variables-template.py index 9a723f3..cac1a89 100644 --- a/variables-template.py +++ b/variables-template.py @@ -16,6 +16,8 @@ rcloneaddress = "" description = "" +startyear = + hue = consoles = [{"code":"ps5","name":"PlayStation 5","shortname":"PS5","img":"PS5"},