blanc/build
This commit is contained in:
parent
c905042fa8
commit
e1b345c4e2
1 changed files with 6 additions and 5 deletions
|
@ -9,14 +9,16 @@ DOCUMENTS = [
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
def build():
|
def build(directory):
|
||||||
|
os.chdir(directory)
|
||||||
for document in DOCUMENTS:
|
for document in DOCUMENTS:
|
||||||
command = ['xelatex', f'{document}.tex']
|
command = ['xelatex', f'{document}.tex']
|
||||||
for _ in range(2):
|
for _ in range(2):
|
||||||
subprocess.call(command)
|
subprocess.call(command)
|
||||||
|
|
||||||
|
|
||||||
def clean():
|
def clean(directory):
|
||||||
|
os.chdir(directory)
|
||||||
_, _, files = next(os.walk(directory))
|
_, _, files = next(os.walk(directory))
|
||||||
for file in files:
|
for file in files:
|
||||||
name, ext = os.path.splitext(file)
|
name, ext = os.path.splitext(file)
|
||||||
|
@ -27,9 +29,8 @@ def clean():
|
||||||
def main():
|
def main():
|
||||||
file = os.path.realpath(__file__)
|
file = os.path.realpath(__file__)
|
||||||
directory = os.path.dirname(file)
|
directory = os.path.dirname(file)
|
||||||
os.chdir(directory)
|
build(directory)
|
||||||
build()
|
clean(directory)
|
||||||
clean()
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue