Index: /other-projects/maori-lang-detection/src/org/greenstone/atea/CountryCodeCountsMapData.java
===================================================================
--- /other-projects/maori-lang-detection/src/org/greenstone/atea/CountryCodeCountsMapData.java	(revision 33977)
+++ /other-projects/maori-lang-detection/src/org/greenstone/atea/CountryCodeCountsMapData.java	(revision 33978)
@@ -656,4 +656,80 @@
     }
 
+    public static void openFirefox() {
+	// https://www.cyberciti.biz/faq/howto-run-firefox-from-the-command-line/
+	String[] cmdArgs = {
+	    "firefox",
+	    "-P",
+	    "screenshot", //profile //"-profileManager=\"screenshot\"",
+	    //"--browser",
+	    "--devtools"
+	};
+	
+	SafeProcess proc = new SafeProcess(cmdArgs);
+	int retVal = proc.runProcess();
+
+	if(retVal != 0) {
+	    logger.info("Process out: " + proc.getStdOutput());
+	    logger.info("Process err: " + proc.getStdError());
+	    logger.info("Screenshot process returned with: " + retVal);
+	}
+	proc = null;
+
+	/*
+	String[] tab_cmdArgs = {
+	    "firefox",
+	    "-new-tab",
+	    "-jsconsole"
+	};
+	proc = new SafeProcess(tab_cmdArgs);
+	retVal = proc.runProcess();
+	*/
+    }
+
+    public String getGeoJSONMapScreenshotCommand(File outputFolder, String fileNamePrefix) {
+	// return the firefox :screenshot WEB CONSOLE command
+	// Only works from Firefox version 62 onwards
+	// https://developer.mozilla.org/en-US/docs/Tools/Taking_screenshots
+
+	String mapURL = this.getAsMapURL();
+
+	File outputFile = new File(outputFolder + File.separator + fileNamePrefix+".png");
+	String outputFilePath = Utility.getFilePath(outputFile);
+	
+
+	// Run in web console:
+	// :screenshot --selector ".map" --file --filename "<outputPath/outputImageFile.ext>"
+	// https://developer.mozilla.org/en-US/docs/Tools/Browser_Console
+	String webConsoleCommand = ":screenshot --selector \".map\" --file --filename \"" + outputFilePath + "\"";	
+	System.out.println("Run in Firefox web console's command line:");
+	System.out.println(webConsoleCommand);
+	
+	// Launch firefox in a new tab
+	// https://askubuntu.com/questions/57163/how-to-open-an-url-from-command-line-to-firefox-and-switch-to-tab
+	//https://developer.mozilla.org/en-US/docs/Mozilla/Command_Line_Options
+	String[] cmdArgs = {
+	    "firefox",
+	    //"-P",
+	    //"screenshot", // which does --profileManager "screenshot"
+	    //"--devtools", //"-jsconsole" opens browser console instead of web console
+	    "-new-tab",
+	    mapURL
+	};
+	
+
+	System.err.println();
+	SafeProcess proc = new SafeProcess(cmdArgs);	
+
+	int retVal = proc.runProcess();
+
+	if(retVal != 0) {
+	    logger.info("Process out: " + proc.getStdOutput());
+	    logger.info("Process err: " + proc.getStdError());
+	    logger.info("Screenshot process returned with: " + retVal);
+	}
+
+	return webConsoleCommand;
+    }
+
     public String geoJsonMapScreenshot(File outputFolder, String fileNamePrefix) {
 	// https://stackoverflow.com/questions/49606051/how-to-take-a-screenshot-in-firefox-headless-selenium-in-java
Index: /other-projects/maori-lang-detection/src/org/greenstone/atea/SummaryTool.java
===================================================================
--- /other-projects/maori-lang-detection/src/org/greenstone/atea/SummaryTool.java	(revision 33977)
+++ /other-projects/maori-lang-detection/src/org/greenstone/atea/SummaryTool.java	(revision 33978)
@@ -356,6 +356,7 @@
      */
     public static void main(String args[]) {
-	SafeProcess.DEBUG = 1;
-	
+	int oldDebugMode = SafeProcess.DEBUG;
+	SafeProcess.DEBUG = 0;
+
 	if(args.length >= 2) {
 	    printUsage();
@@ -417,4 +418,6 @@
 		// that GEOJSON_MAP_TOOL_URL takes as input to produce a map.
 
+		///CountryCodeCountsMapData.openFirefox();
+		
 		for(int i = 1; i < tableFileNames.length; i++) { // empty element at 0
 		    String tablefilename = tableFileNames[i] + ".json"; // filenames have no suffix
@@ -453,4 +456,5 @@
 		    // to confirm if the JSON in the provided json file parses/is valid JSON.
 
+		    /*
 		    String[] cmdArgs = {"python", "-mjson.tool", geoJsonFilename};
 		    SafeProcess p = new SafeProcess(cmdArgs);
@@ -465,5 +469,5 @@
 			continue;
 		    }
-
+		    */
 		    
 		    /*boolean uriEncoded = true;
@@ -472,11 +476,12 @@
 		    */
 		    
-		    logger.info("Data URL string: " + mapData.getAsMapURL());
+		    //logger.info("Data URL string: " + mapData.getAsMapURL());
 		    logger.info("");
-		    mapData.geoJsonMapScreenshot(outFolder, tablefilename);
+		    //mapData.geoJsonMapScreenshot(outFolder, tablefilename);
+		    mapData.getGeoJSONMapScreenshotCommand(outFolder, tablefilename);
 		    logger.info("---");
 
 		    // TODO: Remove break. For debugging: breaks after first table -> map conversion.
-		    break;
+		    //break;
 		}
 		
@@ -486,5 +491,7 @@
 	} catch(Exception e) {
 	    logger.error(e.getMessage(), e);
-	}
+	} finally {
+	    SafeProcess.DEBUG = oldDebugMode;
+	}	
     }
 }
