[py] [cut] add option --create-first
authorPaul Brossier <piem@piem.org>
Mon, 29 Oct 2018 14:36:07 +0000 (15:36 +0100)
committerPaul Brossier <piem@piem.org>
Mon, 29 Oct 2018 14:36:07 +0000 (15:36 +0100)
python/lib/aubio/cmd.py
python/lib/aubio/cut.py

index 1b386c1..10c9b99 100644 (file)
@@ -247,6 +247,9 @@ class AubioArgumentParser(argparse.ArgumentParser):
                 metavar = "<slices>",
                 action = "store", dest = "cut_until_nslices", default = None,
                 help="how many extra slices should be added at the end of each slice")
+        self.add_argument("--create-first",
+                action = "store_true", dest = "create_first", default = False,
+                help="always include first slice")
 
 # some utilities
 
index c01615c..dd1d136 100644 (file)
@@ -150,7 +150,8 @@ def _cut_slice(options, timestamps):
         slice_source_at_stamps(options.source_uri,
                 timestamps, timestamps_end = timestamps_end,
                 output_dir = options.output_directory,
-                samplerate = options.samplerate)
+                samplerate = options.samplerate,
+                create_first = options.create_first)
 
 def main():
     parser = aubio_cut_parser()