diff runner/JAMSFeatureWriter.cpp @ 200:f35bbb3e4d41 sonic-annotator-1.2

Change of tack: rename the JSON writer to JAMS. It's simpler than having a JSON writer with a mandatory flag to tell it what sort of JSON to write.
author Chris Cannam
date Tue, 01 Sep 2015 17:51:03 +0100
parents 3b7ec45abd1c
children 1f8fef5c6ea2
line wrap: on
line diff
--- a/runner/JAMSFeatureWriter.cpp	Tue Sep 01 17:29:20 2015 +0100
+++ b/runner/JAMSFeatureWriter.cpp	Tue Sep 01 17:51:03 2015 +0100
@@ -32,7 +32,7 @@
                       SupportOneFilePerTrack |
                       SupportOneFileTotal |
 		      SupportStdOut,
-                      "json"),
+                      "json"), // file extension is json even with jams writer
     m_network(false),
     m_networkRetrieved(false),
     m_n(1),
@@ -61,12 +61,6 @@
     p.hasArg = false;
     pl.push_back(p);
 
-    p.name = "format";
-    p.description = "JSON format to use. Currently the only supported value is \"jams\". Other formats may be supported in future.";
-    p.hasArg = true;
-    p.mandatory = true;
-    pl.push_back(p);
-
     return pl;
 }
 
@@ -79,13 +73,6 @@
          i != params.end(); ++i) {
         if (i->first == "network") {
             m_network = true;
-        } else if (i->first == "format") {
-            if (i->second == "jams") {
-                m_format = i->second;
-            } else {
-                throw std::runtime_error
-                    ("Unknown or invalid --json-format parameter \"" + i->second + "\"");
-            }
         }
     }
 }
@@ -329,7 +316,7 @@
 	cerr << "NOTE: No RDF description for plugin ID \""
 	     << pluginId << "\"" << endl;
 	if (!m_network) {
-	    cerr << "      Consider using the --json-network option to retrieve plugin descriptions"  << endl;
+	    cerr << "      Consider using the --jams-network option to retrieve plugin descriptions"  << endl;
 	    cerr << "      from the network where possible." << endl;
 	}
     }
@@ -391,7 +378,7 @@
 
 	} else {
 
-	    cerr << "WARNING: Cannot currently write dense or track-level outputs to JSON format (only sparse ones). Will proceed using UnknownTask type, but this probably isn't going to work" << endl;
+	    cerr << "WARNING: Cannot currently write dense or track-level outputs to JAMS format (only sparse ones). Will proceed using UnknownTask type, but this probably isn't going to work" << endl;
 	}
     }