public void generateHelpFiles(HelpModuleCollection help) throws Exception {
		message("Generating Help Files for: " + help);

		LogFileWriter errorLog = createLogFile();

		boolean hasErrors = false;
		StringBuffer shortErrorDescription = new StringBuffer();
		try {
			generateMapFile(help);
		}
		catch (IOException e) {
			hasErrors = true;
			shortErrorDescription.append("Unexpected error generating map file!\n");
			errorLog.append("Failed to generate " + mapOutputFilename + ": ");
			errorLog.append(e.getMessage());
			errorLog.println();
		}

		try {
			generateTOCFile(linkDatabase, help);
		}
		catch (IOException e) {
			hasErrors = true;
			shortErrorDescription.append("Unexpected error writing TOC file!\n");
			errorLog.append("Failed to generate " + tocOutputFilename + ": ");
			errorLog.append(e.getMessage());
			errorLog.println();
		}

		if (hasErrors) {
			errorLog.close();
			throw new RuntimeException("Errors Creating Help Files - " + shortErrorDescription +
				"\n\tsee help log for details: " + errorLog.getFile());
		}

		errorLog.close();
		if (errorLog.isEmpty()) {
			errorLog.delete();
		}

		message("Done generating help files for module: " + moduleName);
	}
This class:
<ul>
     <li>Creates a XXX_map.xml file (topic IDs to help files)</li>
     <li>Creates a XXX_TOC.xml file from a source toc.xml file</li>
     <li>Finds unused images</li>
</ul>
Ghidra/Framework/Help/src/main/java/help/JavaHelpFilesBuilder.java