diff options
author | kennyballou <kballou@onyx.boisestate.edu> | 2013-03-12 18:41:54 -0600 |
---|---|---|
committer | kennyballou <kballou@onyx.boisestate.edu> | 2013-03-12 18:41:54 -0600 |
commit | 6e3c50892f6d299baf253f675e14816c15b359e2 (patch) | |
tree | a7f70d9681e0c3a1b13e442de6f53a732e4e0cdf /xnt | |
parent | e5195919b0afd37cd110204564c68f3ef3df3219 (diff) | |
download | xnt-6e3c50892f6d299baf253f675e14816c15b359e2.tar.gz xnt-6e3c50892f6d299baf253f675e14816c15b359e2.tar.xz |
Add clean method to tex module
Diffstat (limited to 'xnt')
-rw-r--r-- | xnt/build/tex.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/xnt/build/tex.py b/xnt/build/tex.py index 1cd20e3..6249edf 100644 --- a/xnt/build/tex.py +++ b/xnt/build/tex.py @@ -56,3 +56,20 @@ def pdflatex(document, error_codes.append(pdf(draftmode=False)) os.chdir(cwd) return sum(error_codes) + +def clean(path="./", remove_pdf=False): + """Clean up generated files of PDF compiliation""" + cwd = os.getcwd() + os.chdir(path) + xnt.tasks.rm("*.out", + "*.log", + "*.aux", + "*.toc", + "*.tol", + "*.tof", + "*.tot", + "*.bbl", + "*.blg") + if remove_pdf: + xnt.tasks.rm("*.pdf") + os.chdir(cwd) |