public static void main(String[] args) throws IOException {
        if (args == null || args.length != 1) {
            System.out.println("Template directory not provided (no path provided).");
            System.exit(1);
        }
        File templateDir = new File(args[0]);
        if (!templateDir.isDirectory()) {
            System.out.println("Template directory not provided (provided path is not a directory).");
            System.exit(1);
        }

        if (!new File(templateDir, "dash.html").isFile()) {
            System.out.println("Template directory not provided (dash.html not found).");
            System.exit(1);
        }

        File outputDir = new File(templateDir, "../../../../../../tools/i18n/target");
        if (!outputDir.isDirectory()) {
            System.out.println("Output directory not found: " + outputDir);
            System.exit(1);
        }
        File outputFile = new File(outputDir, "scanner-messages.properties");
        if (outputFile.isFile() && !outputFile.delete()) {
            System.out.println("Couldn't delete the old messages.properties: " + outputFile);
            System.exit(1);
        }

        System.out.println("Starting scan.");
        System.out.println("Scanning template directory: " + templateDir.getAbsolutePath());

        String[] extensions = { "html", "include" };
        Collection<File> files = FileUtils.listFiles(templateDir, extensions, true);

        TreeMap<String, String> strings = new TreeMap<>();

        for (File file : files) {
            System.out.println("\tScanning file: " + file);
            scanFile(file, strings);
        }

        outputMessages(strings, outputFile);

        System.out.println("Scan complete.  Scanned " + files.size() + " files and discovered " + strings.size() + " translation strings.");
    }
Used to scan all of the UI templates looking for strings that require
translation. The output from this scanner is a messages.properties file with
all of the strings that require translation. This should then be compared
with the messages.properties file included in the API Manager UI project to
see if anything is missing.

TODO: integrate this into a maven plugin of some kind to automatically detect
missing strings during the build
tools/i18n/src/main/java/io/apiman/tools/i18n/TemplateScanner.java