2 Commits d7698309df ... e00dcc25dd

Author SHA1 Message Date
  Steve0Greatness e00dcc25dd Allow filetype to be changed easily 8 months ago
  Steve0Greatness df623ef86f Added users.json to gitignore 8 months ago
2 changed files with 4 additions and 2 deletions
  1. 1 0
      .gitignore
  2. 3 2
      builder.py

+ 1 - 0
.gitignore

@@ -1 +1,2 @@
 sites
+users.json

+ 3 - 2
builder.py

@@ -4,6 +4,7 @@ from os import mkdir
 from shutil import rmtree as rmdir
 
 SITES_DIRECTORY = "sites"
+USE_FILETYPE = "xhtml"
 
 SITES: dict[str, dict] = {}
 with open("users.json") as file:
@@ -75,9 +76,9 @@ def main():
         Next = maker(NextIndex)
         Prev = maker(PrevIndex)
         mkdir(joinpath(SITES_DIRECTORY, cursite["id"]))
-        with open(joinpath(SITES_DIRECTORY, cursite["id"], "next.xhtml") as file:
+        with open(joinpath(SITES_DIRECTORY, cursite["id"], "next.%s" % USE_FILETYPE) as file:
             file.write(Next)
-        with open(joinpath(SITES_DIRECTORY, cursite["id"], "prev.xhtml") as file:
+        with open(joinpath(SITES_DIRECTORY, cursite["id"], "prev.%s" % USE_FILETYPE) as file:
             file.write(Prev)
     print("Finished making sites directory")