File indexing completed on 2023-10-25 09:32:54
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020 from __future__ import print_function
0021 import os
0022 import stat
0023 import sys
0024 import time
0025
0026 from Alignment.OfflineValidation.TkAlAllInOneTool.presentation import *
0027 from Alignment.OfflineValidation.TkAlAllInOneTool.presentationTemplates import *
0028
0029
0030 def main():
0031 print('Producing a .tex file from plots...')
0032
0033
0034 if len(sys.argv) < 2:
0035 print('Error: Need path of plots as an argument!')
0036 sys.exit(1)
0037
0038 validations = []
0039 for plotpath in sys.argv[1:]:
0040 validations.append(ValidationPlots(plotpath))
0041
0042 classes = validationclasses(validations)
0043
0044
0045 frames = ''
0046 for cls in classes:
0047 for subsection in cls.presentationsubsections():
0048 frames += subsection.write([_ for _ in validations if _.validationclass == cls])
0049
0050 frames += SummarySection().write(validations)
0051
0052
0053
0054
0055 file = open('presentation.tex', 'w')
0056 file.write(texTemplate.replace('[frames]', frames).\
0057 replace('[time]', time.ctime()))
0058 file.close()
0059
0060
0061 pdfScript = open('toPdf.sh', 'w')
0062 pdfScript.write(toPdf)
0063 pdfScript.close()
0064 os.chmod("toPdf.sh", stat.S_IRWXU | stat.S_IRGRP | stat.S_IROTH)
0065
0066
0067
0068 if __name__ == '__main__':
0069 main()