kopia lustrzana https://gitlab.com/zeograd/rnsutils
Enable overwriting of xrni from command line
rodzic
ee0362f3bc
commit
d047888eee
|
@ -235,6 +235,8 @@ def main(argv=None):
|
|||
help="debug parsing [default: %(default)s]")
|
||||
parser.add_argument("-e", "--encode", dest="encoding", choices=[ENCODING_NONE, ENCODING_FLAC, ENCODING_OGG],
|
||||
default="none", help="encode samples into given format [default: %(default)s]")
|
||||
parser.add_argument("-f", "--force", dest="force", default=False, action="store_true",
|
||||
help="force overwriting existing files [default: %(default)s]")
|
||||
parser.add_argument("-q", "--quiet", dest="quiet", action="store_true", default=False,
|
||||
help="quiet operation [default: %(default)s]")
|
||||
parser.add_argument("-u", "--unused", dest="show_unused", action="store_true", default=True,
|
||||
|
@ -288,7 +290,7 @@ def main(argv=None):
|
|||
output_filename = os.path.join(opts.output_dir or '',
|
||||
'{}_{}.xrni'.format(instrument_idx, renoise_instrument.name))
|
||||
# noinspection PyTypeChecker
|
||||
renoise_instrument.save(output_filename)
|
||||
renoise_instrument.save(output_filename, overwrite=opts.force)
|
||||
if not opts.quiet:
|
||||
print(" saved {}".format(output_filename))
|
||||
except Exception:
|
||||
|
|
|
@ -285,6 +285,8 @@ def main(argv=None):
|
|||
help="debug parsing [default: %(default)s]")
|
||||
parser.add_argument("-e", "--encode", dest="encoding", choices=[ENCODING_NONE, ENCODING_FLAC, ENCODING_OGG],
|
||||
default="none", help="encode samples into given format [default: %(default)s]")
|
||||
parser.add_argument("-f", "--force", dest="force", default=False, action="store_true",
|
||||
help="force overwriting existing files [default: %(default)s]")
|
||||
parser.add_argument("-q", "--quiet", dest="quiet", action="store_true", default=False,
|
||||
help="quiet operation [default: %(default)s]")
|
||||
parser.add_argument("-o", "--ouput-dir", dest="output_dir",
|
||||
|
@ -326,7 +328,7 @@ def main(argv=None):
|
|||
|
||||
filename_without_extension, extension = os.path.splitext(os.path.basename(sfz_filename))
|
||||
output_filename = os.path.join(opts.output_dir or sfz_path, '{}.xrni'.format(filename_without_extension))
|
||||
renoise_instrument.save(output_filename)
|
||||
renoise_instrument.save(output_filename, overwrite=opts.force)
|
||||
|
||||
if not opts.quiet:
|
||||
print("Saved {}".format(output_filename))
|
||||
|
|
Ładowanie…
Reference in New Issue