List clOptions = parser.getArguments();
int size = clOptions.size();
for (int i = 0; i < size; i++) {
CLOption option = (CLOption) clOptions.get(i);
switch (option.getId()) {
case 0:
targets.add(NetUtils.normalize(option.getArgument()));
break;
case Main.CONFIG_FILE:
configFile = option.getArgument();
break;
case Main.HELP_OPT:
printUsage();
break;
case Main.VERSION_OPT:
printVersion();
break;
case Main.DEST_DIR_OPT:
destDir = option.getArgument();
break;
case Main.WORK_DIR_OPT:
workDir = option.getArgument();
break;
case Main.CONTEXT_DIR_OPT:
contextDir = option.getArgument();
break;
case Main.LOG_KIT_OPT:
logKit = option.getArgument();
break;
case Main.LOGGER_OPT:
logger = option.getArgument();
break;
case Main.LOG_LEVEL_OPT:
logLevel = option.getArgument();
break;
case Main.PRECOMPILE_OPT:
precompileOnly = true;
break;
case Main.AGENT_OPT:
userAgent = option.getArgument();
break;
case Main.ACCEPT_OPT:
accept = option.getArgument();
break;
case Main.URI_FILE:
Main.processFile(option.getArgument(), targets);
break;
case Main.FOLLOW_LINKS_OPT:
followLinks = "yes".equals(option.getArgument())
|| "true".equals(option.getArgument());
break;
case Main.BROKEN_LINK_FILE:
brokenLinkFile = new File(option.getArgument());
break;
}
}
final Priority priority = Priority.getPriorityForName(logLevel);