-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild_html.py
executable file
·48 lines (41 loc) · 1.4 KB
/
build_html.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/usr/bin/python3
import os
import time
def sh(x):
"""
Shorter name for os.system
"""
os.system(x)
def compile_very(pn):
# sh("rm -rf build")
sh("mkdir -p build")
sh("cp -rvt build src/*.tex")
sh("cp -rvt build src/mainpage.lwarpmkconf")
sh("cp -rvt build css/*.css")
sh("cp -rvt build img/logo.png")
os.chdir("build")
# sh("lwarpmk cleanall -p " + pn) # when dobrogi took everything
# sh("lwarpmk cleanlimages -p " + pn) # even the pictures of the geese
sh("lwarpmk again -p " + pn) # a young boy reinvented himself
sh("lwarpmk print -p " + pn) # a young boy reinvented himself
sh("lwarpmk html -p " + pn) # he tricked the lord and took what was his
sh("lwarpmk html -p " + pn) # he tricked the lord and took it again
sh("lwarpmk htmlindex -p " + pn) # to the village he listed all his evil
sh("lwarpmk limages -p " + pn) # (he used pictures. villagers cant read)
sh("lwarpmk html -p " + pn) # and he tricked the lord for a third time
sh("lwarpmk clean -p " + pn)
os.chdir("..")
def copy_files(pn):
time.sleep(3)
sh("rm -rf docs")
sh("mkdir docs")
sh("cp -rvt docs build/*.html")
sh("cp -rvt docs build/*.css")
sh("cp -rvt docs build/mainpage.pdf")
sh("cp -rvt docs build/logo.png")
sh("cp -rvt docs build/" + pn + "-images")
def main():
pn = "mainpage"
compile_very(pn)
copy_files(pn)
main()