Ignore:
Timestamp:
2020-02-26T19:57:05+13:00 (4 years ago)
Author:
ak19
Message:

Opens all geoJSON maps in new tabs instead of waiting for user to have processed each one in turn

File:
1 edited

Legend:

Unmodified
Added
Removed
  • other-projects/maori-lang-detection/src/org/greenstone/atea/SummaryTool.java

    r33940 r33978  
    356356     */
    357357    public static void main(String args[]) {
    358     SafeProcess.DEBUG = 1;
    359    
     358    int oldDebugMode = SafeProcess.DEBUG;
     359    SafeProcess.DEBUG = 0;
     360
    360361    if(args.length >= 2) {
    361362        printUsage();
     
    417418        // that GEOJSON_MAP_TOOL_URL takes as input to produce a map.
    418419
     420        ///CountryCodeCountsMapData.openFirefox();
     421       
    419422        for(int i = 1; i < tableFileNames.length; i++) { // empty element at 0
    420423            String tablefilename = tableFileNames[i] + ".json"; // filenames have no suffix
     
    453456            // to confirm if the JSON in the provided json file parses/is valid JSON.
    454457
     458            /*
    455459            String[] cmdArgs = {"python", "-mjson.tool", geoJsonFilename};
    456460            SafeProcess p = new SafeProcess(cmdArgs);
     
    465469            continue;
    466470            }
    467 
     471            */
    468472           
    469473            /*boolean uriEncoded = true;
     
    472476            */
    473477           
    474             logger.info("Data URL string: " + mapData.getAsMapURL());
     478            //logger.info("Data URL string: " + mapData.getAsMapURL());
    475479            logger.info("");
    476             mapData.geoJsonMapScreenshot(outFolder, tablefilename);
     480            //mapData.geoJsonMapScreenshot(outFolder, tablefilename);
     481            mapData.getGeoJSONMapScreenshotCommand(outFolder, tablefilename);
    477482            logger.info("---");
    478483
    479484            // TODO: Remove break. For debugging: breaks after first table -> map conversion.
    480             break;
     485            //break;
    481486        }
    482487       
     
    486491    } catch(Exception e) {
    487492        logger.error(e.getMessage(), e);
    488     }
     493    } finally {
     494        SafeProcess.DEBUG = oldDebugMode;
     495    }   
    489496    }
    490497}
Note: See TracChangeset for help on using the changeset viewer.