Remove cti2ctml binary
Use of cti2ctml binary can be replaced with using ctml_writer.py script directly.
This commit is contained in:
parent
f85e49a87b
commit
548b5ca468
3 changed files with 0 additions and 96 deletions
|
|
@ -1,23 +0,0 @@
|
|||
.TH "cti2ctml" 1 "4 Jun 2012" "cti2ctml" \" -*- nroff -*-
|
||||
.ad l
|
||||
.nh
|
||||
.SH NAME
|
||||
cti2ctml \- process Cantera .cti input files
|
||||
|
||||
.SH SYNOPSIS
|
||||
.B cti2ctml
|
||||
.I input-file.cti
|
||||
|
||||
.SH DESCRIPTION
|
||||
|
||||
.I cti2ctml
|
||||
processes a Cantera .cti file and produces a CTML (.xml) file. The
|
||||
output file name is based on the input file name, with the extension
|
||||
changed to .xml.
|
||||
|
||||
.SH EXAMPLE
|
||||
.TP
|
||||
cti2ctml infile.cti
|
||||
|
||||
This will produce the CTML file
|
||||
.I infile.xml
|
||||
|
|
@ -10,8 +10,6 @@ def buildProgram(name, src):
|
|||
LIBS=env['cantera_libs']))
|
||||
install('$inst_bindir', prog)
|
||||
|
||||
buildProgram('cti2ctml', ['cti2ctml.cpp'])
|
||||
|
||||
if env['layout'] != 'debian':
|
||||
buildProgram('csvdiff', ['csvdiff.cpp', 'tok_input_util.cpp', 'mdp_allo.cpp'])
|
||||
|
||||
|
|
|
|||
|
|
@ -1,71 +0,0 @@
|
|||
/**
|
||||
* @file cti2ctml.cpp
|
||||
*/
|
||||
|
||||
#include "cantera/base/ct_defs.h"
|
||||
#include "cantera/base/xml.h"
|
||||
#include "cantera/base/ctml.h"
|
||||
|
||||
using namespace Cantera;
|
||||
using namespace std;
|
||||
|
||||
|
||||
/*****************************************************************/
|
||||
/*****************************************************************/
|
||||
/*****************************************************************/
|
||||
static void printUsage()
|
||||
{
|
||||
cout << "cti2ctml [-h] infile.cti" << endl;
|
||||
cout << " Translates a cti formated file to an xml file" << endl;
|
||||
cout << " The xml file will be named ./basename(infile).xml" << endl;
|
||||
cout << " - It will always be written to the current directory" << endl;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*****************************************************************/
|
||||
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
std::string infile;
|
||||
// look for command-line options
|
||||
if (argc > 1) {
|
||||
std::string tok;
|
||||
for (int j = 1; j < argc; j++) {
|
||||
tok = string(argv[j]);
|
||||
if (tok[0] == '-') {
|
||||
int nopt = static_cast<int>(tok.size());
|
||||
for (int n = 1; n < nopt; n++) {
|
||||
if (tok[n] == 'h') {
|
||||
printUsage();
|
||||
exit(0);
|
||||
} else {
|
||||
printUsage();
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
} else if (infile == "") {
|
||||
infile = tok;
|
||||
} else {
|
||||
printUsage();
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (infile == "") {
|
||||
printUsage();
|
||||
exit(1);
|
||||
}
|
||||
|
||||
try {
|
||||
XML_Node* xc = new XML_Node();
|
||||
std::string path = findInputFile(infile);
|
||||
ctml::get_CTML_Tree(xc, path, 0);
|
||||
} catch (CanteraError& err) {
|
||||
std::cout << err.what() << std::endl;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
/***********************************************************/
|
||||
Loading…
Add table
Reference in a new issue