+ samplerate = options.samplerate)
+
+def main():
+ parser = aubio_cut_parser()
+ options = parser.parse_args()
+ if not options.source_file and not options.source_file2:
+ sys.stderr.write("Error: no file name given\n")
+ parser.print_help()
+ sys.exit(1)
+ elif options.source_file2 is not None:
+ options.source_file = options.source_file2
+
+ # analysis
+ timestamps, total_frames = _cut_analyze(options)
+
+ # print some info
+ duration = float (total_frames) / float(options.samplerate)
+ base_info = '%(source_file)s' % {'source_file': options.source_file}
+ base_info += ' (total %(duration).2fs at %(samplerate)dHz)\n' % \
+ {'duration': duration, 'samplerate': options.samplerate}
+
+ info = "found %d timestamps in " % len(timestamps)
+ info += base_info
+ sys.stderr.write(info)