+ case SAVE_TO: {
+ try {
+ Card total = new Card(null, getCardFormat(output));
+
+ for (String file : files) {
+ try {
+ Card card = getCard(file, null).getCard();
+ card.unlink();
+ while (card.size() > 0) {
+ total.add(card.remove(0));
+ }
+ } catch (IOException e) {
+ System.err.println(trans(StringId.CLI_ERR_CANNOT_OPEN,
+ file));
+ }
+ }
+
+ total.saveAs(new File(output), getCardFormat(output));
+ } catch (IOException e) {
+ System.err.println(trans(StringId.CLI_ERR_CANNOT_OPEN, output));
+ }
+
+ break;
+ }
+ case HELP: {
+ System.out.println(APPLICATION_TITLE + " "
+ + Version.getCurrentVersion());
+ System.out.println();
+
+ System.out.println(trans(StringId.CLI_HELP));
+ System.out.println();
+
+ System.out.println(trans(StringId.CLI_HELP_MODES));
+ System.out.println("\t--help : "
+ + trans(StringId.CLI_HELP_MODE_HELP));
+ System.out.println("\t(--tui|--gui) (--noutf) ... : "
+ + trans(StringId.CLI_HELP_MODE_CONTACT_MANAGER));
+ System.out.println("\t--server PORT ... : "
+ + trans(StringId.CLI_HELP_MODE_SERVER));
+ System.out.println("\t--save-config DIR : "
+ + trans(StringId.CLI_HELP_MODE_SAVE_CONFIG));
+ System.out.println("\t--i18n DIR ---lang LANG : "
+ + trans(StringId.CLI_HELP_MODE_I18N));
+ System.out.println("\t--load-photo DIR FORMAT ... : "
+ + trans(StringId.CLI_HELP_MODE_LOAD_PHOTO));
+ System.out.println("\t--save-photo DIR FORMAT ... : "
+ + trans(StringId.CLI_HELP_MODE_SAVE_PHOTO));
+ System.out.println("\t--save-to output(.vcf) ... : "
+ + trans(StringId.CLI_HELP_MODE_SAVE_TO));
+ System.out.println();
+
+ System.out.println(trans(StringId.CLI_HELP_OPTIONS));
+ System.out.println("\t-- : " + trans(StringId.CLI_HELP_DD));
+ System.out.println("\t--lang LANG : "
+ + trans(StringId.CLI_HELP_LANG));
+ System.out.println("\t--tui : " + trans(StringId.CLI_HELP_TUI));
+ System.out.println("\t--gui : " + trans(StringId.CLI_HELP_GUI));
+ System.out.println("\t--noutf : "
+ + trans(StringId.CLI_HELP_NOUTF_OPTION));
+ System.out.println("\t--config : "
+ + trans(StringId.CLI_HELP_CONFIG));
+ System.out.println();
+
+ System.out.println(trans(StringId.CLI_HELP_FOOTER));
+ System.out.println();
+
+ break;
+ }