From a11cb9d30327dfe13ce12b7c6dda8e1932925d7a Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Fri, 8 Sep 2023 00:17:09 +0200 Subject: [PATCH 1/3] Add "--verbose" to MV generator --- src/main/java/org/jabref/cli/JournalListMvGenerator.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/jabref/cli/JournalListMvGenerator.java b/src/main/java/org/jabref/cli/JournalListMvGenerator.java index 154696b3a22..4004b7ba025 100644 --- a/src/main/java/org/jabref/cli/JournalListMvGenerator.java +++ b/src/main/java/org/jabref/cli/JournalListMvGenerator.java @@ -19,6 +19,8 @@ public class JournalListMvGenerator { public static void main(String[] args) throws IOException { + boolean verbose = (args.length == 1) && (args[0].equals("--verbose")); + Path abbreviationsDirectory = Path.of("buildres", "abbrv.jabref.org", "journals"); if (!Files.exists(abbreviationsDirectory)) { System.out.println("Path " + abbreviationsDirectory.toAbsolutePath() + " does not exist"); @@ -66,7 +68,9 @@ public static void main(String[] args) throws IOException { Abbreviation::getName, abbreviation -> abbreviation, (abbreviation1, abbreviation2) -> { - System.out.println("Double entry " + abbreviation1.getName()); + if (verbose) { + System.out.println("Double entry " + abbreviation1.getName()); + } return abbreviation2; })); fullToAbbreviation.putAll(abbreviationMap); From 993a358f9f8abc7a9a5b8c77dce1961f7df0f047 Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Fri, 8 Sep 2023 11:10:46 +0200 Subject: [PATCH 2/3] Fix openrewrite issue --- src/main/java/org/jabref/cli/JournalListMvGenerator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/jabref/cli/JournalListMvGenerator.java b/src/main/java/org/jabref/cli/JournalListMvGenerator.java index 4004b7ba025..35f25a6edbe 100644 --- a/src/main/java/org/jabref/cli/JournalListMvGenerator.java +++ b/src/main/java/org/jabref/cli/JournalListMvGenerator.java @@ -19,7 +19,7 @@ public class JournalListMvGenerator { public static void main(String[] args) throws IOException { - boolean verbose = (args.length == 1) && (args[0].equals("--verbose")); + boolean verbose = (args.length == 1) && ("--verbose".equals(args[0])); Path abbreviationsDirectory = Path.of("buildres", "abbrv.jabref.org", "journals"); if (!Files.exists(abbreviationsDirectory)) { From 78b1cf875a0190f855bf76a0c4405b82ad82bc38 Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Fri, 8 Sep 2023 11:10:53 +0200 Subject: [PATCH 3/3] Update openrewrite --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 88b375f23a5..e4bdbf6da35 100644 --- a/build.gradle +++ b/build.gradle @@ -27,7 +27,7 @@ plugins { id 'idea' - id 'org.openrewrite.rewrite' version '6.3.2' + id 'org.openrewrite.rewrite' version '6.3.3' } // Enable following for debugging