Ignore:
Timestamp:
2016-10-25T14:49:36+13:00 (8 years ago)
Author:
davidb
Message:

More flexible command-line args

File:
1 edited

Legend:

Unmodified
Added
Removed
  • other-projects/hathitrust/solr-extracted-features/trunk/src/main/java/org/hathitrust/PrepareForIngest.java

    r30898 r30918  
    3535*/
    3636
    37     //protected int _num_cores;
    38     protected String _input_dir;
    39     protected String _json_list_filename;
     37    //protected int _num_cores;
     38    protected String _input_dir;
     39    protected String _json_list_filename;
    4040    protected String _output_dir;
    4141   
     
    4444        //_num_cores = num_cores;
    4545        _input_dir = input_dir;
    46         _json_list_filename = json_list_filename;
     46        _json_list_filename = (json_list_filename != null) ? json_list_filename : input_dir;
    4747        _output_dir = output_dir;
    4848    }
     
    115115
    116116        //cmd.hasOption("json-filelist")
    117         String json_list_filename = cmd.getOptionValue("json-filelist","pd-file-listing.txt");
     117        String json_list_filename = cmd.getOptionValue("json-filelist");
    118118        //int num_cores = Integer.parseInt(num_cores_str);
    119119
     
    126126       
    127127        if (filtered_args.length != 2) {
    128             System.err.println("Usage: RUN.bat [options] input-dir output-dir");
     128                System.err.println("Usage: RUN.bat [options] input-dir output-dir");
     129            formatter.printHelp("utility-name", options);
     130
     131            //System.err.println("Usage: RUN.bat [options] input-dir output-dir");
    129132            //System.err.println("  Where 'filename.txt' contains a list of JSON files, one per line,");
    130133            //System.err.println("  which use the HathiTrust Extracted Feature JSON format");
Note: See TracChangeset for help on using the changeset viewer.