X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=getcommandinfocommand.cpp;h=03c6b17a8a9be441c52070f2af24705eb8f3a168;hb=e98d56be8369a799e61a411bc13d3bd1fa3451e5;hp=e75897f6bae4bf45142ec7fd8cf643fcb4e483c0;hpb=e150b0b0664caec517485ee6d69dcdade6dcae77;p=mothur.git diff --git a/getcommandinfocommand.cpp b/getcommandinfocommand.cpp index e75897f..03c6b17 100644 --- a/getcommandinfocommand.cpp +++ b/getcommandinfocommand.cpp @@ -92,7 +92,7 @@ int GetCommandInfoCommand::execute(){ //loop through each command outputting info for (it = commands.begin(); it != commands.end(); it++) { - if (m->control_pressed) { m->mothurOut("[ERROR]: did not complete making the file."); m->mothurOutEndLine(); out.close(); remove((output+".temp").c_str()); } + if (m->control_pressed) { m->mothurOut("[ERROR]: did not complete making the file."); m->mothurOutEndLine(); out.close(); m->mothurRemove((output+".temp")); } Command* thisCommand = commandFactory->getCommand(it->first); @@ -102,6 +102,7 @@ int GetCommandInfoCommand::execute(){ //general info out << "commandName=" << thisCommand->getCommandName() << endl; + //cout << thisCommand->getCommandName() << " current citation = " << thisCommand->getCitation() << endl; out << "commandCategory=" << thisCommand->getCommandCategory() << endl; //remove /n from help string since gui reads line by line @@ -112,6 +113,16 @@ int GetCommandInfoCommand::execute(){ } out << "help=" << newHelpString << endl; + //remove /n from citation string since gui reads line by line + string mycitationString = thisCommand->getCitation(); + string newCitationString = ""; + for (int i = 0; i < mycitationString.length(); i++) { + if (mycitationString[i] != '\n') { newCitationString += mycitationString[i]; } + } + out << "citation=" << newCitationString << endl; + + out << "description=" << thisCommand->getDescription() << endl; + //outputTypes - makes something like outputTypes=fasta-name-qfile map > thisOutputTypes = thisCommand->getOutputFiles(); map >::iterator itTypes; @@ -175,7 +186,7 @@ int GetCommandInfoCommand::execute(){ out2.close(); m->appendFiles(output+".temp", output); - remove((output+".temp").c_str()); + m->mothurRemove((output+".temp")); m->mothurOutEndLine(); m->mothurOut("Output File Names: "); m->mothurOutEndLine();