@@ -47,14 +47,12 @@ constexpr StringLiteral k_ExecuteParamLong = "--execute";
4747constexpr StringLiteral k_PreflightParamLong = " --preflight" ;
4848constexpr StringLiteral k_LogFileParamLong = " --logfile" ;
4949constexpr StringLiteral k_ConvertParamLong = " --convert" ;
50- constexpr StringLiteral k_ConvertOutputParamLong = " --convert-output" ;
5150
5251constexpr StringLiteral k_HelpParamShort = " -h" ;
5352constexpr StringLiteral k_ExecuteParamShort = " -e" ;
5453constexpr StringLiteral k_PreflightParamShort = " -p" ;
5554constexpr StringLiteral k_LogFileParamShort = " -l" ;
5655constexpr StringLiteral k_ConvertParamShort = " -c" ;
57- constexpr StringLiteral k_ConvertOutputParamShort = " -co" ;
5856
5957void LoadApp ()
6058{
@@ -145,8 +143,7 @@ enum class ArgumentType
145143 Preflight,
146144 Help,
147145 Logfile,
148- Convert,
149- ConvertOutput
146+ Convert
150147};
151148
152149struct Argument
@@ -240,11 +237,6 @@ Result<CliArguments> ParseParameters(int argc, char* argv[])
240237 std::string argStr = ParseArgument (argc, argv, index);
241238 args.emplace_back (ArgumentType::Convert, argStr);
242239 }
243- else if (arg == k_ConvertOutputParamLong || arg == k_ConvertOutputParamShort)
244- {
245- std::string argStr = ParseArgument (argc, argv, index);
246- args.emplace_back (ArgumentType::ConvertOutput, argStr);
247- }
248240 else
249241 {
250242 args.emplace_back (ArgumentType::Invalid, arg);
@@ -320,7 +312,7 @@ Result<> ExecutePipeline(const Argument& arg)
320312 if (pipelinePath.ends_with (" .json" ))
321313 {
322314 cliOut << " Input file '" << pipelinePath << " ' is a legacy DREAM.3D version 6.x formatted pipeline.\n " ;
323- cliOut << " You will need to run `nxrunner --convert-output [PATH TO .JSON FILE]` to first convert the\n " ;
315+ cliOut << " You will need to run `nxrunner --convert [PATH TO .JSON FILE]` to first convert the\n " ;
324316 cliOut << " pipeline file to the newer format. Please note that the conversion can fail as filters have\n " ;
325317 cliOut << " been updated and previous parameters may not be available in DREAM3D-NX.\n " ;
326318 return nx::core::ConvertResult (std::move (loadPipelineResult));
@@ -357,7 +349,7 @@ Result<> PreflightPipeline(const Argument& arg)
357349 if (pipelinePath.ends_with (" .json" ))
358350 {
359351 cliOut << " Input file '" << pipelinePath << " ' is a legacy DREAM.3D version 6.x formatted pipeline.\n " ;
360- cliOut << " You will need to run `nxrunner --convert-output [PATH TO .JSON FILE]` to first convert the\n " ;
352+ cliOut << " You will need to run `nxrunner --convert [PATH TO .JSON FILE]` to first convert the\n " ;
361353 cliOut << " pipeline file to the newer format. Please note that the conversion can fail as filters have\n " ;
362354 cliOut << " been updated and previous parameters may not be available in DREAM3D-NX.\n " ;
363355 return nx::core::ConvertResult (std::move (loadPipelineResult));
@@ -447,52 +439,44 @@ Result<> ConvertPipeline(const Argument& arg, bool printConvertedPipeline, bool
447439void DisplayDefaultHelp ()
448440{
449441 cliOut << " Options:\n " ;
450- cliOut << fmt::format (" \t {}|{} <pipeline filepath> [{}|{} <log filepath>]\t " , k_ExecuteParamLong, k_ExecuteParamShort, k_LogFileParamLong, k_LogFileParamShort)
451- << " \t Execute the pipeline at the target filepath. Optionally, create a log file at the specified path.\n " ;
452- cliOut << fmt::format (" \t {}|{} <pipeline filepath> [{}|{} <log filepath>]\t " , k_PreflightParamLong, k_PreflightParamShort, k_LogFileParamLong, k_LogFileParamShort)
453- << " \t Preflight the pipeline at the target filepath. Optionally, create a log file at the specified path.\n " ;
454- cliOut << fmt::format (" \t {}|{} <pipeline filepath> [{}|{} <log filepath>]\t " , k_ConvertParamLong, k_ConvertParamShort, k_LogFileParamLong, k_LogFileParamShort)
455- << " \t Convert the SIMPL pipeline at the target filepath. Optionally, create a log file at the specified path." ;
456- cliOut << fmt::format (" \t <operand [argument]> [{}|{} <log filepath>]\t " , k_LogFileParamLong, k_LogFileParamShort) << " \t Creates a log file at the specified path." ;
442+ cliOut << fmt::format (" {}|{} <pipeline filepath> [{}|{} <log filepath>]\t " , k_ExecuteParamLong, k_ExecuteParamShort, k_LogFileParamLong, k_LogFileParamShort)
443+ << " Execute the pipeline at the target filepath. Optionally, create a log file at the specified path.\n " ;
444+ cliOut << fmt::format (" {}|{} <pipeline filepath> [{}|{} <log filepath>]\t " , k_PreflightParamLong, k_PreflightParamShort, k_LogFileParamLong, k_LogFileParamShort)
445+ << " Preflight the pipeline at the target filepath. Optionally, create a log file at the specified path.\n " ;
446+ cliOut << fmt::format (" {}|{} <pipeline filepath> [{}|{} <log filepath>]\t " , k_ConvertParamLong, k_ConvertParamShort, k_LogFileParamLong, k_LogFileParamShort)
447+ << " Convert the SIMPL pipeline at the target filepath. Optionally, create a log file at the specified path." ;
448+ cliOut << fmt::format (" <operand [argument]> [{}|{} <log filepath>]\t " , k_LogFileParamLong, k_LogFileParamShort) << " Creates a log file at the specified path." ;
457449 cliOut.endline ();
458450}
459451
460452void DisplayExecuteHelp ()
461453{
462454 cliOut << " To execute a target pipeline file:\n\t " ;
463- cliOut << fmt::format (" \t {}|{} <pipeline filepath> [{}|{} <log filepath>]\t " , k_ExecuteParamLong, k_ExecuteParamShort, k_LogFileParamLong, k_LogFileParamShort)
464- << " \t Execute the pipeline at the target filepath. Optionally, create a log file at the specified path." ;
455+ cliOut << fmt::format (" {}|{} <pipeline filepath> [{}|{} <log filepath>]\t " , k_ExecuteParamLong, k_ExecuteParamShort, k_LogFileParamLong, k_LogFileParamShort)
456+ << " Execute the pipeline at the target filepath. Optionally, create a log file at the specified path." ;
465457 cliOut.endline ();
466458}
467459
468460void DisplayPreflightHelp ()
469461{
470462 cliOut << " To preflight a target pipeline file:\n\t " ;
471- cliOut << fmt::format (" \t {}|{} <pipeline filepath> [{}|{} <log filepath>]\t " , k_PreflightParamLong, k_PreflightParamShort, k_LogFileParamLong, k_LogFileParamShort)
472- << " \t Preflight the pipeline at the target filepath. Optionally, create a log file at the specified path." ;
463+ cliOut << fmt::format (" {}|{} <pipeline filepath> [{}|{} <log filepath>]\t " , k_PreflightParamLong, k_PreflightParamShort, k_LogFileParamLong, k_LogFileParamShort)
464+ << " Preflight the pipeline at the target filepath. Optionally, create a log file at the specified path." ;
473465 cliOut.endline ();
474466}
475467
476468void DisplayConvertHelp ()
477469{
478470 cliOut << " To convert a target SIMPL pipeline file:\n\t " ;
479- cliOut << fmt::format (" \t {}|{} <pipeline filepath> [{}|{} <log filepath>]\t " , k_ConvertParamLong, k_ConvertParamShort, k_LogFileParamLong, k_LogFileParamShort)
480- << " \t Convert the SIMPL pipeline at the target filepath. Optionally, create a log file at the specified path." ;
481- cliOut.endline ();
482- }
483-
484- void DisplayConvertOutputHelp ()
485- {
486- cliOut << " To convert and save a target SIMPL pipeline file:\n\t " ;
487- cliOut << fmt::format (" \t {}|{} <pipeline filepath> [{}|{} <log filepath>]\t " , k_ConvertOutputParamLong, k_ConvertOutputParamShort, k_LogFileParamLong, k_LogFileParamShort)
488- << " \t Convert the SIMPL pipeline at the target filepath and saves the converted version with the updated extension. Optionally, create a log file at the specified path." ;
471+ cliOut << fmt::format (" {}|{} <pipeline filepath> [{}|{} <log filepath>]\t " , k_ConvertParamLong, k_ConvertParamShort, k_LogFileParamLong, k_LogFileParamShort)
472+ << " Convert the SIMPL pipeline at the target filepath. Optionally, create a log file at the specified path." ;
489473 cliOut.endline ();
490474}
491475
492476void DisplayLogfileHelp ()
493477{
494478 cliOut << " To export output a log file:\n\t " ;
495- cliOut << fmt::format (" \t <operand [argument]> [{}|{} <log filepath>]\t " , k_LogFileParamLong, k_LogFileParamShort) << " \t Creates a log file at the specified path." ;
479+ cliOut << fmt::format (" <operand [argument]> [{}|{} <log filepath>]\t " , k_LogFileParamLong, k_LogFileParamShort) << " Creates a log file at the specified path." ;
496480 cliOut.endline ();
497481}
498482
@@ -517,10 +501,6 @@ Result<> DisplayHelpMenu(const std::vector<Argument>& arguments)
517501 DisplayConvertHelp ();
518502 return {};
519503 }
520- case ArgumentType::ConvertOutput: {
521- DisplayConvertOutputHelp ();
522- return {};
523- }
524504 case ArgumentType::Logfile: {
525505 DisplayLogfileHelp ();
526506 return {};
@@ -586,9 +566,6 @@ int main(int argc, char* argv[])
586566 case ArgumentType::Convert: {
587567 [[fallthrough]] ;
588568 }
589- case ArgumentType::ConvertOutput: {
590- [[fallthrough]] ;
591- }
592569 case ArgumentType::Execute: {
593570 [[fallthrough]] ;
594571 }
@@ -691,11 +668,6 @@ int main(int argc, char* argv[])
691668 break ;
692669 }
693670 case ArgumentType::Convert: {
694- auto result = ConvertPipeline (arguments[0 ], true , false );
695- results.push_back (result);
696- break ;
697- }
698- case ArgumentType::ConvertOutput: {
699671 auto result = ConvertPipeline (arguments[0 ], false , true );
700672 results.push_back (result);
701673 break ;
0 commit comments