mirror of
https://github.com/grey-cat-1908/website.git
synced 2024-09-22 19:22:02 +03:00
mojet tak luchshe?
This commit is contained in:
parent
e92655da20
commit
d786453405
1 changed files with 6 additions and 7 deletions
13
build.py
13
build.py
|
@ -15,13 +15,6 @@ except:
|
|||
os.mkdir("build")
|
||||
|
||||
|
||||
for filename in os.listdir("static"):
|
||||
if len(filename.split(".")) == 1:
|
||||
shutil.copytree(f"{os.getcwd()}/static/{filename}", f"{os.getcwd()}/build/{filename}")
|
||||
else:
|
||||
shutil.copy(f"{os.getcwd()}/static/{filename}", f"{os.getcwd()}/build/{filename}")
|
||||
|
||||
|
||||
template_file = open('template.html', "r")
|
||||
template_text = template_file.read()
|
||||
template_file.close()
|
||||
|
@ -43,6 +36,12 @@ def go_through(directory):
|
|||
os.makedirs(f'build/{fier}{filename}')
|
||||
go_through(directory + "/" + filename)
|
||||
else:
|
||||
for ofn in os.listdir("static"):
|
||||
if len(ofn.split(".")) == 1:
|
||||
shutil.copytree(f"{os.getcwd()}/static/{ofn}", f"{os.getcwd()}/build/{fier}{ofn}")
|
||||
else:
|
||||
shutil.copy(f"{os.getcwd()}/static/{ofn}", f"{os.getcwd()}/build/{fier}{ofn}")
|
||||
|
||||
content = gen_file(f"{os.getcwd()}/{directory}/{filename}")
|
||||
loc = fier + filename.split(".")[0] + '.html'
|
||||
|
||||
|
|
Loading…
Reference in a new issue