You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
1.2 KiB

  1. #!/usr/bin/python
  2. import subprocess
  3. import all_settings
  4. ## tests all options separately by executing all_settings.py
  5. all_settings.main()
  6. ## then compiles mytheme.tex and styleguide.tex,
  7. filesToCompile = 'mytheme', 'styleguide'
  8. for filename in filesToCompile:
  9. subprocess.call('pdflatex {}.tex'.format(filename).split())
  10. ## compile twice because of beamer in styleguide
  11. subprocess.call('pdflatex {}.tex'.format(filename).split())
  12. ## clean up auxiliary files (non-pdf and non-tex)
  13. subprocess.call('rm -f {}.aux'.format(filename).split())
  14. subprocess.call('rm -f {}.log'.format(filename).split())
  15. subprocess.call('rm -f {}.nav'.format(filename).split())
  16. subprocess.call('rm -f {}.out'.format(filename).split())
  17. subprocess.call('rm -f {}.snm'.format(filename).split())
  18. subprocess.call('rm -f {}.toc'.format(filename).split())
  19. ## removes the pdfs created beafore
  20. filesToDelete = 'all_themes', 'all_colors', 'all_palettes', 'all_backgrounds', 'all_titles', 'all_blocks', 'all_notes', 'mytheme'
  21. all_settings.removePdfs(filesToDelete)
  22. ## and removes the file created from importing all_settings
  23. subprocess.call('rm -f all_settings.pyc')
  24. ## The generated files are all_settings.pdf and styleguide.pdf