Search in sources :

Example 1 with BeastParser

use of dr.app.beast.BeastParser in project beast-mcmc by beast-dev.

the class BeastParserDoc method main.

//Main method
public static void main(String[] args) throws java.io.IOException, XMLParseException {
    printTitle();
    Arguments arguments = new Arguments(new Arguments.Option[] { new Arguments.Option("help", "option to print this message") });
    try {
        arguments.parseArguments(args);
    } catch (Arguments.ArgumentException ae) {
        System.out.println(ae);
        printUsage(arguments);
        return;
    }
    if (arguments.hasOption("help")) {
        printUsage(arguments);
        return;
    }
    String outputDirectory = null;
    String[] args2 = arguments.getLeftoverArguments();
    if (args2.length > 1) {
        System.err.println("Unknown option: " + args2[1]);
        System.err.println();
        printUsage(arguments);
        return;
    }
    if (args2.length > 0) {
        outputDirectory = args2[0];
    }
    if (outputDirectory == null) {
        // No input file name was given so throw up a dialog box...
        outputDirectory = System.getProperty("user.dir") + System.getProperty("file.separator") + "release" + System.getProperty("file.separator") + "common" + System.getProperty("file.separator") + "doc" + System.getProperty("file.separator");
    }
    System.out.println("Output directory : " + outputDirectory);
    // BeastParserDoc(BeastParser parser, String directory, boolean wikiFormat)
    new BeastParserDoc(new BeastParser(new String[] {}, null, false, false, false), outputDirectory, true);
    System.exit(0);
}
Also used : Arguments(dr.app.util.Arguments) BeastParser(dr.app.beast.BeastParser)

Aggregations

BeastParser (dr.app.beast.BeastParser)1 Arguments (dr.app.util.Arguments)1