print(term.render('${BLUE} {} ${NORMAL}').format(sg.__url__)) print(term.render('${GREEN}{:s}${NORMAL}\n').format(sep)) except: print('{:s}\n'.format(sep)) print('{} - Version {}'.format(sg.__name__, sg.__version__)) print(sg.__copyright__) print(sg.__url__+'\n') print('{:s}\n'.format(sep)) # ---------------------------------------------------------------------------- # Annotation is here # ---------------------------------------------------------------------------- p = ProcessProgressTerminal() manager = sppasAnnotationsManager() if args.merge: manager.set_do_merge(True) manager.annotate(parameters, p) try: term = TerminalController() print(term.render('\n${GREEN}{:s}${NORMAL}').format(sep)) print(term.render('${RED}See {}.').format(parameters.get_report_filename())) print(term.render('${GREEN}Thank you for using {}.').format(sg.__name__)) print(term.render('${GREEN}{:s}${NORMAL}').format(sep)) except: print('\n{:s}\n'.format(sep)) print("See {} for details.\nThank you for using {}." "".format(parameters.get_report_filename(), sg.__name__)) print('{:s}\n'.format(sep))
for tier in trs: print(tier.get_name()) for a in tier: print("{:f} {:f} {:s}".format( a.get_location().get_best().get_begin().get_midpoint(), a.get_location().get_best().get_end().get_midpoint(), a.serialize_labels(" "))) elif args.I: # Perform the annotation on a set of files # ---------------------------------------- # Fix input files files = list() for f in args.I: parameters.add_sppasinput(os.path.abspath(f)) # Fix the output file extension and others parameters.set_output_format(args.e) parameters.set_report_filename(args.log) # Perform the annotation process = sppasAnnotationsManager() process.annotate(parameters) else: if not args.quiet: logging.info("No file was given to be annotated. Nothing to do!")