# OSU SPS Website Build Script

def loadFile( src, prefx ):
    out = ""
    for line in open( src, 'r' ):
        out += prefx + line
    return out

def outputFile( name, content ):
    file = open( name, 'w' )
    file.write( content )
    file.close()
    
out_folder = "output/"
src_folder = "src/"
includes_folder = src_folder + "includes/"

header = loadFile( includes_folder + "header.html", "" )
header = header.replace( "[STYLE]", loadFile( includes_folder + "style.css", "\t" ) )
header = header.replace( "[SCRIPT]", loadFile( includes_folder + "script.js", "\t" ) )

footer = loadFile( includes_folder + "footer.html", "" )

names = [
    "index.html"
]

for name in names:
    raw = loadFile( src_folder + name, "" )
    raw = header + raw + footer
    outputFile( out_folder + name, raw )

@@ -25,16 +25,27 @@
 Script%0A%0A
+import os%0A%0A
 def load
@@ -653,28 +653,136 @@
 s = 
-%5B%0A    %22index.html%22%0A%5D
+set()%0Afor name in os.listdir( src_folder ):%0A    names.add( name )%0A    %0Anames.remove( includes_folder%5B len( src_folder ) : -1 %5D )
 %0A%0Afo

Remove need for static pages