Search in sources :

Example 46 with Namespace

use of net.sourceforge.argparse4j.inf.Namespace in project pcgen by PCGen.

the class Main method parseCommands.

/**
	 * Initialize Main - must be called before any other getter can be used.
	 *
	 * @param argv the command line arguments to be parsed
	 */
private static Namespace parseCommands(String[] argv) {
    Namespace args = getParser().parseArgsOrFail(argv);
    if (args.getInt("verbose") > 0) {
        Logging.setCurrentLoggingLevel(Logging.DEBUG);
    }
    startGMGen = args.getBoolean("gmgen");
    startNPCGen = args.getBoolean("npc");
    ignoreJavaVer = args.getBoolean("J");
    settingsDir = args.getString("settingsdir");
    campaignMode = args.getString("campaignmode");
    characterSheet = args.get("D");
    exportSheet = args.get("E");
    partyFile = args.get("p");
    characterFile = args.get("c");
    outputFile = args.get("o");
    startNameGen = args.get("name_generator");
    return args;
}
Also used : Namespace(net.sourceforge.argparse4j.inf.Namespace)

Aggregations

Namespace (net.sourceforge.argparse4j.inf.Namespace)46 Test (org.junit.Test)36 PrintStream (java.io.PrintStream)9 Handle (org.skife.jdbi.v2.Handle)7 ByteArrayOutputStream (java.io.ByteArrayOutputStream)6 Liquibase (liquibase.Liquibase)6 ArgumentParserException (net.sourceforge.argparse4j.inf.ArgumentParserException)6 DBI (org.skife.jdbi.v2.DBI)6 ArgumentParser (net.sourceforge.argparse4j.inf.ArgumentParser)5 IOException (java.io.IOException)4 Properties (java.util.Properties)4 ImmutableMap (com.google.common.collect.ImmutableMap)3 File (java.io.File)3 Configuration (io.dropwizard.Configuration)2 Bootstrap (io.dropwizard.setup.Bootstrap)2 ArrayList (java.util.ArrayList)2 Date (java.util.Date)2 HashMap (java.util.HashMap)2 Map (java.util.Map)2 Element (org.w3c.dom.Element)2