diff --git a/src/de/superx/bin/FMParser.java b/src/de/superx/bin/FMParser.java index 5235a92..9c5e358 100644 --- a/src/de/superx/bin/FMParser.java +++ b/src/de/superx/bin/FMParser.java @@ -43,6 +43,7 @@ public class FMParser extends TemplateProcessor { private Statement stm; private String isSimpleParser; + private String myParams=""; private static String sqlDialect; FMParser() { @@ -58,7 +59,16 @@ public class FMParser extends TemplateProcessor { outfile = GetOpts.getValue("-out:"); if (GetOpts.isPresent("-simpleParser")) isSimpleParser = GetOpts.getValue("-simpleParser:"); + if (GetOpts.isPresent("-params")) + myParams = GetOpts.getValue("-params"); + String input = StringUtils.readFile(new File(infile)); + if(myParams !="") + { + String paramName = "<<" +myParams.substring(0, myParams.indexOf("="))+">>"; + String paramVal = "'"+myParams.substring(myParams.indexOf("=") + 1)+"'"; + input=de.memtext.util.StringUtils.replace(input, paramName, paramVal); + } String output = ""; if (isSimpleParser != null && isSimpleParser.equalsIgnoreCase("true")) { output = simpleParser(dbprop, input); diff --git a/superx-build/build.xml b/superx-build/build.xml index 7784ceb..233ebe1 100644 --- a/superx-build/build.xml +++ b/superx-build/build.xml @@ -33,7 +33,7 @@ classname="org.codehaus.groovy.ant.Groovy" classpathref="classpath"/> - +