A Dialect is a way for Greenpepper to know how to convert a syntax into HTML. To implement and use a dialect, you will need to:

Implement the SpecificationDialect interface.

The interface defines a method that should take the Specification as a String and convert it to an HTML page (with the <html> tag).

package com.greenpepper.dialect;

/**
 * Define a way to convert an input to the HTML output that will be fed to Greenpepper.
 */
public interface SpecificationDialect {

    /**
     * Converts the content of an input to the HTML output that will be fed to GreenPepper Core
     * @param input The input content to convert.
     * @return The HTML output.
     */
    String convert(InputStream input) throws SpecificationDialectException;
}


You can create a constructor that takes arguments, the arguments being an array of String. See the --dialect option to see how the option can be passed down.

Specify the --dialect option

Use the --dialect to specify the class implementing the Dialect and its arguments

java -cp ... --dialect com.mydomain.MyDialect;Arg1;Arg2 spec.extension out.html