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:
|
||||
command = ['xelatex', f'{document}.tex']
|
||||
for _ in range(2):
|
||||
subprocess.call(command)
|
||||
|
||||
|
||||
def clean():
|
||||
def clean(directory):
|
||||
os.chdir(directory)
|
||||
_, _, files = next(os.walk(directory))
|
||||
for file in files:
|
||||
name, ext = os.path.splitext(file)
|
||||
|
@ -27,9 +29,8 @@ def clean():
|
|||
def main():
|
||||
file = os.path.realpath(__file__)
|
||||
directory = os.path.dirname(file)
|
||||
os.chdir(directory)
|
||||
build()
|
||||
clean()
|
||||
build(directory)
|
||||
clean(directory)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue