diff --git a/cmd-line-apps/dhp-broker-client/src/main/java/eu/dnetlib/broker/BrokerClientApp.java b/cmd-line-apps/dhp-broker-client/src/main/java/eu/dnetlib/broker/BrokerClientApp.java index 3f633edc..b530d332 100644 --- a/cmd-line-apps/dhp-broker-client/src/main/java/eu/dnetlib/broker/BrokerClientApp.java +++ b/cmd-line-apps/dhp-broker-client/src/main/java/eu/dnetlib/broker/BrokerClientApp.java @@ -133,6 +133,8 @@ public class BrokerClientApp implements CommandLineRunner { for (final String s : brokerUtils.listSubscriptions(baseUrl, user)) { if (!interactive || confirm(s)) { brokerUtils.downloadEvents(baseUrl, s, outputDir, gzip); + } else { + System.out.println("-- SKIPPED --"); } } @@ -142,16 +144,14 @@ public class BrokerClientApp implements CommandLineRunner { } private boolean confirm(final String s) throws IOException { - System.out.print(String.format("Do you want download subscription %s? (Y/N) ", s)); + System.out.print(String.format("\nDo you want download subscription %s? (Y/N) ", s)); System.out.flush(); char c = (char) System.in.read(); while (true) { if (c == 'y' || c == 'Y') { - System.out.println(); return true; } else if (c == 'n' || c == 'N') { - System.out.println(); return false; } else { c = (char) System.in.read(); diff --git a/cmd-line-apps/dhp-broker-client/src/main/java/eu/dnetlib/broker/BrokerUtils.java b/cmd-line-apps/dhp-broker-client/src/main/java/eu/dnetlib/broker/BrokerUtils.java index 1fc7d079..ee909746 100644 --- a/cmd-line-apps/dhp-broker-client/src/main/java/eu/dnetlib/broker/BrokerUtils.java +++ b/cmd-line-apps/dhp-broker-client/src/main/java/eu/dnetlib/broker/BrokerUtils.java @@ -53,7 +53,7 @@ public class BrokerUtils { final String topic = object.getString("topic"); final String ds = extractDsName(object.getJSONArray("conditionsAsList")); - System.out.println(String.format(" - %s (TOPIC: %s, DS: %s)", suscrId, topic, ds)); + System.out.println(String.format(" - %s (TOPIC: %s, Datasource: %s)", suscrId, topic, ds)); res.add(suscrId); }