--- xmlTools/trunk/posUpdate/ParametersParser.cs 2013/03/27 16:13:41 750 +++ xmlTools/trunk/posUpdate/ParametersParser.cs 2013/05/25 21:53:39 874 @@ -50,11 +50,11 @@ namespace xmlTools public static void updateChainValues( [Parameter(Required = true, Description = "The new first value of the chain. All the chain will be updated based on this value")] string newValue, [Parameter(Description = "Value which have some kind of relation with -newVal \n Together with -newVal updates all the values based on the" + - "-newVal and another position specified on -valRelation parameter (basically starts with (newVal-valRelation) ) Is especially useful when" + + "-newvalue and another position specified on -valrelation parameter (basically starts with (newvalue-valrelation) ) Is especially useful when" + "updating multiple related chains (on different files), like multiple objects from one position to another. Don't use with -filename, because" + - "it will only update one file. \nExample: xmlTools.exe -newVal \"1 1 1\" -valRelation \"4 4 4\" -valElement Translation -valParentElement" + + "it will only update one file. \nExample: xmlTools.exe updatechainvalues -filename:OBANheli_body_center.xml -newvalue:\"1 1 1\" -valrelation:\"4 4 4\" -element:Translation -parelement:" + "OBANKeyFrame")] string valRelation, - [Parameter(Description = "Only update specific positions. Positions starts with 0, separted multiple positions with space. Example: valPositions=0 1 4")] [MoreThan(-1)] string valPositions + [Parameter(Description = "Only update specific positions. Positions starts with 0, separted multiple positions with space. Example: valpositions=\"0 1 4\"")] [MoreThan(-1)] string valPositions ) { initialChecks(); @@ -106,7 +106,7 @@ namespace xmlTools List filesToProcess = getFilesToProcess(globalFileName); foreach (string currentFile in filesToProcess) { - if (valPositions != null) + if (!String.IsNullOrEmpty(valPositions)) { myTools.replaceAll(currentFile, value, valPositions); } @@ -129,7 +129,7 @@ namespace xmlTools { XmlPatch myPatch; - if (forceInFiles != "") + if (!String.IsNullOrEmpty(forceInFiles)) { myPatch = new XmlPatch(globalFileName, forceInFiles, globalNoBackups); } @@ -141,13 +141,27 @@ namespace xmlTools myPatch.startPatch(); } - [Verb] + [Verb(Description = "Displays current XmlTools version.")] public static void version() { - Console.WriteLine("xmlTools v" + Program.toolsVersion); + Console.WriteLine("xmlTools v" + Program.XmlToolsVersion); Console.WriteLine("\nWritten by s10k"); } + [Verb(Description = "Displays extra informations about XmlTools.")] + public static void about() + { + version(); + Console.WriteLine(); + Console.WriteLine("For extra XmlTools support check it page at: http://wiki.oni2.net/XmlTools"); + Console.WriteLine(); + Console.WriteLine("This program uses the following free libraries: "); + Console.WriteLine("-CLAP: for parameter parsing. (http://adrianaisemberg.github.io/CLAP/)"); + Console.WriteLine("-IronJS: for custom javascript code execution. (https://github.com/fholm/IronJS)"); + Console.WriteLine(); + Console.WriteLine("A big thanks to all the oni.bungie.org community!"); + } + [Verb] public static void showErrTypes() { @@ -195,7 +209,7 @@ namespace xmlTools { List filesToProccess = new List(); - if (filename == "") // No filename? Process everything xml file found. + if (String.IsNullOrEmpty(filename)) // No filename? Process everything xml file found. { List allXmlFiles = Util.getAllXmlFiles(); foreach (String file in allXmlFiles)