# HG changeset patch # User Chris Cannam # Date 1413204780 -3600 # Node ID 6b62bae0af33ffdb6db23ed1a2da2318e702b52e # Parent d7a91e07ca57458e00b41c33ea38a90110986e9a Help adjustments: require extra arg for help on a writer (help text was getting too long) diff -r d7a91e07ca57 -r 6b62bae0af33 runner/main.cpp --- a/runner/main.cpp Mon Oct 13 13:37:31 2014 +0100 +++ b/runner/main.cpp Mon Oct 13 13:53:00 2014 +0100 @@ -211,8 +211,10 @@ cerr << endl; } -void printHelp(QString myname) +void printHelp(QString myname, QString w) { + std::string writer = w.toStdString(); + printUsage(myname); QString extensions = AudioFileReaderFactory::getKnownExtensions(); @@ -239,107 +241,115 @@ cerr << "Playlist files in M3U format are also supported." << endl; cerr << endl; - cerr << "Transformation options:" << endl; - cerr << endl; - cerr << " -t, --transform Apply transform described in transform file to" << endl; - cerr << " all input audio files. You may supply this option" << endl; - cerr << " multiple times. You must supply this option or -T at" << endl; - cerr << " least once for any work to be done. Transform format" << endl; - cerr << " may be SV transform XML or Vamp transform RDF/Turtle." << endl; - cerr << " See documentation for examples." << endl; - cerr << endl; - cerr << " -T, --transforms Apply all transforms described in transform files" << endl; - cerr << " whose names are listed in text file . You may supply" << endl; - cerr << " this option multiple times." << endl; - cerr << endl; - cerr << " -d, --default Apply the default transform for transform id . This" << endl; - cerr << " is equivalent to generating a skeleton transform for this" << endl; - cerr << " id (using the -s option, below) and then applying that," << endl; - cerr << " unmodified, with the -t option in the normal way. Note" << endl; - cerr << " that the results may vary as the implementation's default" << endl; - cerr << " processing parameters are not guaranteed. Do not use" << endl; - cerr << " this in production systems. You may supply this option" << endl; - cerr << " multiple times, and mix it with -t and -T." << endl; - cerr << endl; - cerr << " -w, --writer Write output using writer type ." << endl; - cerr << " Supported writer types are: "; set writers = FeatureWriterFactory::getWriterTags(); + + QString writerText = "Supported writer types are: "; for (set::const_iterator i = writers.begin(); i != writers.end(); ) { - cerr << *i; - if (++i != writers.end()) cerr << ", "; - else cerr << "."; + writerText += i->c_str(); + if (++i != writers.end()) writerText += ", "; + else writerText += "."; } - cerr << endl; - cerr << " You may supply this option multiple times. You must" << endl; - cerr << " supply this option at least once for any work to be done." << endl; - cerr << endl; - cerr << " -S, --summary In addition to the result features, write summary feature" << endl; - cerr << " of summary type ." << endl; - cerr << " Supported summary types are min, max, mean, median, mode," << endl; - cerr << " sum, variance, sd, count." << endl; - cerr << " You may supply this option multiple times." << endl; - cerr << endl; - cerr << " --summary-only Write only summary features; do not write the regular" << endl; - cerr << " result features." << endl; - cerr << endl; - cerr << " --segments ,[,...]" << endl; - cerr << " Summarise in segments, with segment boundaries" << endl; - cerr << " at A, B, ... seconds." << endl; - cerr << endl; - cerr << " -m, --multiplex If multiple input audio files are given, use mono" << endl; - cerr << " mixdowns of all files as the input channels for a single" << endl; - cerr << " invocation of each transform, instead of running the" << endl; - cerr << " transform against all files separately. The first file" << endl; - cerr << " will be used for output reference name and sample rate." << endl; - cerr << endl; - cerr << " -r, --recursive If any of the ,[,...]" << endl; + cerr << " Summarise in segments, with segment boundaries" << endl; + cerr << " at A, B, ... seconds." << endl; + cerr << endl; + cerr << " -m, --multiplex If multiple input audio files are given, use mono" << endl; + cerr << " mixdowns of all files as the input channels for a single" << endl; + cerr << " invocation of each transform, instead of running the" << endl; + cerr << " transform against all files separately. The first file" << endl; + cerr << " will be used for output reference name and sample rate." << endl; + cerr << endl; + cerr << " -r, --recursive If any of the