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